> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rasen.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rasen.ai/_mcp/server.

# Campaign lifecycle

> Know which campaign command each state accepts, what each campaign and recipient state means, and when Rasen redials, suppresses or holds a recipient.

## Summary

This page gives the states of a campaign and of its recipients, and the commands that each
campaign state accepts. It also covers redial, retry, suppression and calling windows. It does not
cover how to create and run a campaign; see [Run an outbound campaign](/guides/campaigns).

## Facts

| Item                             | Value                                                                                                                                                                  |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Create operations                | `createCampaign` (`POST /campaigns`), `uploadCampaign` (`POST /campaigns/upload`)                                                                                      |
| Command operations               | `planCampaign`, `admitCampaign`, `startCampaign`, `pauseCampaign`, `resumeCampaign`, `retryCampaign`, `cancelCampaign`, each `POST /campaigns/{campaign_id}/<command>` |
| Read operations                  | `getCampaign`, `listCampaigns`, `listCampaignRecipients`                                                                                                               |
| Suppression operation            | `suppressCampaignDestination` (`POST /campaign-suppressions`)                                                                                                          |
| Command headers                  | `If-Match` with the campaign's current `ETag`, and a new `Idempotency-Key`                                                                                             |
| Campaign `state` values          | `draft`, `planned`, `admitted`, `dialing`, `paused`, `stalled`, `completed`, `failed`, `cancelled`. Open vocabulary                                                    |
| Terminal campaign states         | `completed`, `failed`, `cancelled`                                                                                                                                     |
| Recipient `state` values         | `pending`, `dialing`, `reached`, `exhausted`, `suppressed`, `cancelled`                                                                                                |
| Row outcomes of a recipient list | `accepted`, `invalid`, `duplicate`, `suppressed`, `removed`                                                                                                            |
| `max_attempts_per_recipient`     | 1 to 10, default 1                                                                                                                                                     |
| `retry_backoff_ms`               | Default 3600000 (1 hour)                                                                                                                                               |
| `max_concurrent_calls`           | 1 to 1000, default 1. `planCampaign` lowers it to the workspace's concurrent-call entitlement when that is lower                                                       |
| Stall                            | After 180 seconds without dialing progress                                                                                                                             |
| `dialing_time_zone`              | An IANA time zone name, default `UTC`                                                                                                                                  |

## Campaign states

| `state`     | Meaning                                                                                                                   | Terminal | What happens next                                                                                                               |
| ----------- | ------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `draft`     | Rasen saved the campaign and its recipients. Nothing dials.                                                               | No       | `planCampaign` makes it `planned`.                                                                                              |
| `planned`   | The plan froze the recipients, the agent's live version, the settings and the concurrency ceiling.                        | No       | `admitCampaign` makes it `admitted`.                                                                                            |
| `admitted`  | Admission checked the quota for the planned dials.                                                                        | No       | `startCampaign` makes it `dialing`.                                                                                             |
| `dialing`   | Rasen dials the recipients that are due.                                                                                  | No       | `completed` when no recipient remains to dial. `stalled` after 180 seconds without progress. `pauseCampaign` makes it `paused`. |
| `paused`    | You paused it. Rasen places no new dial, and the recipients wait.                                                         | No       | `resumeCampaign` makes it `dialing`.                                                                                            |
| `stalled`   | Rasen moved it here because dialing made no progress for 180 seconds. No recipient changes, and Rasen places no new dial. | No       | `dialing` again on its own when dialing progresses.                                                                             |
| `completed` | Every recipient is in a final state.                                                                                      | Yes      | `retryCampaign` reopens it to `dialing`.                                                                                        |
| `failed`    | The campaign ended in failure. `failure_reason` says why.                                                                 | Yes      | `retryCampaign` reopens it to `dialing`.                                                                                        |
| `cancelled` | You cancelled it.                                                                                                         | Yes      | Nothing. Create a new campaign to call the recipients again.                                                                    |

`cancelCampaign` moves every state that is not terminal to `cancelled`.

## Commands in each state

Each cell gives the state after the command, or the error code of its refusal (`409`).

