Campaigns

List campaign recipients

Returns a campaign run's recipients in the order the run admitted them, optionally filtered by status.

GET
/v1/campaigns/{id}/runs/{runId}/recipients

Returns a campaign run's recipients in the order the run admitted them, optionally filtered by status. Pass nextCursor back as cursor for the next page; it is null on the last page.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^camp_[0-9a-hjkmnp-tv-z]{16,24}$
runId*string
Match^crun_[0-9a-hjkmnp-tv-z]{16,24}$

Query Parameters

status?string
Value in"pending""dispatching""dispatched""failed""skipped"
limit?|null
cursor?string

Response Body

CampaignRecipientPage

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.campaigns.listRecipients({  "id": "example",  "runId": "example"});
Example Response
{  "items": [    {      "id": "string",      "runId": "string",      "contactId": "string",      "status": "pending",      "messageId": "string",      "failureReason": "string",      "skippedReason": "unsubscribed",      "createdAt": "string",      "updatedAt": "string"    }  ],  "nextCursor": "string"}

Related documentation