> ## 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 Leads From Campaign

> List the leads in a HeyReach campaign with their progress, filtered by date. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

List the leads in a HeyReach campaign with their progress, filtered by date.

> [!NOTE]
>
> Tool ID: `heyreach_get_leads_from_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_get_leads_from_campaign',
  {
    "campaign_id": 123
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute heyreach_get_leads_from_campaign --input '{
  "campaign_id": 123
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe heyreach_get_leads_from_campaign --json` for the complete live contract.

## Input reference

HeyReach get leads from campaign input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.campaign_id` | `integer \| string` | Yes | — | Numeric id as integer or numeric string. |
| `payload.offset` | `integer` | No | — | Minimum: 0. |
| `payload.limit` | `integer` | No | — | Minimum: 1. Maximum: 1000. |
| `payload.time_from` | `string` | No | — | Format: `date-time`. |
| `payload.time_to` | `string` | No | — | Format: `date-time`. |
| `payload.time_filter` | `"CreationTime" \| "Everywhere" \| "LastActionTakenTime" \| "FailedTime" \| "LastActionTakenOrFailedTime"` | No | — | Allowed: `CreationTime`, `Everywhere`, `LastActionTakenTime`, `FailedTime`, `LastActionTakenOrFailedTime`. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "HeyReach get leads from campaign input.",
    "properties": {
      "campaign_id": {
        "description": "Numeric id as integer or numeric string.",
        "anyOf": [
          {
            "type": "integer",
            "minimum": 1
          },
          {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+$"
          }
        ]
      },
      "offset": {
        "type": "integer",
        "minimum": 0
      },
      "limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 1000
      },
      "time_from": {
        "type": "string",
        "format": "date-time"
      },
      "time_to": {
        "type": "string",
        "format": "date-time"
      },
      "time_filter": {
        "type": "string",
        "enum": [
          "CreationTime",
          "Everywhere",
          "LastActionTakenTime",
          "FailedTime",
          "LastActionTakenOrFailedTime"
        ]
      }
    },
    "required": [
      "campaign_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.status` | `string` | Yes | — | — |
