# List campaigns

`GET https://api.morevoice.ai/v1/campaigns`

Lists the campaigns of this mode, newest first, with each campaign's contact counts. Filter by `state` or `purpose`.

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

Operation ID: `campaigns_list`.

## Parameters

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | no | How many objects to return, 1–100 (default 20). |
| `starting_after` | `string` | no | A cursor (`next_cursor`) or object ID: return the objects after it (older). |
| `ending_before` | `string` | no | A cursor or object ID: return the objects before it (newer). |
| `state` | `"draft" \| "scheduled" \| "running" \| "paused" \| "completed" \| "cancelled"` | no | Only campaigns in this state. |
| `purpose` | `"marketing" \| "service" \| "survey"` | no | Only campaigns with this purpose. |
| `mode` | `"ai" \| "agent_preview"` | no | Only campaigns in this mode (`agent_preview`: call lists for agents). |

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

## Responses

### 200 OK

OK Returns `CampaignList`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"list"` | — |
| `data` | `Campaign[]` | — |
| `has_more` | `boolean` | Whether more objects follow in the requested direction. |
| `next_cursor` | `string \| null` | Pass as starting_after (or ending_before, when paging backwards) to continue; null on the last page. |
| `url` | `string` | The list's path. |

Example:

```json
{
  "data": [
    {
      "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"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "object": "list",
  "url": "/v1/campaigns"
}
```

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

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

for await (const campaign of mv.campaigns.list()) {
	console.log(campaign);
}
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

for campaign in client.campaigns.list():
    print(campaign)
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/campaigns \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```
