# Enrollment methods: cancel, pause, resume

URL: /code/sdk/enrollment/verbs · Id: `page:code/sdk/enrollment/verbs`

> The Enrollment Verbs cancel, pause, resume as typed SDK methods, with inputs, result, refusals and an example.

Reference for [Enrollment](/business/nouns/enrollment), one group of [Enrollment methods](/code/sdk/enrollment).

### Enrollment.cancel
Cancel ends one Contact’s run through a Sequence for good, with the reason it records as `exitReason`. [Verb page](/business/nouns/enrollment/cancel?interface=sdk).

```ts
interface EnrollmentVerbs {
  cancel(input: EnrollmentCancelInput, options?: SB.CallOptions): SB.Call<Enrollment>
}
```

Emits [`Enrollment.canceled`](/business/events/Enrollment.canceled).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `enrollment` | [Enrollment](/business/nouns/enrollment) | Yes | The Enrollment to end. |
| `reason` | `string` | Yes | Why it ends. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `enrollment` | [Enrollment](/business/nouns/enrollment) | Yes | The Enrollment, now `exited`. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const enrollment = await $.Enrollment.cancel({ enrollment: 'enrollment_t2LKaLorKn', reason: 'replied' })
```

### Enrollment.pause
Pause stops one Contact’s run through a Sequence at its current step, without ending it. [Verb page](/business/nouns/enrollment/pause?interface=sdk).

```ts
interface EnrollmentVerbs {
  pause(input: EnrollmentPauseInput, options?: SB.CallOptions): SB.Call<Enrollment>
}
```

Emits [`Enrollment.paused`](/business/events/Enrollment.paused).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `enrollment` | [Enrollment](/business/nouns/enrollment) | Yes | The Enrollment to pause. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `enrollment` | [Enrollment](/business/nouns/enrollment) | Yes | The Enrollment, now `paused`. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const enrollment = await $.Enrollment.pause({ enrollment: 'enrollment_t2LKaLorKn' })
```

### Enrollment.resume
Resume restarts a paused run at the step it stopped on and sets when that step fires. [Verb page](/business/nouns/enrollment/resume?interface=sdk).

```ts
interface EnrollmentVerbs {
  resume(input: EnrollmentResumeInput, options?: SB.CallOptions): SB.Call<Enrollment>
}
```

Emits [`Enrollment.resumed`](/business/events/Enrollment.resumed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `enrollment` | [Enrollment](/business/nouns/enrollment) | Yes | The paused Enrollment. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `enrollment` | [Enrollment](/business/nouns/enrollment) | Yes | The Enrollment, `active` again. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const enrollment = await $.Enrollment.resume({ enrollment: 'enrollment_t2LKaLorKn' })
```