Skip to main content

Address and format

  • Every route lives under https://lekalao.example.com/api/v1.
  • Send and receive JSON: Content-Type: application/json and Accept: application/json.
  • A single resource is wrapped in data: {"data": {…}}.
  • Dates are ISO 8601 with a time zone: 2026-09-17T09:12:44+00:00. Without one, a date you send is read in the installation’s time zone (UTC by default).
  • Amounts are integers in the smallest unit of the currency: 1250 is 12.50 €. For the CFA franc, which has no subdivision, 15000 is 15,000 FCFA.

Identifiers

Every resource is named by its id, which is a uuid and never a row number. Addresses are built with it: /api/v1/lists/{id}/subscribers. Tags may also be named by their name where that reads better: a subscriber’s tags, segment rules.

Pagination

Listings are paginated:
Follow links.next until it is null.

Rate limit

Each token may make 120 calls a minute (the installation can change it). Every answer says where you stand:
Past that, the answer is 429 with Retry-After in seconds:
Wait Retry-After seconds before starting again. To subscribe many people, use the batch: one call for 1,000 addresses.

Idempotency

A call that times out leaves you guessing: did the order go through? Add an Idempotency-Key header to your POST and PUT calls and send the same call again without risk:
Choose a key that describes the operation (order number plus action) or a UUID generated before the first attempt. 255 characters at most. Keys belong to one team.

CORS

The api/* and subscribe/* routes accept calls from any origin, without cookies. The rate-limit and idempotency headers are readable by the browser.
Open CORS does not mean you should call the API from a browser: the token would be visible to everyone. Only the subscription form is made for that.