# Start a campaign

`POST https://api.morevoice.ai/v1/campaigns/{id}/start`

Runs the dashboard's pre-flight checks and starts dialling (or schedules the start). A failed check answers 409 preflight_failed with the list. Once running, every call is still checked against the do-not-call list, consent, the national registry, the calling hours and Shabbat; a marketing campaign the registry can't check pauses itself (pause_reason).

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `campaigns_start`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A campaign ID (`cmp_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `Idempotency-Key` | `string` | no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |

## Request body

Optional, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `start_at` | `string \| null` | no | Start later: the campaign is scheduled and starts dialling at this time. |

Example:

```json
{}
```

## Responses

### 200 OK

OK Returns `Campaign`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | A campaign ID (prefix `cmp_`). |
| `object` | `"campaign"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `name` | `string` | — |
| `state` | `"draft" \| "scheduled" \| "running" \| "paused" \| "completed" \| "cancelled"` | draft → running ⇄ paused → completed \| cancelled (scheduled: waits for schedule.start_at). |
| `purpose` | `"marketing" \| "service" \| "survey"` | marketing needs recorded consent with evidence (§30A) and a national-registry check for Israeli numbers. |
| `assistant_id` | `string \| null` | `asst_…` ID. |
| `connection_id` | `string \| null` | The SIP connection it dials through; null: the default one. |
| `caller_id` | `string \| null` | The number presented to contacts; null: the connection's default. |
| `priority` | `integer` | 1–10; higher is served first when campaigns compete for lines. |
| `max_concurrent` | `integer` | Simultaneous calls this campaign may hold. |
| `calls_per_second` | `integer` | New calls per second; 0: only the connection limits it. |
| `schedule` | `CampaignSchedule` | When the campaign dials. |
| `schedule.timezone` | `string` | IANA time zone of the windows and of contacts without their own, e.g. Asia/Jerusalem. |
| `schedule.windows` | `CallingWindow[]` | When the campaign may dial. The organisation's calling hours apply on top: a call happens only inside both. |
| `schedule.respect_shabbat` | `boolean` | Never dial on Shabbat. The organisation's compliance settings enforce Shabbat for every campaign by default; this flag can add the restriction, never remove it. |
| `schedule.respect_holidays` | `boolean` | Never dial on Jewish holidays. Like respect_shabbat, it can only add to the organisation's setting. |
| `schedule.start_at` | `string \| null` | Planned start; null to start when started. |
| `schedule.end_at` | `string \| null` | Stop dialling after this time. |
| `ring_timeout_seconds` | `integer` | Hang up an unanswered call after this long. |
| `retry` | `CampaignRetry` | Retry policy per call result. |
| `retry.max_attempts` | `integer` | Total dial attempts per contact, the first one included. |
| `retry.busy` | `object` | — |
| `retry.no_answer` | `object` | — |
| `retry.voicemail` | `object` | An answering machine was detected. |
| `retry.declined` | `object` | — |
| `retry.failed` | `object` | Network or carrier errors and interrupted calls. |
| `amd` | `CampaignAmd` | Answering-machine detection. |
| `amd.mode` | `"off" \| "hangup" \| "leave_message"` | Answering-machine detection: off, hang up on a machine, or leave `message`. |
| `amd.message` | `string` | The voicemail message (leave_message). |
| `disclosure` | `CampaignDisclosure` | The AI and recording disclosure played at the start of each call. |
| `disclosure.enabled` | `boolean \| null` | Play the AI / recording disclosure before the first message. null: the organisation's default (on for marketing). |
| `disclosure.text` | `string` | The disclosure text; empty: the organisation's. |
| `first_message` | `string` | Overrides the assistant's first message ({{variables}} allowed); empty: the assistant's. |
| `script` | `string` | Extra instructions for this campaign ({{variables}} allowed). |
| `dispositions` | `string[]` | Outcomes the assistant can record. |
| `opt_out_dtmf_key` | `string \| null` | The key that opts a contact out; null: the organisation's. |
| `pause_reason` | `string \| null` | Why the campaign paused itself (for example, the national registry can't check it). |
| `mode` | `"ai" \| "agent_preview"` | `ai`: an assistant calls the contacts. `agent_preview`: people work the list (a call list for agents): every Available member of `queue_id` or `team_id` asks for the next contact, gets one reserved to them, sees it, then calls, skips or snoozes it. Chosen while the campaign is a draft. |
| `queue_id` | `string \| null` | mode agent_preview: the queue whose members work the list. |
| `team_id` | `string \| null` | mode agent_preview: the team whose members work the list. |
| `preview` | `CampaignPreview` | How a call list for agents (mode agent_preview) works: reservations, skips, snoozes and what each disposition does to the contact. |
| `preview.reservation_minutes` | `integer` | How long a reserved contact waits for the agent's decision before it goes back to the list. |
| `preview.max_skips` | `integer` | Skips (not now / other) per contact before it is closed as skipped. |
| `preview.skip_delay_minutes` | `integer` | A skipped contact comes back after this long. |
| `preview.max_snooze_minutes` | `integer` | The longest snooze an agent may choose. |
| `preview.wrap_up_wait_minutes` | `integer` | An answered call waits this long for the agent's disposition; without one the contact counts as done. |
| `preview.retry_delay_minutes` | `integer` | A disposition whose outcome is `retry` calls the contact again after this long (inside the calling windows, within the retry policy's max_attempts). |
| `preview.outcomes` | `Record<string, "done" \| "retry" \| "dnc" \| "wrong-number">` | Disposition → outcome (`done`, `retry`, `dnc`, `wrong-number`), over the built-in map (an unknown disposition: done). |
| `stats` | `CampaignStats` | Contact counts per status and the calls in progress. |
| `stats.total` | `integer` | Contacts in the campaign. |
| `stats.finished` | `integer` | Contacts that will not be dialled again (done, failed, do-not-call, skipped, invalid, cancelled). |
| `stats.by_status` | `object` | Contacts per status. |
| `stats.live` | `object` | Calls in progress right now (this server's dialer). |
| `created_at` | `string` | An ISO-8601 timestamp in UTC. |
| `updated_at` | `string` | An ISO-8601 timestamp in UTC. |
| `started_at` | `string \| null` | — |
| `completed_at` | `string \| null` | — |

Example:

```json
{
  "amd": {
    "message": "",
    "mode": "off"
  },
  "assistant_id": "asst_3kTzL9Qe2R",
  "caller_id": "+97235550100",
  "calls_per_second": 0,
  "completed_at": null,
  "connection_id": "conn_8DbH2nXy",
  "created_at": "2026-11-01T08:00:00.000Z",
  "disclosure": {
    "enabled": null,
    "text": ""
  },
  "dispositions": [
    "interested",
    "not-interested",
    "callback-requested"
  ],
  "first_message": "",
  "id": "cmp_2Yb7mCq9aPLk",
  "livemode": true,
  "max_concurrent": 10,
  "mode": "ai",
  "name": "November renewals",
  "object": "campaign",
  "opt_out_dtmf_key": null,
  "pause_reason": null,
  "preview": {
    "max_skips": 3,
    "max_snooze_minutes": 1440,
    "outcomes": {},
    "reservation_minutes": 5,
    "retry_delay_minutes": 60,
    "skip_delay_minutes": 60,
    "wrap_up_wait_minutes": 10
  },
  "priority": 5,
  "purpose": "marketing",
  "queue_id": null,
  "retry": {
    "busy": {
      "delay_minutes": 15,
      "enabled": true
    },
    "declined": {
      "delay_minutes": 240,
      "enabled": false
    },
    "failed": {
      "delay_minutes": 10,
      "enabled": true
    },
    "max_attempts": 3,
    "no_answer": {
      "delay_minutes": 60,
      "enabled": true
    },
    "voicemail": {
      "delay_minutes": 120,
      "enabled": true
    }
  },
  "ring_timeout_seconds": 30,
  "schedule": {
    "end_at": null,
    "respect_holidays": true,
    "respect_shabbat": true,
    "start_at": null,
    "timezone": "Asia/Jerusalem",
    "windows": [
      {
        "days": [
          "sun",
          "mon",
          "tue",
          "wed",
          "thu"
        ],
        "end": "20:00",
        "start": "09:00"
      },
      {
        "days": [
          "fri"
        ],
        "end": "13:00",
        "start": "09:00"
      }
    ]
  },
  "script": "Offer the {{plan}} renewal at the loyalty price.",
  "started_at": "2026-11-02T07:00:00.000Z",
  "state": "running",
  "stats": {
    "by_status": {
      "callback": 3,
      "cancelled": 0,
      "dialing": 5,
      "dnc": 9,
      "done": 120,
      "failed": 6,
      "invalid": 1,
      "pending": 812,
      "scheduled": 40,
      "skipped": 4
    },
    "finished": 140,
    "live": {
      "connected": 1,
      "dialing": 2,
      "ringing": 2
    },
    "total": 1000
  },
  "team_id": null,
  "updated_at": "2026-11-02T07:00:00.000Z"
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 409 Conflict

The request conflicts with the object's state, or the Idempotency-Key was reused with other parameters. Returns `ErrorEnvelope`.

### 413 Payload Too Large

The request body is larger than the endpoint accepts, or has more parts or files than it takes. Returns `ErrorEnvelope`.

### 415 Unsupported Media Type

The request body's Content-Type is not one the endpoint takes. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const campaign = await mv.campaigns.start("cmp_7Hk2Lm9Qp", {});
console.log(campaign);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

campaign = client.campaigns.start("cmp_7Hk2Lm9Qp", {})
print(campaign)
```

**cURL**

```sh
curl -X POST https://api.morevoice.ai/v1/campaigns/cmp_7Hk2Lm9Qp/start \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
```
