Skip to Content

List campaigns

GET
/campaigns

Get a paginated list of email campaigns.

This endpoint uses offset pagination (page / pageSize), not the cursor pagination used by GET /contacts.

Authorization

ApiKeyAuth
headerAuthorizationBearer <API Key>

API Key authentication. The project is automatically derived from the key.

/v1/track requires a public key (pk_*) — it is the one endpoint intended for client-side use, and a secret key is rejected there with 401.

Every other endpoint requires a secret key (sk_*) and rejects public keys with 401.

So the two key types are not interchangeable in either direction: pick the key that matches the endpoint you are calling.

Query parameters

page?integer

1-based page number.

Range1 <= value
Default1
pageSize?integer

Items per page.

Range1 <= value
Default20
status?string

Filter by campaign status. An unrecognised value returns 400.

Value in"DRAFT""SCHEDULED""SENDING""SENT""CANCELLED"
search?string

Case-insensitive match on name, subject, or sender address.

sort?string

Column to sort by. Unrecognised values fall back to createdAt.

Default"createdAt"
Value in"name""createdAt""updatedAt"
dir?string

Sort direction. Unrecognised values fall back to the default.

Default"desc"
Value in"asc""desc"

Response body

List of campaigns

application/json
  1. response
data?array<>
page?integer
pageSize?integer
total?integer

Total campaigns matching the filters, across all pages.

totalPages?integer
Example request
curl -X GET 'https://api.send.47signals.com/campaigns'
Example response
{  "data": [    {      "id": "string",      "name": "string",      "description": "string",      "subject": "string",      "body": "string",      "from": "user@example.com",      "fromName": "string",      "replyTo": "user@example.com",      "type": "TRANSACTIONAL",      "status": "DRAFT",      "audienceType": "ALL",      "audienceCondition": {        "logic": "AND",        "groups": [          {            "filters": [              {                "field": "string",                "operator": "equals",                "value": null,                "unit": "days"              }            ],            "conditions": {}          }        ]      },      "segmentId": "string",      "scheduledFor": "2019-08-24T14:15:22Z",      "totalRecipients": 0,      "sentCount": 0,      "deliveredCount": 0,      "openedCount": 0,      "clickedCount": 0,      "bouncedCount": 0,      "projectId": "string",      "sentAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "page": 0,  "pageSize": 0,  "total": 0,  "totalPages": 0}