Skip to main content

Enrollments

MethodPathScopeSDK
DELETE/api/v1/enrollments/:idsequences:writeenrollments.cancel

An enrollment is one contact's active run through one sequence. It is created by POST /sequences/:key/enroll, its bulk variant, or an event trigger — the id comes back as enrollmentId.

DELETE /api/v1/enrollments/:id

Cancels an active enrollment. Remaining steps never send; already-sent emails are unaffected.

curl -X DELETE https://mailroom.example.com/api/v1/enrollments/e5f6… \
-H "Authorization: Bearer pk_live_…"
{ "ok": true, "id": "e5f6…", "status": "cancelled" }

404 not_found — no active enrollment with that id in this project. An already-cancelled or completed enrollment reports the same thing, so treat 404 as "nothing left to stop" rather than an error worth retrying.

To exit contacts from a sequence as part of a lifecycle change, prefer exitSequences on POST /events — it resolves the enrollments for you instead of making you track ids.