| State       | `plan`      | `admit`       | `start`       | `pause`       | `resume`     | `retry`            | `cancel`           |
| ----------- | ----------- | ------------- | ------------- | ------------- | ------------ | ------------------ | ------------------ |
| `draft`     | `planned`   | `not_planned` | `not_planned` | `not_dialing` | `not_paused` | `not_planned`      | `cancelled`        |
| `planned`   | `not_draft` | `admitted`    | `not_planned` | `not_dialing` | `not_paused` | `not_planned`      | `cancelled`        |
| `admitted`  | `not_draft` | `not_planned` | `dialing`     | `not_dialing` | `not_paused` | `not_planned`      | `cancelled`        |
| `dialing`   | `not_draft` | `not_planned` | `not_planned` | `paused`      | `not_paused` | `dialing`          | `cancelled`        |
| `paused`    | `not_draft` | `not_planned` | `not_planned` | `not_dialing` | `dialing`    | `paused`           | `cancelled`        |
| `stalled`   | `not_draft` | `not_planned` | `not_planned` | `not_dialing` | `not_paused` | `not_planned`      | `cancelled`        |
| `completed` | `not_draft` | `not_planned` | `not_planned` | `not_dialing` | `not_paused` | `dialing`          | `already_terminal` |
| `failed`    | `not_draft` | `not_planned` | `not_planned` | `not_dialing` | `not_paused` | `dialing`          | `already_terminal` |
| `cancelled` | `not_draft` | `not_planned` | `not_planned` | `not_dialing` | `not_paused` | `already_terminal` | `already_terminal` |

A command checks other conditions before the state, so it can answer another code first:

| Code                                             | When                                                                                                                               |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| `revision_required` (`428`)                      | The command has no `If-Match`.                                                                                                     |
| `conflict` with `details.reason: stale_revision` | The campaign changed since your read.                                                                                              |
| `agent_not_published`                            | The agent has no published version.                                                                                                |
| `conflict`                                       | The agent's live version or the outbound number changed since the plan. `retryCampaign` also answers it when no recipient matched. |
| `no_recipients`                                  | `admitCampaign` or `startCampaign` found no `pending` recipient.                                                                   |
| `quota_exceeded` (`429`)                         | `admitCampaign` or `retryCampaign` asked for more dials than the quota allows.                                                     |

## Recipient states

| `state`      | Meaning                                                                                                          | Final                                 |
| ------------ | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `pending`    | The recipient waits for a dial. `next_attempt_at` is the earliest time.                                          | No                                    |
| `dialing`    | A dial is in progress, or its outcome is not known yet.                                                          | No                                    |
| `reached`    | A person or a voicemail answered a dial.                                                                         | Yes, until `retryCampaign` selects it |
| `exhausted`  | The attempts ran out without an answer.                                                                          | Yes, until `retryCampaign` selects it |
| `suppressed` | Rasen does not dial this recipient. `suppression_reason` says why, for example `do_not_call` or `window_closed`. | Yes                                   |
| `cancelled`  | You cancelled the campaign before Rasen dialed this recipient.                                                   | Yes                                   |

`attempts` on a recipient lists each dial, with its `disposition` and `call_session_id`. Each
attempt is a call: read it with `getCall`.

## Row outcomes

`checkCampaignRecipients` and `uploadCampaign` give each row of a recipient list one outcome.
`checkCampaignRecipients` saves nothing.

| Outcome      | Meaning                                                                        |
| ------------ | ------------------------------------------------------------------------------ |
| `accepted`   | A valid E.164 number and valid variable names. The row becomes a recipient.    |
| `invalid`    | The number is not valid E.164. Rasen reports the row and does not dial it.     |
| `duplicate`  | The same destination (`dial_key`) is already in the list. Rasen keeps one row. |
| `suppressed` | The destination is on the workspace's suppression list.                        |
| `removed`    | A `remove` edit in `recipient_edits` removed the row.                          |

## Redial and retry

Rasen redials a recipient on its own only within the campaign's attempt budget:

