Enrollment
An Enrollment is one person’s run through one Sequence: the current step, when the next fires, the branches taken, and why it ended.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
status | string | required | Where the run stands. |
step | string | required | The Sequence step the person is on. |
nextAt | datetime | When the next step fires; empty while paused or exited. | |
branches | string[] | The branches taken so far, in order. | |
exitReason | string | Why the run ended. |
Object
{
"$id": "https: //api.sb/ petpantry.shop/ enrollments/ enrollment_1",
"$type": "Enrollment",
"status": "active",
"step": "Example step",
"nextAt": "2026-10-22T12: 00: 00Z",
"branches": [
"Example branches"
],
"exitReason": "replied"
}Relationships
- An Enrollment follows one Sequence: the Sequence whose steps this Enrollment walks, one step at a time.
follows, inverseenrollments. - An Enrollment runs for one Contact: the Contact this run belongs to; pausing one Contact’s nurture pauses this Enrollment.
runsFor, inverseenrollments.
Lifecycle
| State | Meaning | Moves to |
|---|---|---|
active (first) | The Contact is on a step, and the next one fires at nextAt. | paused by Enrollment.pause; exited by Enrollment.cancel; exited on Message.created when the enrolled Contact replies; exited on Order.placed when the buyer is the enrolled Contact; exited on Contact.unsubscribed when the Contact is the enrolled one; exited on Contact.suppressed when the Contact is the enrolled one; exited on Enrollment.finished |
paused | No step fires, and nextAt stays empty until it resumes. | active by Enrollment.resume; exited by Enrollment.cancel; exited on Contact.suppressed when the Contact is the enrolled one |
exited | Ended, with its exitReason; enrolling the Contact again starts a new Enrollment. | None: it ends here. |
Verbs
createCreates an Enrollment.POST /{namespace}/enrollmentsgetReturns one Enrollment by id.GET /{namespace}/enrollments/{id}listReturns Enrollments, newest first, one page at a time.GET /{namespace}/enrollmentsupdateChanges the given properties of an Enrollment.PATCH /{namespace}/enrollments/{id}deleteDeletes an Enrollment; its history is kept.DELETE /{namespace}/enrollments/{id}cancelCancel ends one Contact’s run through a Sequence for good, with the reason it records as `exitReason`.POST /{namespace}/enrollments/{enrollment}/cancelpausePause stops one Contact’s run through a Sequence at its current step, without ending it.POST /{namespace}/enrollments/{enrollment}/pauseresumeResume restarts a paused run at the step it stopped on and sets when that step fires.POST /{namespace}/enrollments/{enrollment}/resume
Events
Events no Verb emits. Each Verb’s Event is in the Verbs table above; every Event is delivered in the same shape.
Enrollment.finished
A Contact passed the last step of a Sequence with no exit Event, so the run ends with exitReason finished. Raised by the runtime.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Enrollment.finished. |
at | datetime | required | When it happened. |
seq | integer | Its position in the namespace, one more than the Event before; any seq is a cursor into the history. | |
data | json | required | The Thing as the Action left it. |
data.enrollment | Enrollment | required | The Enrollment as the change left it. |
data.enrollment.status | string | required | Where the run stands. |
data.enrollment.step | string | required | The Sequence step the person is on. |
data.enrollment.nextAt | datetime | When the next step fires; empty while paused or exited. | |
data.enrollment.branches | string[] | The branches taken so far, in order. | |
data.enrollment.exitReason | string | Why the run ended. | |
data.previous.status | string | required | The status before this Event: active. |
{
"$id": "https: //api.sb/ petpantry.shop/ events/ event_1",
"$type": "Event",
"name": "Enrollment.finished",
"at": "2026-10-22T12: 00: 00Z",
"data": {
"enrollment": {
"$id": "https: //api.sb/ petpantry.shop/ enrollments/ enrollment_1",
"$type": "Enrollment",
"status": "exited",
"step": "Example step",
"nextAt": "2026-10-22T12: 00: 00Z",
"branches": [
"Example branches"
],
"exitReason": "replied"
},
"previous": {
"status": "active"
}
},
"seq": 1
}Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Enrollment.create | Yes | Yes | Yes | No |
Enrollment.get | Yes | Yes | Yes | Yes |
Enrollment.list | Yes | Yes | Yes | Yes |
Enrollment.update | Yes | Yes | Yes | No |
Enrollment.delete | Yes | Yes | Yes | No |
Enrollment.cancel | Yes | Yes | Yes | No |
Enrollment.pause | Yes | Yes | Yes | No |
Enrollment.resume | Yes | Yes | Yes | No |
Call it
Pause the latest enrollment.Example
A trial user of a budgeting app enters the onboarding Sequence. After she links a bank account the Enrollment takes the linked branch, and it ends with exit reason purchased on day 9.