> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# HeyReach: Add To Campaign

> Add contacts with LinkedIn profiles to a HeyReach campaign to start LinkedIn outreach. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Add contacts with LinkedIn profiles to a HeyReach campaign to start LinkedIn outreach.

> [!NOTE]
>
> Tool ID: `heyreach_add_to_campaign`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'heyreach_add_to_campaign',
  {
    "campaign_id": "123",
    "contacts": [
      {
        "linkedin_url": "https://www.linkedin.com/in/jane-doe",
        "first_name": "Jane",
        "last_name": "Doe"
      }
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute heyreach_add_to_campaign --input '{
  "campaign_id": "123",
  "contacts": [
    {
      "linkedin_url": "https://www.linkedin.com/in/jane-doe",
      "first_name": "Jane",
      "last_name": "Doe"
    }
  ]
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "status": "example",
  "result": {
    "data": {
      "pushed": 123,
      "failed": 123
    }
  }
}
```

Use `deepline describe heyreach_add_to_campaign --json` for the latest machine-readable contract.

## Input reference

HeyReach add to campaign input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.campaign_id` | `string` | Yes | — | Numeric HeyReach campaign ID. Use list\_campaigns to discover valid IDs. Minimum length: 1. Pattern: `^\d+$`. |
| `payload.contacts` | `array` | Yes | — | Minimum items: 1. Maximum items: 100. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "HeyReach add to campaign input.",
    "properties": {
      "campaign_id": {
        "type": "string",
        "description": "Numeric HeyReach campaign ID. Use list_campaigns to discover valid IDs.",
        "minLength": 1,
        "pattern": "^\\d+$"
      },
      "contacts": {
        "type": "array",
        "minItems": 1,
        "maxItems": 100,
        "items": {
          "type": "object",
          "properties": {
            "linkedin_url": {
              "type": "string",
              "description": "LinkedIn profile URL (e.g. https://www.linkedin.com/in/janedoe)",
              "minLength": 1,
              "maxLength": 500
            },
            "first_name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 150
            },
            "last_name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 150
            },
            "email": {
              "type": "string",
              "description": "Optional work email for the lead. Will be lowercased and trimmed.",
              "maxLength": 320
            },
            "company": {
              "type": "string",
              "minLength": 1,
              "maxLength": 250
            },
            "custom_fields": {
              "type": "object",
              "description": "Custom personalization variables. Keys must match HeyReach sequence variable names.",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "required": [
            "linkedin_url",
            "first_name",
            "last_name"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "campaign_id",
      "contacts"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.status` | `string` | Yes | — | — |
| `result.result` | `object` | Yes | — | — |
| `result.result.data` | `object` | Yes | — | — |
| `result.result.data.pushed` | `integer` | Yes | — | — |
| `result.result.data.failed` | `integer` | Yes | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "pushed": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              }
            },
            "required": [
              "pushed",
              "failed"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [HeyReach provider guide](https://deepline.com/docs/providers/heyreach/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.