# Flow programs: update, delete

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

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

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

### Flow.update
Changes the given properties of a Flow. [Verb page](/business/nouns/flow/update?interface=mcp).

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

Emits `Flow.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Flow. |
| `persona` | [Persona](/business/nouns/persona) | No | The Persona it guides; its Role decides which Verbs each step offers. |
| `offer` | [Offer](/business/nouns/offer) | No | The Offer whose activation Event ends the Flow; time to value reads from first step to that Event. |
| `steps` | list of [Dashboard](/business/nouns/dashboard) | No | The Dashboards in order, first run first, each ending in the Verb that opens the next. |

**Returns**

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

**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 $.Flow.update({ id: 'flow_uuJzIzjvrp', persona: 'persona_YdpO6wSexq' })"
  }
}
```

### Flow.delete
Deletes a Flow: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/flow/delete?interface=mcp).

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

Emits `Flow.deleted`.

**Inputs**

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

**Returns**

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

**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 $.Flow.delete({ id: 'flow_uuJzIzjvrp' })"
  }
}
```