Welcome sequences API
Each audience has one welcome sequence. While it is on, a reader who subscribes through a signup form or the API gets its emails in order, each after its wait. With double opt-in, the sequence starts when the reader confirms. Readers you add in the dashboard or import never start it, and a reader starts it only once.
Last updated
Get the sequence
/v1/audiences/:id/welcome-sequenceScope newsletters:read. An audience without a sequence returns enabled: false and no steps.
{
"object": "welcome_sequence",
"audience_id": "aud_abc123",
"enabled": true,
"paused": false,
"pause_reason": null,
"active_readers": 42,
"completed_readers": 310,
"steps": [
{
"object": "welcome_step",
"id": "nwswstp_abc123",
"position": 1,
"wait_minutes": 0,
"subject": "Welcome to Acme Weekly",
"blocks": [{ "type": "paragraph", "body": "Thanks for subscribing." }],
"sent_count": 352,
"bounced_count": 1,
"complained_count": 0
}
]
}Turn it on or off
/v1/audiences/:id/welcome-sequenceSend { "enabled": true } or false. Turning it on needs at least one email with a subject and a body. Turning it off holds the emails already queued until it is on again. When bounces or complaints pass the same limits that pause a newsletter, the sequence pauses (paused: true) and the owner gets an email; turning it on again resumes it. A welcome email that fails a blocking content check of a newsletter also pauses the sequence, and turning it on answers 422 until the email passes. Only resuming a bounce or complaint pause accepts the rate; after any other pause, earlier sends still count toward the limits. A spam-trap hit on any newsletter of the organization pauses every welcome sequence.
Add, change and remove emails
POST /v1/audiences/:id/welcome-sequence/steps
PATCH /v1/audiences/:id/welcome-sequence/steps/:stepId
DELETE /v1/audiences/:id/welcome-sequence/steps/:stepIdScope newsletters:write. A key limited to specific recipients, domains or mailboxes gets a 403 here and when turning the sequence on, because the sequence emails every new subscriber. A key limited to specific recipients can still turn the sequence off; one limited to domains or mailboxes cannot. While the sequence is on, such a key also gets a 403 when it adds or resubscribes a subscriber it may not email, and nothing is written. A step accepts:
subject(required on create) andpreview_text.blocksorcontent_markdown, the same body formats as a newsletter.wait_minutes: minutes after the previous email, or after the subscribe for the first one. 0 sends right away; the maximum is 365 days.sender_identity_id(defaults to the organization's default sender),track_engagement,add_utm_tagsandstyling_mode. Once an email has gone out, asender_identity_idon another sending domain answers422: add a new email for that domain and remove this one.
curl -X POST https://shipmail.to/api/v1/audiences/aud_abc123/welcome-sequence/steps \
-H "Authorization: Bearer $SHIPMAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subject":"Our three best posts","wait_minutes":4320,"content_markdown":"# Start here\n\n- [Post one](https://example.com/1)"}'Removing an email moves readers waiting for it on to the next one. A running sequence keeps at least one email.
How welcome emails are sent
Welcome emails go out like newsletters: the same footer and unsubscribe link, List-Unsubscribe headers, suppressions and opt-outs, and they count toward the monthly newsletter limit. At most 100 welcome emails per audience go out in any ten minutes. When more readers are due, the rest wait for the next ten minutes and the owner gets an email.
SDKs, CLI and MCP
await shipmail.audiences.welcomeSequence.createStep("aud_abc123", {
subject: "Welcome",
content_markdown: "Thanks for subscribing.",
});
await shipmail.audiences.welcomeSequence.update("aud_abc123", { enabled: true });client.audiences.welcome_sequence.create_step(
"aud_abc123", {"subject": "Welcome", "content_markdown": "Thanks for subscribing."}
)
client.audiences.welcome_sequence.update("aud_abc123", {"enabled": True})shipmail audiences welcome add-step aud_abc123 --subject "Welcome" --markdown @welcome.md
shipmail audiences welcome enable aud_abc123MCP tools: shipmail_get_welcome_sequence, shipmail_update_welcome_sequence, shipmail_create_welcome_step, shipmail_update_welcome_step and shipmail_delete_welcome_step.