| `result.result` | `object` | Yes | — | — |
| `result.result.totalCount` | `integer` | Yes | — | — |
| `result.result.items` | `array` | Yes | — | — |
| `result.result.items[].id` | `integer` | Yes | — | — |
| `result.result.items[].linkedInUserProfileId` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile` | `object` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.linkedin_id` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.profileUrl` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.firstName` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.lastName` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.headline` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.imageUrl` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.location` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.companyName` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.companyUrl` | `null` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.position` | `string` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.about` | `null` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.connections` | `integer` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.followers` | `integer` | Yes | — | — |
| `result.result.items[].linkedInUserProfile.emailAddress` | `null` | Yes | — | — |
| `result.result.items[].lastActionTime` | `string` | Yes | — | — |
| `result.result.items[].failedTime` | `null` | Yes | — | — |
| `result.result.items[].creationTime` | `string` | Yes | — | — |
| `result.result.items[].leadCampaignStatus` | `string` | Yes | — | — |
| `result.result.items[].leadConnectionStatus` | `string` | Yes | — | — |
| `result.result.items[].leadMessageStatus` | `string` | Yes | — | — |
| `result.result.items[].errorCode` | `null` | Yes | — | — |
| `result.result.items[].leadCampaignStatusMessage` | `null` | Yes | — | — |
| `result.result.items[].linkedInSenderId` | `integer` | Yes | — | — |
| `result.result.items[].linkedInSenderFullName` | `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": {
          "totalCount": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "linkedInUserProfileId": {
                      "type": "string"
                    },
                    "linkedInUserProfile": {
                      "type": "object",
                      "properties": {
                        "linkedin_id": {
                          "type": "string"
                        },
                        "profileUrl": {
                          "type": "string"
                        },
                        "firstName": {
                          "type": "string"
                        },
                        "lastName": {
                          "type": "string"
                        },
                        "headline": {
                          "type": "string"
                        },
                        "imageUrl": {
                          "type": "string"
                        },
                        "location": {
                          "type": "string"
                        },
                        "companyName": {
                          "type": "string"
                        },
                        "companyUrl": {
                          "type": "null"
                        },
                        "position": {
                          "type": "string"
                        },
                        "about": {
                          "type": "null"
                        },
                        "connections": {
                          "type": "integer"
                        },
                        "followers": {
                          "type": "integer"
                        },
                        "emailAddress": {
                          "type": "null"
                        }
                      },
                      "required": [
                        "linkedin_id",
                        "profileUrl",
                        "firstName",
                        "lastName",
                        "headline",
                        "imageUrl",
                        "location",
                        "companyName",
                        "companyUrl",
                        "position",
                        "about",
                        "connections",
                        "followers",
                        "emailAddress"
                      ],
                      "additionalProperties": true
                    },
                    "lastActionTime": {
                      "type": "string"
                    },
                    "failedTime": {
                      "type": "null"
                    },
                    "creationTime": {
                      "type": "string"
                    },
                    "leadCampaignStatus": {
                      "type": "string"
                    },
                    "leadConnectionStatus": {
                      "type": "string"
                    },
                    "leadMessageStatus": {
                      "type": "string"
                    },
                    "errorCode": {
                      "type": "null"
                    },
                    "leadCampaignStatusMessage": {
                      "type": "null"
                    },
                    "linkedInSenderId": {
                      "type": "integer"
                    },
                    "linkedInSenderFullName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "linkedInUserProfileId",
                    "linkedInUserProfile",
                    "lastActionTime",
                    "failedTime",
                    "creationTime",
                    "leadCampaignStatus",
                    "leadConnectionStatus",
                    "leadMessageStatus",
                    "errorCode",
                    "leadCampaignStatusMessage",
                    "linkedInSenderId",
                    "linkedInSenderFullName"
                  ],
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "linkedInUserProfileId": {
                      "type": "string"
                    },
                    "linkedInUserProfile": {
                      "type": "object",
                      "properties": {
                        "linkedin_id": {
                          "type": "string"
                        },
                        "profileUrl": {
                          "type": "string"
                        },
                        "firstName": {
                          "type": "string"
                        },
                        "lastName": {
                          "type": "string"
                        },
                        "headline": {
                          "type": "string"
                        },
                        "imageUrl": {
                          "type": "string"
                        },
                        "location": {
                          "type": "string"
                        },
                        "companyName": {
                          "type": "string"
                        },
                        "companyUrl": {
                          "type": "string"
                        },
                        "position": {
                          "type": "string"
                        },
                        "about": {
                          "type": "string"
                        },
                        "connections": {
                          "type": "integer"
                        },
                        "followers": {
                          "type": "integer"
                        },
                        "emailAddress": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "linkedin_id",
                        "profileUrl",
                        "firstName",
                        "lastName",
                        "headline",
                        "imageUrl",
                        "location",
                        "companyName",
                        "companyUrl",
                        "position",
                        "about",
                        "connections",
                        "followers",
                        "emailAddress"
                      ],
                      "additionalProperties": true
                    },
                    "lastActionTime": {
                      "type": "string"
                    },
                    "failedTime": {
                      "type": "null"
                    },
                    "creationTime": {
                      "type": "string"
                    },
                    "leadCampaignStatus": {
                      "type": "string"
                    },
                    "leadConnectionStatus": {
                      "type": "string"
                    },
                    "leadMessageStatus": {
                      "type": "string"
                    },
                    "errorCode": {
                      "type": "null"
                    },
                    "leadCampaignStatusMessage": {
                      "type": "null"
                    },
                    "linkedInSenderId": {
                      "type": "integer"
                    },
                    "linkedInSenderFullName": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "linkedInUserProfileId",
                    "linkedInUserProfile",
                    "lastActionTime",
                    "failedTime",
                    "creationTime",
                    "leadCampaignStatus",
                    "leadConnectionStatus",
                    "leadMessageStatus",
                    "errorCode",
                    "leadCampaignStatusMessage",
                    "linkedInSenderId",
                    "linkedInSenderFullName"
                  ],
                  "additionalProperties": true
                }
              ]
            }
          }
        },
        "required": [
          "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.