# List Campaigns

`GET https://api.inboxjot.com/v1/campaigns`

Lists the campaigns of the workspace, newest first. Needs a Full key. A key limited to one domain answers 403.

Lists are paged with cursors. Read `next_cursor` and send it as `after` for the next page. A page has 50 items unless you set `per_page`, up to 100.

## Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Text to find in the name, up to 200 characters. |
| `status` | string | No | One status or a comma-separated list: `draft`, `scheduled`, `sending`, `paused`, `failed`, `sent` or `canceled`. |
| `sort` | string | No | `sent` or `name`. By default campaigns sort by when they started, are scheduled or were created. |
| `direction` | string | No | `asc` or `desc`. Defaults to `desc`. |
| `per_page` | integer | No | How many items to return, from 1 to 100. Defaults to 50. |
| `after` | string | No | A `next_cursor` from the last page. Returns the items after it. |
| `before` | string | No | A `prev_cursor` from the last page. Returns the items before it. When you send both, `before` wins. |

## Response

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | No | The campaigns on this page. |
| `data[].id` | string | No | The campaign id. |
| `data[].name` | string | No | The campaign name. |
| `data[].status` | string | No | `draft`, `scheduled`, `sending`, `paused`, `failed`, `sent` or `canceled`. |
| `data[].subject` | string | No | The subject. |
| `data[].include_segments` | object[] | No | The segments it sends to. |
| `data[].include_segments[].id` | string | No | The id. |
| `data[].include_segments[].name` | string | No | The name. |
| `data[].exclude_segments` | object[] | No | The segments it leaves out. |
| `data[].exclude_segments[].id` | string | No | The id. |
| `data[].exclude_segments[].name` | string | No | The name. |
| `data[].topic` | object \| null | No | The topic. |
| `data[].topic.id` | string | No | The id. |
| `data[].topic.name` | string | No | The name. |
| `data[].audience_count` | integer \| null | No | How many contacts the campaign goes to, once it starts. |
| `data[].queued_count` | integer | No | Emails queued so far. |
| `data[].skipped_count` | integer | No | Contacts skipped, such as suppressed addresses. |
| `data[].paused_reason` | string \| null | No | Why a paused campaign stopped: `manual`, `daily_limit`, `warmup`, `sending_paused` or `domain_unverified`. |
| `data[].scheduled_at` | string \| null | No | When a scheduled campaign starts. |
| `data[].started_at` | string \| null | No | When sending started. |
| `data[].completed_at` | string \| null | No | When sending finished. |
| `data[].created_at` | string | No | When it was created. |
| `data[].updated_at` | string | No | When it last changed. |
| `data[].stats` | object \| null | No | Results once the campaign has sent. |
| `data[].stats.delivered` | integer | No | Delivered. |
| `data[].stats.opened` | integer | No | Opened. |
| `data[].stats.clicked` | integer | No | Clicked. |
| `prev_cursor` | string \| null | No | Send it as `before` to get the page before. `null` on the first page. |
| `next_cursor` | string \| null | No | Send it as `after` to get the next page. `null` on the last page. |

## Request

cURL:

```bash
curl -X GET https://api.inboxjot.com/v1/campaigns \
  -H "Authorization: Bearer $INBOXJOT_API_KEY"
```

## Responses

| Status | Description |
| --- | --- |
| 200 | Returns a page of campaigns. |
| 400 | A parameter is missing or invalid. |
| 401 | The API key is missing, revoked or expired. |
| 403 | The key is a Sending key or is limited to one domain, or the request comes from outside its IP allowlist. |
| 429 | Too many requests for this key. Wait for the seconds in the Retry-After header. |
| 500 | Something failed on our side. Retry later. |

200:

```json
{
  "data": [
    {
      "id": "cpg_06d2mfk8r7hm4ps9wb2kd",
      "name": "October product update",
      "status": "sent",
      "subject": "What’s new in October",
      "include_segments": [
        {
          "id": "seg_06d2mfk8r2kd7fq4mx9ab",
          "name": "Customers"
        }
      ],
      "exclude_segments": [],
      "topic": {
        "id": "top_06d2mfk8r6pn2tc8yw3hd",
        "name": "Product updates"
      },
      "audience_count": 1204,
      "queued_count": 1204,
      "skipped_count": 6,
      "paused_reason": null,
      "scheduled_at": null,
      "started_at": "2026-10-21T09:00:00.000Z",
      "completed_at": "2026-10-21T09:04:12.000Z",
      "stats": {
        "delivered": 1196,
        "opened": 538,
        "clicked": 141
      },
      "created_at": "2026-10-20T15:30:00.000Z",
      "updated_at": "2026-10-21T09:04:12.000Z"
    }
  ],
  "prev_cursor": null,
  "next_cursor": null
}
```

400:

```json
{
  "name": "validation_error",
  "status": 400,
  "message": "Invalid cursor",
  "errors": [
    {
      "message": "Invalid cursor",
      "location": "after"
    }
  ],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

401:

```json
{
  "name": "unauthorized",
  "status": 401,
  "message": "Unauthorized",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

403:

```json
{
  "name": "forbidden",
  "status": 403,
  "message": "This key cannot be used from 203.0.113.7",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

429:

```json
{
  "name": "rate_limit_exceeded",
  "status": 429,
  "message": "Too many attempts. Try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

500:

```json
{
  "name": "unknown_error",
  "status": 500,
  "message": "Something went wrong. Please try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```
