> ## 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 Analytics: Inputs, Cost & CLI Example

> Getting analytics for an Instantly campaign. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## 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_get_campaign_analytics:{}' --json
```

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

## Input Schema

| Name                                | Type      | Required | Default | Description |
| ----------------------------------- | --------- | -------- | ------- | ----------- |
| `payload.id`                        | `string`  | No       |         |             |
| `payload.ids`                       | `array`   | No       |         |             |
| `payload.start_date`                | `string`  | No       |         |             |
| `payload.end_date`                  | `string`  | No       |         |             |
| `payload.exclude_total_leads_count` | `boolean` | No       |         |             |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Get analytics for an Instantly campaign.",
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1
      },
      "ids": {
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "string",
          "minLength": 1
        }
      },
      "start_date": {
        "type": "string",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "end_date": {
        "type": "string",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "exclude_total_leads_count": {
        "type": "boolean"
      }
    },
    "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 campaign analytics response."
  }
  ```
</details>

## Advanced: Direct CLI

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

```bash theme={null}
deepline tools execute instantly_get_campaign_analytics --payload '{}' --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}
  > Endpoints related to analytics

  Access analytics data for your email accounts and campaigns. These endpoints provide warmup analytics, daily account performance metrics, account vitals testing, and detailed campaign analytics including overview summaries, daily breakdowns, and per-step metrics.

  ## Endpoints

  | Method | Endpoint                               | Description                        |
  | ------ | -------------------------------------- | ---------------------------------- |
  | POST   | `/api/v2/accounts/warmup-analytics`    | Get warmup analytics               |
  | GET    | `/api/v2/accounts/analytics/daily`     | Get daily account analytics        |
  | POST   | `/api/v2/accounts/test/vitals`         | Test account vitals                |
  | GET    | `/api/v2/campaigns/analytics`          | Get campaign(s) analytics          |
  | GET    | `/api/v2/campaigns/analytics/overview` | Get campaign(s) analytics overview |
  | GET    | `/api/v2/campaigns/analytics/daily`    | Get daily campaign analytics       |
  | GET    | `/api/v2/campaigns/analytics/steps`    | Get campaign steps analytics       |

  ## 90. API Key

  Source: https://developer.instantly.ai/api-reference/groups/api-key.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`.
