> ## 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: Clone Campaign

> Duplicate a HeyReach LinkedIn campaign: copy its sequence steps and schedule into a new draft campaign with its own list and senders.

Duplicate a HeyReach LinkedIn campaign: copy its sequence steps and schedule into a new draft campaign with its own list and senders.

> [!NOTE]
>
> Tool ID: `heyreach_clone_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_clone_campaign',
  {
    "template_campaign_id": 123,
    "name": "Example",
    "list_id": 123,
    "linkedin_account_ids": [
      123
    ]
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run heyreach_clone_campaign --input '{
  "template_campaign_id": 123,
  "name": "Example",
  "list_id": 123,
  "linkedin_account_ids": [
    123
  ]
}'
```

## 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": {
    "campaignId": 123
  }
}
```

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

## Input reference

HeyReach clone campaign input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.template_campaign_id` | `integer \| string` | Yes | — | Numeric id as integer or numeric string. |
| `payload.name` | `string` | Yes | — | Name of the new campaign, 1-50 characters. Minimum length: 1. Maximum length: 50. |
| `payload.list_id` | `integer \| string` | Yes | — | Numeric id as integer or numeric string. |
| `payload.linkedin_account_ids` | `array` | Yes | — | IDs of the LinkedIn sender accounts that run the campaign. Minimum items: 1. Maximum items: 100. |
| `payload.exclude_contacted_from_other_campaigns` | `boolean` | No | — | Skip leads already in any other campaign. |
| `payload.exclude_has_other_acc_conversations` | `boolean` | No | — | Skip leads that already talk to another of your sender accounts. |
| `payload.exclude_contacted_from_sender_in_other_campaign` | `boolean` | No | — | Skip leads these sender accounts already contacted in other campaigns. |
| `payload.exclude_list_id` | `integer \| string \| null` | No | — | ID of a list whose leads are never contacted. Must differ from list\_id. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "HeyReach clone campaign input.",
    "properties": {
      "template_campaign_id": {
        "description": "Numeric id as integer or numeric string.",
        "anyOf": [
          {
            "type": "integer",
            "minimum": 1
          },
          {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+$"
          }
        ]
      },
      "name": {
        "type": "string",
        "description": "Name of the new campaign, 1-50 characters.",
        "minLength": 1,
        "maxLength": 50
      },
      "list_id": {
        "description": "Numeric id as integer or numeric string.",
        "anyOf": [
          {
            "type": "integer",
            "minimum": 1
          },
          {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+$"
          }
        ]
      },
      "linkedin_account_ids": {
        "type": "array",
        "description": "IDs of the LinkedIn sender accounts that run the campaign.",
        "minItems": 1,
        "maxItems": 100,
        "items": {
          "description": "Numeric id as integer or numeric string.",
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "string",
              "minLength": 1,
              "pattern": "^\\d+$"
            }
          ]
        }
      },
      "exclude_contacted_from_other_campaigns": {
        "type": "boolean",
        "description": "Skip leads already in any other campaign."
      },
      "exclude_has_other_acc_conversations": {
        "type": "boolean",
        "description": "Skip leads that already talk to another of your sender accounts."
      },
      "exclude_contacted_from_sender_in_other_campaign": {
        "type": "boolean",
        "description": "Skip leads these sender accounts already contacted in other campaigns."
      },
      "exclude_list_id": {
        "description": "ID of a list whose leads are never contacted. Must differ from list_id.",
        "anyOf": [
          {
            "description": "Numeric id as integer or numeric string.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^\\d+$"
              }
            ]
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "template_campaign_id",
      "name",
      "list_id",
      "linkedin_account_ids"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.status` | `string` | Yes | — | — |
| `result.result` | `object` | Yes | — | — |
| `result.result.campaignId` | `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": {
          "campaignId": {
            "type": "integer"
          }
        },
        "required": [
          "campaignId"
        ],
        "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

* [Connect integrations](https://deepline.com/docs/integrations.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.