Take a person out of a sequence
Ends this person’s run through the sequence.
/v1/enrollments/{id}/cancel
Ends this person’s run through the sequence. Its texts still waiting to go are canceled, and sequence.completed fires with state: "canceled".
Needs a key with the messages:send scope.
Send an Idempotency-Key so a retry never acts twice.
Path parameters
idstringrequiredThe run’s id.
Starts with
enr_.
Headers
Idempotency-KeystringAny string of up to 255 characters, new for each request. A retry with the same key gets the first answer back for 24 hours, with
Idempotent-Replayed: true.Up to 255 characters.
Example
/v1/enrollments/enr_1Hq2LxW9cVbN3mKpRtYs0a/cancelcurl -X POST "https://usebluebot.com/api/v1/enrollments/enr_1Hq2LxW9cVbN3mKpRtYs0a/cancel" \
-H "Authorization: Bearer $BLUEBOT_API_KEY" \
-H "Idempotency-Key: 0f6d8c2e-5b1a-4c7e-9d3f-2a8b6e1c4d70"Response
200: The run, ended.
idstringrequiredA enr_ id.
Starts with
enr_.object"enrollment"requiredsequence_idstringrequiredA seq_ id.
Starts with
seq_.contact_idstringrequiredA ct_ id.
Starts with
ct_.handlestringrequiredA phone number in E.164 (
+15555550123) or an email address an Apple ID uses (iMessage only).statestringrequiredOne of
active,completed,stopped,canceled.current_stepintegerrequiredThe position of the next step.
next_run_attimestamp or nullrequiredWhen the next step happens, while active.
stop_reasonstring or nullrequiredWhy it ended early, when it did.
One of
replied,stopped,canceled,sequence_archived,failed.enrolled_viastringrequiredOne of
dashboard,api,zapier,make,n8n,pipedream,cli,hook,keyword,mcp,assistant,widget.variablesmap of stringrequiredValues for the steps’
{{variables}}.enrolled_attimestamprequiredWhen the person was added.
completed_attimestamp or nullrequiredWhen it ended, by finishing or stopping.
timelinearray of objectWhat happened, oldest first. Only on
GET /v1/enrollments/{id}.Show its 6 fieldsHide its fields
typestringrequiredOne of
enrolled,text_queued,text_skipped,waiting,window,stopped,completed,canceled.positioninteger or nullrequiredThe step it is about.
message_idstring or nullrequiredA msg_ id.
Starts with
msg_.untiltimestamp or nullrequiredFor a wait, when it ends.
detailstring or nullrequiredWhat happened, in words.
attimestamprequiredWhen.
{
"id": "enr_1Hq2LxW9cVbN3mKpRtYs0a",
"object": "enrollment",
"sequence_id": "seq_1Hq2LxW9cVbN3mKpRtYs0a",
"contact_id": "ct_1Hq2LxW9cVbN3mKpRtYs0a",
"handle": "+15555550123",
"state": "canceled",
"current_step": 2,
"next_run_at": null,
"stop_reason": "canceled",
"enrolled_via": "api",
"variables": {
"listing": "412 Oak St"
},
"enrolled_at": "2026-11-13T19:41:00.000Z",
"completed_at": "2026-11-13T19:41:00.000Z"
}Errors
Every refusal has the same envelope and a page of its own. These are the ones this operation can give.
| Code | Status | What it means |
|---|---|---|
| 401 | The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API. | |
| 403 | The key doesn’t carry the scope the endpoint needs. Each endpoint’s reference names its scope. | |
| 429 | Too many requests. A key may make 120 requests a minute. The RateLimit header says how many are left, and Retry-After how long to wait. | |
| 500 | Something went wrong on BlueBot’s side. It was reported. Send the request again; with an Idempotency-Key that is always safe. | |
| 404 | There is no such thing on this account. Ids are prefixed by kind, so a message id starts with msg_. | |
| 409 | The request doesn’t fit the thing’s current state, or another request with the same Idempotency-Key is still running. |
Try it
Call this operation from the page with your own key. The key stays in this tab and is forgotten when you leave.