SLSmartletter API

Automated sequences

Send a series of emails by itself after a signup, a lead magnet download or an event: trigger, steps, versions, re-entry, exits.

A sequence belongs to one newsletter (sender, footer, unsubscribe link). A trigger puts contacts in; each contact then follows the steps at its own pace. Create it, then activate it: nothing is sent before.

curl -X POST https://api.smartletter.ai/sequences -H "Authorization: Bearer $SMARTLETTER_API_KEY" -H "Content-Type: application/json" -d '{
  "name": "Lead magnet follow-up", "segment_id": "<segment id>",
  "trigger": {"type": "lead_magnet", "lead_magnet_id": null},
  "steps": [
    {"id": "j0", "type": "email", "subject": "Your guide", "markdown": "Here it is."},
    {"id": "d2", "type": "delay", "amount": 2, "unit": "days"},
    {"id": "j2", "type": "email", "subject": "One tip", "markdown": "Start with page 3."}
  ]}'
curl -X POST https://api.smartletter.ai/sequences/<id>/activate -H "Authorization: Bearer $SMARTLETTER_API_KEY"

Triggers

`trigger.type`Who enters
subscribedA contact becomes active in the newsletter (signup confirmed, re-subscription). Imports only with include_imports: true. Replaces the simple welcome email of that newsletter while active.
topic_subscribedA contact subscribes to topic_id.
lead_magnetA contact confirms after downloading lead_magnet_id (null = any), or an active contact downloads one again.
eventPOST /events with this event name.
email_opened / email_clickedFirst open / click of an issue (newsletter_id, null = any).
filterA contact starts matching the saved filter filter_id (checked every 15 minutes). Contacts matching at activation do not enter unless include_existing: true.
manualOnly POST /sequences/{id}/enrollments (and the dashboard).

Steps

`type`Fields
emailsubject, preheader, and markdown, html, doc or template_id. Tags like {{first_name}} work.
delayamount + unit (minutes, hours, days; 5 minutes to 365 days), or until: {time: "09:00", weekdays: [1,2,3,4,5], timezone: "contact"}.
wait_eventevent (custom, email.opened, email.clicked), timeout_hours (1–720), on_timeout: continue or exit.
conditionfilter_id or rule, then yes and no step lists. Both branches join after the condition.
update_contactaction: set_field with key and value, or subscribe_topic / unsubscribe_topic with topic_id.
webhookwebhook_id: one of your endpoints receives a sequence.step event.
exitEnds the path (last step of its list).

50 steps at most, 5 levels of conditions. No jumps, so no loops. The contact's time zone is its custom field timezone (IANA name), else the newsletter's.

Versions

steps is a draft. Activating publishes it as a new version when it changed: emails are compiled with the newsletter's theme and footer and pass the content review. Contacts already on their way keep the version they started with; new contacts take the new one. Keep step ids when you edit: stats follow them.

Re-entry and exits

  • reentry.mode: once (default, never twice), always (again once the previous run is over), after_days with days.
  • A contact always leaves when it unsubscribes, bounces, complains, goes dormant or is deleted, and when it leaves the sequence's topic_id.
  • exit.events: custom events that take the contact out. exit.filter_id: a saved filter checked before each step.

Sending rules

Sequence emails count in your monthly quota, respect the suppression list and are never sent twice for the same step. When the quota is reached or the workspace is suspended, contacts wait on their step. Webhooks sequence.entered, sequence.completed and sequence.exited report each contact. Plans: Free 1 sequence, Starter 3, Pro 20, Scale and Agency unlimited.