API tokens
Settings → API tokens → New token.1
Name it
One per application that uses it: “Online shop”, “CRM”. You will then
know what to revoke the day one of them is compromised.
2
Choose what it may do
Read: look at lists, subscribers, campaigns, statistics. Read and
write: also create, change, delete and send. Give the least you can.
3
Live or test
Switch on Test key for a token that sends nothing: transactional
e-mails are logged without reaching a provider, campaigns cannot be
sent, nothing counts against the allowance. It shows a Test badge
in the list. See Test keys.
4
Copy it straight away
Your new token is shown once only. Put it with the application’s
secrets (an environment variable, a vault), never in the code.
Outgoing webhooks
Lekalao sends a signedPOST request to your addresses when something happens.
Settings → Outgoing webhooks → New endpoint:
text
required
So that you recognise it: “Online shop”.
URL
required
A public
https:// address. Internal addresses (localhost, a private
network) are refused.checkboxes
required
In three groups, each with its name in code underneath.Subscribers
- A subscriber is created (
subscriber.created) - A subscriber confirms (
subscriber.confirmed) - A subscriber unsubscribes (
subscriber.unsubscribed) - A tag is added (
subscriber.tag_added) - A tag is removed (
subscriber.tag_removed)
- A campaign is sent (
campaign.sent) - An e-mail bounces (
mail.bounced) - Someone reports an e-mail as spam (
mail.complaint)
- A transactional e-mail is handed to the provider (
transactional.sent) - A transactional e-mail is delivered (
transactional.delivered) - A transactional e-mail bounces (
transactional.bounced) - A transactional e-mail is reported as spam (
transactional.complained) - A transactional e-mail is opened (
transactional.opened) - A link in a transactional e-mail is clicked (
transactional.clicked) - A transactional e-mail could not be sent (
transactional.failed)
list
Every list by default, or one of them.
switch
Switch it off to keep the settings without being called.
The signing secret
Each endpoint has its own Signing secret, shown underneath with a button to copy it. Every call carries theLekalao-Signature header worked out with that secret and the time of the call: your application has to check it, and refuse a call signed more than five minutes ago, before believing it. The code is in Webhooks.
Calls we made
The log lists every call: date, endpoint, event, status. A call that fails is tried again on its own, after 1 minute, 5, 30, 2 hours, 6 and 12: while it waits, its status is Trying again. Open a row to see its Event id, the next attempt, the Attempts made with your server’s code and how long each took, the Payload and your server’s Response; Send again calls once more, at once. A call is a success when your server answers a2xx code within 15 seconds. Redirects are not followed.