Skip to content

Enroll a confirmed reader in a sequence

On this page
POST/v1/sequences/{sequence_id}/enrollmentsenroll_subscriber_in_sequence
Riskwrite
AuthenticationAPI key or OAuth access token
Scopessequences:enroll
Idempotencynatural: repeating the call gives the same result
Dry runyes: add dry_run=true to the query
Success status200
Response typeapplication/json

What it does#

  • Use when: A confirmed reader should start a published sequence, for example after a purchase.
  • Do not use when: the reader is pending, unsubscribed or suppressed (refused), or the sequence is a draft.
  • Side effects: Starts the sequence's emails for this reader.
  • Reversible: No.
  • Required scope: sequences:enroll.
  • Idempotency: safe to repeat (same result).
  • Typical next step: call get_sequence to watch run counts.

Scopes#

  • sequences:enroll: Enroll subscribers in sequences and pause or resume them.

Side effects#

  • Starts the sequence's emails for this reader

Request#

Path parameters#

FieldTypeDescription
sequence_idstring

Query parameters#

None.

Every mutation also accepts dry_run=true: it runs every check and returns {"dry_run": true, "would": {...}} without writing anything.

Body (application/json)#

FieldTypeRequiredDescription
subscriber_idstringyes

Response#

FieldTypeRequiredDescription
statusone of "enrolled", "already_enrolled", "refused"yes
subscriber_idstringyes
sequence_idstringyes
run_idstringno
reasonstringnoStable reason code when refused
messagestringnoAuthor sentence when refused

Examples#

enrolled#

Request:

curl -X POST 'https://api.seemly.com/v1/sequences/aut_0123456789abcdefghjkmnpq/enrollments' \
  -H "Authorization: Bearer $SEEMLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "subscriber_id": "sub_0123456789abcdefghjkmnpq"
}'

Response: 200:

JSON
{
  "status": "enrolled",
  "subscriber_id": "sub_0123456789abcdefghjkmnpq",
  "sequence_id": "aut_0123456789abcdefghjkmnpq",
  "run_id": "arn_1"
}

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.