Senlo

Contacts

How contacts are created and updated from events, and how unsubscribe and suppression work.

curl -X POST https://senlo.io/api/events \
  -H "Authorization: Bearer $SENLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "event": "contact_updated", "email": "ada@example.com", "metadata": { "plan": "pro" } }'

A contact is one email address in one workspace, with a name, a locale and free-form metadata. Automations run for contacts; triggered emails do not need one.

Fields

FieldMeaning
emailUnique per workspace.
nameOptional.
localePicks the language version an automation sends. See Locales.
metaAny JSON object. Sent as metadata in events, available to merge tags in automation emails. tags is an array of strings by convention.
unsubscribed, unsubscribedAtSet when the contact unsubscribes.

Created and updated by events

POST /api/events is how your app keeps contacts current:

  • contact_added creates the contact. For an address that already exists, it updates name and replaces meta with the metadata you send (when you send one).
  • contact_updated updates name and locale, and merges metadata into meta: keys you do not send are kept. The contact must exist (404 otherwise).
  • tag_added adds metadata.tags to the contact's tags without duplicates. The contact must exist.
  • order_created and event_triggered create the contact if it is new, then start automations.

Unsubscribe

Every email Senlo sends carries a signed unsubscribe link ({{unsubscribe_url}}) and a one-click List-Unsubscribe header. When the recipient uses either:

  • If the address is a contact, the contact is marked unsubscribed.
  • If it is not (a triggered email to any address), the address is added to the workspace's suppression list with reason UNSUBSCRIBE.

Either way Senlo stops mailing the address in this workspace: triggered emails and automation steps to it are skipped and logged FAILED with reason UNSUBSCRIBE.

See Tracking and unsubscribe.

Suppression

The suppression list (Audience in the workspace) holds addresses Senlo will not send to in this workspace. Every send checks it, and the contact's unsubscribed flag, first; a blocked recipient is skipped and the delivery log shows FAILED with the reason.

Addresses get there by:

ReasonHow
BOUNCEYour provider reported a bounce through its webhook.
SPAMThe recipient marked the email as spam and the provider reported it.
UNSUBSCRIBEA recipient who is not a contact unsubscribed.

Removing an entry from the list lets Senlo send to the address again. Bounces and complaints are only recorded if the provider's webhook is connected.

Edit this page on GitHub