Vai al contenuto

Endpoint

Campaigns

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

I percorsi sono relativi all'URL di base. Ogni scheda indica il permesso richiesto dalla chiamata e ogni parametro, con tipo e limiti.

GET
/campaigns

List campaigns, newest first.

Permesso: campaigns
Paginato

Parametri di query

  • statusopzionaleenum

    Campaign status.

    Valori consentiti:draftscheduledsendingcompletedfailed

GET
/campaigns/:id

Retrieve a campaign with its delivery stats.

Permesso: campaigns

Parametri del percorso

  • idobbligatoriostring

    Campaign ID.

POST
/campaigns/:id/send

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

Permesso: campaigns

Parametri del percorso

  • idobbligatoriostring

    Campaign ID.

Corpo JSON

  • send_atopzionalestring (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.