Skip to main content
The API covers the usual path: your tool writes the content, Lekalao sends it. The finer settings (segment, A/B test, scheduling, a sender of the campaign’s own) are made in the interface.

Create

The campaign is created as a draft, for the whole list, with the list’s sender.
The content must carry {{ unsubscribe_url }} and {{ organisation.address }}, directly or through its template. Without them, the campaign will not go out.

Test

Up to 5 addresses. The subject is prefixed with “[Test]”; subscribers and statistics are untouched:

Send

If everything is ready, sending starts at once:
Otherwise, 422 with the list of what is missing, the same checks as in the interface (Send):
Sending cannot be taken back. Use an Idempotency-Key: a call repeated after a network cut will not send the campaign twice.

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 /api/v1/campaigns?status=sent&list={id} lists campaigns, the most recent first.

Delete

DELETE /api/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}.