List who a campaign would reach

List who a campaign would reach

GET/api/v1/email/campaigns/{id}/recipients

GET /email/campaigns/{id}/recipients
curl -X GET 'https://www.unitpost.com/api/v1/email/campaigns/cmp_123/recipients' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
Response · 200
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "campaign_recipient",
      "contact_id": "contact_123",
      "email": "customer@example.com",
      "name": "Example",
      "status": "sendable",
      "reason": "string",
      "reason_code": "unsubscribed"
    }
  ],
  "next_cursor": "string"
}

Who the campaign would reach if sent now, one row per segment member, by the send's own rule: sendable, missing_data (a required variable has no value), suppressed or excluded, with the reason. The numbers of Validate a campaign, member by member. Rows run in contact-id order: pass next_cursor as after for the next page. A page can hold fewer rows than limit while has_more is true (a rare status in a big segment is walked in bounded steps). Rows name contacts, so this also requires contacts:read. Requires the campaigns:read capability.

Parameters4 fields
FieldTypeDescription
idrequiredstring · path—
statusstring · queryOnly members with this outcome (default `all`).
limitinteger · queryRows per page (1–100, default 50).
afterstring · queryThe previous page's `next_cursor`.
Response · 200 fields7 fields
FieldTypeDescription
objectrequiredstring—
contact_idrequiredstring—
emailrequiredstring | null—
namerequiredstring | null—
statusrequiredenumsendable | missing_data | suppressed | excludedWhat a send now would do for this member, by the send's own rule.
reasonrequiredstring | nullWhy, in plain words; null when sendable.
reason_coderequiredenum | null—
200401403404409422503

Search docs and guides

Search the docs and product guides.