Ir para o conteúdo

Endpoints

Campaigns

Broadcast campaigns created in the app: status, results and sending.

Os caminhos são relativos à URL base. Cada card lista a permissão que a chamada exige e todos os parâmetros, com tipo e limites.

GET
/campaigns

List campaigns, newest first.

Permissão: campaigns
Paginado

Parâmetros de query

  • statusopcionalenum

    Campaign status.

    Valores permitidos:draftscheduledsendingcompletedfailed

GET
/campaigns/:id

Retrieve a campaign with its delivery stats.

Permissão: campaigns

Parâmetros de caminho

  • idobrigatóriostring

    Campaign ID.

POST
/campaigns/:id/send

Send a draft, scheduled or failed campaign now, or schedule it.

Permissão: campaigns

Parâmetros de caminho

  • idobrigatóriostring

    Campaign ID.

Corpo JSON

  • send_atopcionalstring (ISO 8601 date-time with offset) | null

    Schedule for this time. Omit or null to send now.

  • Sending now answers 202 and runs in the background; campaign.completed fires when it finishes. Scheduling answers 200.
  • 402 insufficient_credits when the workspace cannot pay for the send; 409 for a campaign that is already sending or completed.