Skip to content

Enrollment methods: update, delete

The Enrollment Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.

Reference for Enrollment, one group of Enrollment methods.

Enrollment.update

Changes the given properties of an Enrollment. Verb page.

TypeScript
interface EnrollmentVerbs {
  update(input: EnrollmentUpdateInput, options?: SB.CallOptions): SB.Call<Enrollment>
}

Emits Enrollment.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Enrollment.
stepstringThe Sequence step the person is on.
nextAtdatetimeWhen the next step fires; empty while paused or exited.
branchesstring[]The branches taken so far, in order.
exitReasonstringWhy the run ended.

Returns

OutputTypeRequiredDescription
enrollmentEnrollmentrequiredThe Enrollment.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const enrollment = await $.Enrollment.update({ id: 'enrollment_t2LKaLorKn', nextAt: '2026-10-22T12:00:00Z' })

Enrollment.delete

Deletes an Enrollment: a soft delete that keeps its history, undone by Thing.restore. Verb page.

TypeScript
interface EnrollmentVerbs {
  delete(input: EnrollmentDeleteInput, options?: SB.CallOptions): SB.Call<Enrollment>
}

Emits Enrollment.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Enrollment.

Returns

OutputTypeRequiredDescription
enrollmentEnrollmentrequiredThe Enrollment.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const enrollment = await $.Enrollment.delete({ id: 'enrollment_t2LKaLorKn' })