> ## 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: Get Campaigns For Lead

> Finding campaigns where a given lead appears in HeyReach. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Finding campaigns where a given lead appears in HeyReach.

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

## 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_get_campaigns_for_lead',
  {
    "email": "jane.doe@example.com",
    "linkedin_id": "https://www.linkedin.com/in/jane-doe",
    "profile_url": "https://example.com"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute heyreach_get_campaigns_for_lead --input '{
  "email": "jane.doe@example.com",
  "linkedin_id": "https://www.linkedin.com/in/jane-doe",
  "profile_url": "https://example.com"
}' --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": {
    "leadFullName": "Example",
    "totalCount": 123,
    "items": [
      {
        "campaignId": 123,
        "campaignName": "Example",
        "campaignStatus": "example",
        "creationTime": "example",
        "leadStatus": "example"
      }
    ]
  }
}
```

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

## Input reference

HeyReach lead identity lookup input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.email` | `string` | No | — | Minimum length: 1. Maximum length: 320. |
| `payload.linkedin_id` | `string` | No | — | Minimum length: 1. Maximum length: 100. |
| `payload.profile_url` | `string` | No | — | Minimum length: 1. Maximum length: 500. |
| `payload.offset` | `integer` | No | — | Minimum: 0. |
| `payload.limit` | `integer` | No | — | Minimum: 1. Maximum: 1000. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "HeyReach lead identity lookup input.",
    "properties": {
      "email": {
        "type": "string",
        "minLength": 1,
        "maxLength": 320
      },
      "linkedin_id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "profile_url": {
        "type": "string",
        "minLength": 1,
        "maxLength": 500
      },
      "offset": {
        "type": "integer",
        "minimum": 0
      },
      "limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 1000
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.status` | `string` | Yes | — | — |
| `result.result` | `object` | Yes | — | — |
| `result.result.leadFullName` | `string` | Yes | — | — |
| `result.result.totalCount` | `integer` | Yes | — | — |
| `result.result.items` | `array` | Yes | — | — |
| `result.result.items[].campaignId` | `integer` | Yes | — | — |
| `result.result.items[].campaignName` | `string` | Yes | — | — |
| `result.result.items[].campaignStatus` | `string` | Yes | — | — |
| `result.result.items[].creationTime` | `string` | Yes | — | — |
| `result.result.items[].leadStatus` | `string` | 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": {
          "leadFullName": {
            "type": "string"
          },
          "totalCount": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "campaignId": {
                  "type": "integer"
                },
                "campaignName": {
                  "type": "string"
                },
                "campaignStatus": {
                  "type": "string"
                },
                "creationTime": {
                  "type": "string"
                },
                "leadStatus": {
                  "type": "string"
                }
              },
              "required": [
                "campaignId",
                "campaignName",
                "campaignStatus",
                "creationTime",
                "leadStatus"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "leadFullName",
          "totalCount",
          "items"
        ],
        "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.