Create
The campaign is created as a draft, for the whole list, with the list’s sender.
Test
Up to 5 addresses. The subject is prefixed with “[Test]”; subscribers and statistics are untouched:recipients says who it went to. It is refused with 422 test_refused, the reason in message, when:
- the sender’s domain is not verified, where the installation requires it;
- every address given is on the suppression list;
- the team has sent 100 test e-mails in the last hour, all campaigns together;
- the month’s allowance is used up.
"sandbox": true.
Send
422 campaign_not_ready with the list of what is missing, the same checks as in the interface (Send):
403 sandbox_cannot_send.
Follow
The figures are worked out again every minute.
delivered is filled only when the provider sends its feedback. The campaign.sent webhook tells you when sending is over.
GET /v1/campaigns?status=sent&list={id} lists campaigns, the most recent first.
Delete
DELETE /v1/campaigns/{id} deletes a campaign and its statistics. 409 while it is sending: pause it in the interface first.
Templates
So that your CMS only sends the body of the e-mail, prepare a template with the header, the footer, the unsubscribe link and the postal address. Templates are also managed through the API:GET|POST /templates, GET|PUT|DELETE /templates/{id}.