| Outcome of the last dial                                                                  | What Rasen does                                                                                                                        |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `answered` or `voicemail`                                                                 | The recipient is `reached`. Rasen does not dial it again.                                                                              |
| `no_answer`, `busy`, `rejected`, `invalid_number`, `failed`, `cancelled`, `indeterminate` | The recipient is `pending` again after `retry_backoff_ms`, while `attempts_made` is below `max_attempts`. Otherwise it is `exhausted`. |
| Not known (the dial may or may not have reached the carrier)                              | Rasen holds the recipient in `dialing`. It never redials an uncertain dial on its own.                                                 |

`retryCampaign` dials recipients again on your request:

* Without `dispositions`, it selects the recipients whose last outcome was not `answered`, within
  their remaining attempts.
* With `dispositions`, it selects exactly those outcomes, `answered` too, and adds one attempt
  when a recipient has none left. An empty list selects nothing.
* It never selects a recipient that is `suppressed`, `cancelled`, still in a call, or held after an
  uncertain dial.
* The answer's `retry` object gives `selected`, `retried` and `budget_exhausted`.
* A retry of a `completed` or `failed` campaign reopens it to `dialing`. A retry of a `dialing` or
  `paused` campaign keeps its state.

## Suppression

`suppressCampaignDestination` adds a number to the workspace's suppression list, with `reason`
`do_not_call` or `opt_out`. No operation removes it: a suppression is permanent. A number that is
already on the list answers `added: false`.

Rasen checks the list when you create a campaign, and again before every dial. A recipient whose
number is on the list becomes `suppressed`, also in a campaign that is already `dialing`.

## Calling windows

| Field                                       | Meaning                                                                                                                                       |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `window_start_at`                           | The earliest time the campaign dials. `null` dials at once.                                                                                   |
| `window_end_at`                             | The time after which the campaign never dials.                                                                                                |
| `daily_opens_minute`, `daily_closes_minute` | The daily hours, in minutes after local midnight (0 to 1440) in `dialing_time_zone`. Send both or neither; the opening is before the closing. |
| `dialing_time_zone`                         | The IANA time zone of the daily hours, default `UTC`.                                                                                         |

Rasen checks the window before each dial. Outside the daily hours, recipients stay `pending` until
the next opening. After `window_end_at`, the `pending` recipients become `suppressed` with
`suppression_reason` `window_closed`. Without daily hours, Rasen dials at any time of day.

The daily hours apply on every day of the week, weekends included. A campaign has no weekday
field. To skip a day, pause the campaign before it (`pauseCampaign`) and resume it after
(`resumeCampaign`).

`planCampaign` answers `ceiling` and `window`. `ceiling` gives `effective`, `requested`,
`workspace_entitlement` and `source`. `window.disposition` is `open`, `hold` (with
`next_opening`) or `closed` (with a `reason`).

## Cancel and pause

* `cancelCampaign` places no new dial. Calls already placed run to their end.
* Each `pending` recipient becomes `cancelled`. A recipient in `dialing` becomes `cancelled` when
  its dial ends without an answer.
* `pauseCampaign` places no new dial and leaves every recipient as it is. Calls already placed run
  to their end.
* `pauseCampaign` and `resumeCampaign` refuse a `stalled` campaign. Wait for it to return to
  `dialing`, or cancel it.

## Rules

* MUST send the campaign's current `ETag` in `If-Match` and a new `Idempotency-Key` with each
  command.
* MUST read the campaign again after a refusal, and check its `state` before the next command.
* MUST NOT send `startCampaign` after a refused plan or admission.
* MUST treat a suppression as permanent. No operation removes a number from the list.
* MUST NOT treat a recipient in `dialing` as safe to call again. Rasen holds an uncertain dial and
  never redials it on its own.
* MUST keep an unknown campaign or recipient `state`, and never read it as success.

## Related

* [Run an outbound campaign](/guides/campaigns)
* [Call lifecycle](/concepts/call-lifecycle)
* [Revisions and ETags](/concepts/revisions)
* [Limits and quotas](/concepts/limits)
* [Errors](/concepts/errors)