# Enrollment programs: update, delete

URL: /code/mcp/enrollment/records-update · Id: `page:code/mcp/enrollment/records-update`

> The Enrollment Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.

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

### Enrollment.update
Changes the given properties of an Enrollment. [Verb page](/business/nouns/enrollment/update?interface=mcp).

```text
do: return await $.Enrollment.update(input)
```

Emits `Enrollment.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Enrollment. |
| `step` | `string` | No | The Sequence step the person is on. |
| `nextAt` | `datetime` | No | When the next step fires; empty while paused or exited. |
| `branches` | `string[]` | No | The branches taken so far, in order. |
| `exitReason` | `string` | No | Why the run ended. |

**Returns**

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

**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**

```json
{
  "name": "do",
  "arguments": {
    "code": "return 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](/business/nouns/enrollment/delete?interface=mcp).

```text
do: return await $.Enrollment.delete(input)
```

Emits `Enrollment.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Enrollment. |

**Returns**

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

**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**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Enrollment.delete({ id: 'enrollment_t2LKaLorKn' })"
  }
}
```