> ## 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.

# Instantly Campaign Management: Inputs, Cost & CLI Example

> Creating a new Instantly campaign with sequences, schedule, and sending accounts. Includes inputs, outputs, costs, and Deepline CLI examples for GTM automation.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=instantly_create_campaign:{"name":"{{name}}","campaign_schedule":{}}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                        | Type      | Required | Default | Description |
| --------------------------- | --------- | -------- | ------- | ----------- |
| `payload.name`              | `string`  | Yes      |         |             |
| `payload.sequences`         | `array`   | No       |         |             |
| `payload.campaign_schedule` | `object`  | Yes      |         |             |
| `payload.email_list`        | `array`   | No       |         |             |
| `payload.text_only`         | `boolean` | No       |         |             |
| `payload.stop_on_reply`     | `boolean` | No       |         |             |
| `payload.daily_limit`       | `integer` | No       |         |             |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Create a new Instantly campaign with sequences, schedule, and sending accounts.",
    "properties": {
      "name": {
        "type": "string",
        "minLength": 1
      },
      "sequences": {
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "object",
          "properties": {
            "steps": {
              "type": "array",
              "minItems": 1,
              "maxItems": 50,
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "email"
                  },
                  "delay": {
                    "type": "integer",
                    "default": 0,
                    "minimum": 0
                  },
                  "variants": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "properties": {
                        "subject": {
                          "type": "string",
                          "minLength": 1,
                          "allowsTemplatePlaceholders": true
                        },
                        "body": {
                          "type": "string",
                          "minLength": 1,
                          "allowsTemplatePlaceholders": true
                        }
                      },
                      "required": [
                        "subject",
                        "body"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "type",
                  "delay",
                  "variants"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "steps"
          ],
          "additionalProperties": false
        }
      },
      "campaign_schedule": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "schedules": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "timing": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                    },
                    "to": {
                      "type": "string",
                      "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
                    }
                  },
                  "required": [
                    "from",
                    "to"
                  ],
                  "additionalProperties": false
                },
                "days": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  }
                },
                "timezone": {
                  "type": "string",
                  "description": "Instantly-supported timezone value. Use instantly_get_campaign/list_campaigns payloads to mirror accepted values (e.g. Pacific/Auckland)."
                }
              },
              "required": [
                "name",
                "timing",
                "days",
                "timezone"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "schedules"
        ],
        "additionalProperties": false
      },
      "email_list": {
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "string",
          "minLength": 1,
          "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
        }
      },
      "text_only": {
        "type": "boolean"
      },
      "stop_on_reply": {
        "type": "boolean"
      },
      "daily_limit": {
        "type": "integer",
        "minimum": 1
      }
    },
    "required": [
      "name",
      "campaign_schedule"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

Output schema is not available yet.

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "description": "Raw Instantly create campaign response."
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute instantly_create_campaign --payload '{
  "name": "string",
  "campaign_schedule": {}
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Provider API Context

<details>
  <summary>Show provider reference (optional)</summary>

  ```md theme={null}
  > Requires one of the following scopes: `campaigns:create`, `campaigns:all`, `all:create`, `all:all`

  ## 36. Delete campaign

  Source: https://developer.instantly.ai/api-reference/campaign/delete-campaign.md
  ```
</details>

## Cost

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