> ## 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 Campaign By ID

> Getting full campaign details from HeyReach by campaign id. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Getting full campaign details from HeyReach by campaign id.

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

## 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_campaign_by_id',
  {
    "campaign_id": 123
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute heyreach_get_campaign_by_id --input '{
  "campaign_id": 123
}' --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": {
    "id": 123,
    "name": "Example",
    "creationTime": "example",
    "linkedInUserListName": "Example",
    "linkedInUserListId": 123,
    "campaignAccountIds": [
      123
    ],
    "status": "example",
    "progressStats": {
      "totalUsers": 123,
      "totalUsersInProgress": 123,
      "totalUsersPending": 123,
      "totalUsersFinished": 123,
      "totalUsersFailed": 123,
      "totalUsersManuallyStopped": 123,
      "totalUsersExcluded": 123
    },
    "excludeInOtherCampaigns": true,
    "excludeHasOtherAccConversations": true,
    "excludeContactedFromSenderInOtherCampaign": true,
    "excludeListId": null,
    "organizationUnitId": 123
  }
}
```

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

## Input reference

HeyReach campaign ID input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.campaign_id` | `integer \| string` | Yes | — | Numeric id as integer or numeric string. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "HeyReach campaign ID input.",
    "properties": {
      "campaign_id": {
        "description": "Numeric id as integer or numeric string.",
        "anyOf": [
          {
            "type": "integer",
            "minimum": 1
          },
          {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+$"
          }
        ]
      }
    },
    "required": [
      "campaign_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.status` | `string` | Yes | — | — |
| `result.result` | `object` | Yes | — | — |
| `result.result.id` | `integer` | Yes | — | — |
| `result.result.name` | `string` | Yes | — | — |
| `result.result.creationTime` | `string` | Yes | — | — |
| `result.result.linkedInUserListName` | `string` | Yes | — | — |
| `result.result.linkedInUserListId` | `integer` | Yes | — | — |
| `result.result.campaignAccountIds` | `array` | Yes | — | — |
| `result.result.status` | `string` | Yes | — | — |
| `result.result.progressStats` | `object` | Yes | — | — |
| `result.result.progressStats.totalUsers` | `integer` | Yes | — | — |
| `result.result.progressStats.totalUsersInProgress` | `integer` | Yes | — | — |
| `result.result.progressStats.totalUsersPending` | `integer` | Yes | — | — |
| `result.result.progressStats.totalUsersFinished` | `integer` | Yes | — | — |
| `result.result.progressStats.totalUsersFailed` | `integer` | Yes | — | — |
| `result.result.progressStats.totalUsersManuallyStopped` | `integer` | Yes | — | — |
| `result.result.progressStats.totalUsersExcluded` | `integer` | Yes | — | — |
| `result.result.excludeInOtherCampaigns` | `boolean` | Yes | — | — |
| `result.result.excludeHasOtherAccConversations` | `boolean` | Yes | — | — |
| `result.result.excludeContactedFromSenderInOtherCampaign` | `boolean` | Yes | — | — |
| `result.result.excludeListId` | `null` | Yes | — | — |
| `result.result.organizationUnitId` | `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": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "creationTime": {
            "type": "string"
          },
          "linkedInUserListName": {
            "type": "string"
          },
          "linkedInUserListId": {
            "type": "integer"
          },
          "campaignAccountIds": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "status": {
            "type": "string"
          },
          "progressStats": {
            "type": "object",
            "properties": {
              "totalUsers": {
                "type": "integer"
              },
              "totalUsersInProgress": {
                "type": "integer"
              },
              "totalUsersPending": {
                "type": "integer"
              },
              "totalUsersFinished": {
                "type": "integer"
              },
              "totalUsersFailed": {
                "type": "integer"
              },
              "totalUsersManuallyStopped": {
                "type": "integer"
              },
              "totalUsersExcluded": {
                "type": "integer"
              }
            },
            "required": [
              "totalUsers",
              "totalUsersInProgress",
              "totalUsersPending",
              "totalUsersFinished",
              "totalUsersFailed",
              "totalUsersManuallyStopped",
              "totalUsersExcluded"
            ],
            "additionalProperties": true
          },
          "excludeInOtherCampaigns": {
            "type": "boolean"
          },
          "excludeHasOtherAccConversations": {
            "type": "boolean"
          },
          "excludeContactedFromSenderInOtherCampaign": {
            "type": "boolean"
          },
          "excludeListId": {
            "type": "null"
          },
          "organizationUnitId": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "creationTime",
          "linkedInUserListName",
          "linkedInUserListId",
          "campaignAccountIds",
          "status",
          "progressStats",
          "excludeInOtherCampaigns",
          "excludeHasOtherAccConversations",
          "excludeContactedFromSenderInOtherCampaign",
          "excludeListId",
          "organizationUnitId"
        ],
        "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.