Campaigns
List campaign recipients
Returns a campaign run's recipients in the order the run admitted them, optionally filtered by status.
GET
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.
apiKeyheader
x-api-key<token>id*stringMatch
^camp_[0-9a-hjkmnp-tv-z]{16,24}$runId*stringMatch
^crun_[0-9a-hjkmnp-tv-z]{16,24}$status?stringValue in
"pending""dispatching""dispatched""failed""skipped"limit?|nullcursor?stringCampaignRecipientPage
application/json- response
items*array<>nextCursor*string|nullimport { 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"}