Skip to main content
POST
Test send campaign

Authorizations

Authorization
string
header
required

Send your team API key or project token as Authorization: Bearer <token>. The credential must have the required permissions. Project tokens can access only their own project.

Headers

Idempotency-Key
string

Optional unique key, 1 to 255 bytes, that makes this request safe to retry for 24 hours. A retry with the same key, credential, Polymorfa-Version and request never runs it again: it returns 409 idempotency_completed when the original succeeded, or the original server error. Reusing the key for a different request returns 409 idempotency_conflict; a retry while the original is still running returns 409 idempotency_in_progress, and a retry after an unrecorded outcome returns 409 idempotency_outcome_unknown.

Value constraints

Required string length: 1 - 255

Path Parameters

campaignId
string
required

Identifier for the campaign.

Body

application/json
sessionId
string<uuid>
required

The number to send the test from. It must be connected, on a plan that includes Campaigns and, when the campaign selects numbers, one of them.

Value constraints

to
string
required

The seed recipient in international format. It must be the phone of a number connected to your team.

Value constraints

Required string length: 1 - 32
Example:

"+5511999990000"

projectId
string<uuid>

Required when using a team API key. Project tokens derive the project from the credential.

Value constraints

sampleRecipientId
string<uuid>

A recipient of this campaign whose variables fill the content. Without it and without variables, the campaign's first recipient, or its audience's first member, is the sample.

Value constraints

variables
object

Variable values for the test. They override the sample recipient's values; without sampleRecipientId, only these values are used.

Value constraints

Response

Success

data
object
required

Structured data carried by this object.