> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threetone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Campaigns

> Plan outbound calling at scale: a calling policy, campaigns of leads, calls, and attention items. Campaigns are not available yet.

> [!NOTE]
>
> **Not available yet.** Campaigns are switched off by default, so creating a campaign or adding leads is refused, and no calls are placed. This guide describes the campaign API so you can plan an integration. It will say when campaigns can place calls.

A campaign calls a list of people with one agent, within the hours you allow, and keeps a record of every call and what it decided next. Campaigns are the planned replacement for [batch calls](https://docs.threetone.in/agents-platform/deploy/batch-calls.md).

The sections on calling windows, retries and follow-ups describe the policy a campaign stores and how its calls are to be placed once campaigns can dial.

## How a campaign is organized

| Object | What it is |
| - | - |
| Configuration | One per workspace: the default policy new campaigns take, with optional overrides per agent. It has a `version` that increases with every save |
| Campaign | One outreach with one agent and one calling number. It takes a copy of its policy when it is created, and that copy never changes |
| Lead | One person the campaign calls. A lead has up to six numbers, its own timezone if you set one, and dynamic variables for its calls |
| Call | One planned or placed call to a lead: the first call, a retry, a callback or a redirect |
| Attention item | A problem that holds some calls back until someone acts, such as an agent that is no longer available. The rest of the campaign carries on |

## Simple and advanced campaigns

Choose with `variant` when you create a campaign:

| `variant` | Behavior |
| - | - |
| `simple` | One call per lead, at any hour of any day, with no retries and no follow-ups. It cannot be combined with `policy` |
| `advanced` | Uses the `policy` you send, or else the workspace configuration. Calling windows, retries, callbacks and redirects apply. The default for phone campaigns |

Advanced campaigns are switched on separately from campaigns as a whole. A workspace that may create campaigns but not advanced ones gets `403 feature_not_available` for `variant: advanced`.

Campaigns call over a phone number. The contract also describes WhatsApp campaigns, but they are refused for every workspace with `403 feature_not_available`.

## The calling policy

Save a default policy for your workspace with [Replace campaign configuration](https://docs.threetone.in/api-reference/agents-platform/replace-campaign-configuration.md). Send the `version` you last read as `expected_version`, or leave it out to create the first configuration. If someone saved in between, the save is refused with `409 outbound_campaign_state_conflict`; read the configuration again with [Get campaign configuration](https://docs.threetone.in/api-reference/agents-platform/get-campaign-configuration.md) and retry. Before the first save, reading it answers `404 outbound_campaign_config_not_found`.

A campaign's policy is worked out once, when the campaign is created, in this order. Each layer replaces whole sections (timezone, retries, calling windows, date overrides, data collection, follow-up context) rather than single fields:

1. The workspace `policy`.
2. The override for the campaign's agent in `agent_policies`, if there is one.
3. A `policy` sent with the campaign, which wins over both.

An advanced campaign sent without a `policy` needs a saved configuration; without one it is refused with `404 outbound_campaign_config_not_found`. Changing the configuration later changes only campaigns created afterwards.

```json theme={null}
{
  "expected_version": 3,
  "config": {
    "policy": {
      "timezone": "Asia/Kolkata",
      "retry": {
        "retry_delay_seconds": 600,
        "max_short_retries": 1,
        "max_total_calls": 6,
        "max_callbacks": 2,
        "max_redirects": 2,
        "interval_placement": "start"
      },
      "calling_periods": [
        {
          "weekdays": [0, 1, 2, 3, 4],
          "intervals": [
            { "start": "10:00", "end": "12:00" },
            { "start": "16:00", "end": "18:00" }
          ]
        }
      ],
      "date_overrides": [
        { "start_date": "2026-12-25", "end_date": "2026-12-25", "intervals": [], "name": "Christmas" }
      ]
    },
    "agent_policies": {}
  }
}
```

### Calling windows and date overrides

`calling_periods` are the weekly windows calls may be placed in. Weekdays run from `0` (Monday) to `6` (Sunday). Times are local `HH:MM` in the policy's `timezone`; `24:00` ends a window at midnight. Each period needs at least one weekday and one interval, an interval must end after it starts, and windows may not overlap on any day, also across periods.

Without your own windows, the policy uses Monday to Friday, 10:00 to 12:00 and 16:00 to 18:00, in `UTC`. Set `timezone` to where your contacts are.

`date_overrides` replace the weekly windows on the dates they cover, from `start_date` to `end_date` inclusive. An empty `intervals` list means no calls on those days, for a holiday. Date ranges may not overlap.

A call that comes due outside a window moves to the start of the next window. Windows are read in the lead's `timezone_override` when you set one, then the campaign's `timezone`, then the policy's. A callback the contact asked for is placed at the time they asked for, even outside the windows.

### Retries

`retry` limits how persistent a campaign is with each lead:

| Field | Default | Meaning |
| - | - | - |
| `max_total_calls` | `6` | The most calls a lead gets, counting the first. 1 to 30 |
| `max_short_retries` | `1` | Retries a window allows after a failed call. Once used up, the next retry waits for the following window |
| `retry_delay_seconds` | `600` | How long to wait before a short retry |
| `max_callbacks` | `2` | The most callbacks to honor for one number |
| `max_redirects` | `2` | The most times a lead follows a request to call another number |
| `max_consecutive_failures_per_number` | Unset | Failed calls in a row on one number before the lead moves to its next number, or ends when there is none. Unset leaves only `max_total_calls` |
| `interval_placement` | `start` | Where a call pushed into a later window lands: at its `start`, at a `random` time, or `rotate`d past where the last failed call in that window was |
| `rotate_step_seconds` | `900` | How far `rotate` moves each call |

Short retries, callbacks and redirects must each stay below `max_total_calls`, and `max_consecutive_failures_per_number` may not exceed it.

### Follow-ups

The `data_collection` section names the agent's [data collection](https://docs.threetone.in/agents-platform/monitor/analysis/data-collection.md) items that steer follow-up calls: `callback_time` (when the contact asked to be called back), `redirect_phone_number` (another number they gave) and `stop` (they asked not to be called again). Each defaults to a built-in item; set one to `null` to turn it off. `mappings` copies other data collection results into [dynamic variables](https://docs.threetone.in/agents-platform/configure/personalization/dynamic-variables.md) for later calls. A mapping's variable name may not be empty or start with `campaign__`.

`followup_context` chooses which variables a follow-up call receives: `campaign__call_type`, `campaign__previous_conversation_id`, `campaign__previous_summary` and `campaign__previous_transcript`. Each is on by default. Use them in the agent's prompt so a retry or callback continues the earlier conversation.

## Create a campaign

Call [Create a campaign](https://docs.threetone.in/api-reference/agents-platform/create-a-campaign.md) with the agent, the number to call from, and the recipients. Each recipient becomes a lead.

```bash theme={null}
curl -X POST "https://api.threetone.in/v1/convai/outbound-campaigns/campaigns/submit" \
  -H "x-api-key: $THREETONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "call_name": "December renewals",
    "agent_id": "agent_3701kwyb5spce24t3h8gpqpsy6zh",
    "variant": "simple",
    "idempotency_key": "renewals-2026-12-01",
    "channel_config": {
      "channel": "phone",
      "agent_phone_number_id": "phnum_X3Pbu5gP6NNKBscdCdwB"
    },
    "recipients": [
      {
        "id": "customer-1042",
        "phone_number": "+919876543210",
        "conversation_initiation_client_data": {
          "dynamic_variables": { "first_name": "Asha" }
        }
      }
    ]
  }'
```

While campaigns are switched off, this request is refused with `503 outbound_campaigns_unavailable`. A workspace that is not switched on for campaigns gets `403 feature_not_available`.

Leave out `scheduled_time_unix` to start now, or set it to start later. A time in the past starts at once. The response has the `campaign`, `created`, and `within_calling_window`, which says whether calling starts right away or waits for the next window.

Before the campaign is written, every recipient is checked. If any can't be called, nothing is created and the answer is `400 outbound_campaign_invalid_recipients`. The error's `data.invalid_rows` lists every bad row at once, by its position in `recipients`:

```json theme={null}
{
  "invalid_rows": [
    { "row_index": 3, "errors": [{ "input_key": "phone_number", "error": "invalid" }] }
  ]
}
```

`error` is `missing`, `invalid` or `not_allowed`. See [Errors](https://docs.threetone.in/api-reference/errors.md) for the rest of the error body. Other refusals at create: `403 outbound_campaign_zero_retention` for an agent in [zero-retention mode](https://docs.threetone.in/agents-platform/monitor/privacy/zero-retention.md), because a campaign stores lead and call state, and `403 outbound_campaigns_terms_not_accepted` until the workspace accepts the terms below.

### Repeating a create request

A create request is safe to retry. Send an `idempotency_key` and a repeat with the same key and the same body returns the campaign it created, with `created: false` and status `200` instead of `201`. The same key with a different body is refused with `409 outbound_campaign_idempotency_key_reused`; send a new key to create another campaign. Without a key, a repeat of the same body returns the matching campaign while that campaign has not finished.

### Adding leads

[Add campaign leads](https://docs.threetone.in/api-reference/agents-platform/add-campaign-leads.md) adds up to 10,000 recipients to a campaign that is not `stopping`, `stopped` or `failed`. A recipient whose `id` the campaign already has is skipped, so retrying an addition with ids is safe; recipients without an `id` are always added. Adding leads to a `completed` campaign makes it active again.

## Statuses

| `status` | Meaning |
| - | - |
| `active` | Placing calls, or waiting for the next window or a scheduled start. There is no separate scheduled status |
| `paused` | Places no new calls. Calls already placed carry on |
| `attention` | An open attention item holds some calls back; the rest go ahead |
| `stopping` | Stopped, while calls already placed finish |
| `stopped` | Stopped for good |
| `completed` | No lead is left to call |
| `failed` | The campaign could not continue |

| Change | Allowed from | Effect |
| - | - | - |
| [Pause](https://docs.threetone.in/api-reference/agents-platform/pause-a-campaign.md) | `active`, `attention` | No new calls until resumed |
| [Resume](https://docs.threetone.in/api-reference/agents-platform/resume-a-campaign.md) | `paused` | Back to `active`, or to `attention` while open items remain. Held calls whose cause is gone are queued again |
| [Stop](https://docs.threetone.in/api-reference/agents-platform/stop-a-campaign.md) | `active`, `paused`, `attention` | Queued calls are cancelled and no lead is called again. `202` with `stopping` while placed calls finish. Stopping a stopped campaign changes nothing |

A change the status doesn't allow is refused with `409 outbound_campaign_state_conflict`. A campaign can't be edited or deleted after it is created; stop it and create another. [Pause all campaigns](https://docs.threetone.in/api-reference/agents-platform/pause-all-campaigns.md) and [Stop all campaigns](https://docs.threetone.in/api-reference/agents-platform/stop-all-campaigns.md) act on every campaign of the workspace at once and list the campaigns they changed.

Resume, like create and add leads, is refused while campaigns are switched off for the platform or the workspace, or while the workspace has not accepted the current terms. Pause, stop and removing a lead always work.

### Attention items

[List campaign attention items](https://docs.threetone.in/api-reference/agents-platform/list-campaign-attention-items.md) shows what holds calls back. `reason` is one of `agent_branch_unavailable`, `agent_unavailable`, `calling_terms_not_accepted`, `concurrency_limit_exceeded`, `phone_number_unavailable`, `zero_retention_enabled` or `credits_exhausted`, and `detail` explains it. Fix the cause, then:

* [Retry](https://docs.threetone.in/api-reference/agents-platform/retry-a-campaign-attention-item.md) an item that is `retryable`. It checks the cause again and places the held calls. If the cause is still there, it answers `409 outbound_campaign_attention_unresolved` and the item stays open.
* [Resolve](https://docs.threetone.in/api-reference/agents-platform/resolve-a-campaign-attention-item.md) an item that can't be retried, with a `resolution` saying how you handled it.

## Removing a recipient and do-not-call

[Remove a campaign lead](https://docs.threetone.in/api-reference/agents-platform/remove-a-campaign-lead.md) stops a campaign from ever calling that lead again, in any campaign status. Its waiting call is cancelled and the lead is marked `do_not_call`. If a call was already handed off for dialing, the answer is `202` with `has_calls_in_flight: true`, because that call may still go through. Removing the last lead left to call completes the campaign.

A lead is also marked `do_not_call` when the campaign is stopped, or when the contact asks not to be called again (the `stop` data collection item). A number whose contact asked not to be called is skipped if you add it to the same campaign again. Do-not-call belongs to the campaign: it does not carry over to other campaigns, so keep your own list and leave those numbers out of new campaigns.

## Track a campaign

| To see | Use |
| - | - |
| Lead and call counts | [Get campaign progress](https://docs.threetone.in/api-reference/agents-platform/get-campaign-progress.md) |
| Callbacks and redirects contacts asked for | [Get campaign follow-up requests](https://docs.threetone.in/api-reference/agents-platform/get-campaign-follow-up-requests.md) |
| Each lead, its counters and how it ended | [List campaign leads](https://docs.threetone.in/api-reference/agents-platform/list-campaign-leads.md) and [Get a campaign lead](https://docs.threetone.in/api-reference/agents-platform/get-a-campaign-lead.md) |
| Each call, its result and the decision taken after it | [List campaign calls](https://docs.threetone.in/api-reference/agents-platform/list-campaign-calls.md) |
| A file of the calls | [Export campaign calls](https://docs.threetone.in/api-reference/agents-platform/export-campaign-calls.md) |

Lists return up to `page_size` items (1 to 500, default 100). Pass `next_cursor` as `cursor` while `has_more` is true.

## The recipients file

In the dashboard you upload recipients as a file instead of sending them in a request:

* **CSV only**, UTF-8, comma-separated. Save a spreadsheet as CSV UTF-8 first.
* **Up to 10,000 rows and 4 MB.**
* **Numbers with a leading `+`** and the country code, such as `+919876543210`.
* `phone_number` is required for a phone campaign. `phone_number_2` to `phone_number_5` add up to four more numbers, tried in order.
* `user_id` and `timezone_override` (an IANA name such as `Asia/Kolkata`) are optional. `language`, `first_message`, `prompt` and `voice_id` override the agent for that recipient when the agent allows those overrides.
* Every other column is a dynamic variable with the column's name. Headers are matched exactly, and a column may not start with `system__`, `campaign__` or `secret__`.

## Outbound communications terms

Before a workspace can create campaigns, add leads or resume a campaign, a workspace admin must accept the outbound communications terms in the dashboard. This covers requests made with API keys too. Until then those requests are refused with `403 outbound_campaigns_terms_not_accepted`. Any member can accept for themselves, but only an admin's acceptance unlocks the workspace. When the terms change, an admin must accept the new version before new work is accepted.

You remain responsible for calling only people who agreed to be called, at hours the law allows where they live, and for telling them they are speaking with an AI agent. See [call consent](https://docs.threetone.in/agents-platform/legal/call-consent.md) and [AI disclosure](https://docs.threetone.in/agents-platform/legal/ai-disclosure.md).

## Limits

| Item | Limit |
| - | - |
| Recipients per create or add-leads request | 1 to 10,000 |
| Numbers per lead | `phone_number` and up to 5 more in `phone_numbers` through the API; up to 5 in all from the dashboard file |
| Campaign name, `call_name` | 1 to 256 characters |
| `idempotency_key` | 1 to 256 characters |
| `target_concurrency_limit` | 1 to 1,000 calls at once |
| `scheduled_time_unix` | Before 1 January 2100 |
| Ring time, `ringing_timeout_secs` | 1 to 999 seconds, default 60 |
| Calls per lead, `max_total_calls` | 1 to 30, default 6 |
| Short retries, callbacks, redirects | 0 to 30 each and below `max_total_calls`; defaults 1, 2 and 2 |
| Date overrides | At most 100, ranges not overlapping; a name of up to 100 characters |
| List `page_size` | 1 to 500, default 100 |

## Frequently asked questions

> [accordion] Can I create a campaign today?
>
> No. Campaigns are switched off by default, and no workspace places calls with them yet. Create and add-leads requests are refused while campaigns are off. This page will say when that changes.

> [accordion] Can I change a running campaign's policy?
>
> No. A campaign keeps the policy it took when it was created. Save a new configuration and create a new campaign; stop the old one if you no longer need it.

> [accordion] What happens to batch calling?
>
> Nothing changes yet. The batch calling pages stay as they are. Campaigns are planned to replace batch calling for outbound calling at scale.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.