# Approval commands: update, delete

URL: /code/cli/approval/records-update · Id: `page:code/cli/approval/records-update`

> The Approval Verbs update, delete as CLI commands, with inputs, result, refusals and an example.

Reference for [Approval](/business/nouns/approval), one group of [Approval commands](/code/cli/approval).

### Approval.update
Changes the given properties of an Approval. [Verb page](/business/nouns/approval/update?interface=cli).

```text
npx startup-builder do Approval.update --json '<input>' [--try | --send | --do]
```

Emits `Approval.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Approval. |
| `by` | [Worker](/business/nouns/worker) | No | The Worker that performed it. |
| `for` | [Party](/business/nouns/party) | No | The Party it was done on behalf of. |
| `via` | `string` | No | The Interface or request it arrived through. |
| `on` | `string` | No | The Action or Event that caused it, such as the failed attempt a retry follows. |
| `thing` | `string` | No | The record, at the Version the Action was decided against. |
| `input` | `json` | No | The input it was called with. |
| `createdAt` | `datetime` | No | When it was called. |
| `reserved` | `money` | No | The most this Action may cost, held against its Limits from the check until it settles, billed misses included. |
| `due` | `datetime` | No | When the Task is due. |
| `priority` | `integer` | No | Its rank in the inbox, highest first. |
| `recurrence` | `string` | No | The schedule a recurring duty repeats on. |
| `verdict` | `string` | No | One of `allowed` or `refused`. |
| `deadline` | `datetime` | No | When an unanswered Approval cancels the Action. |

**Returns**

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

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

```bash
npx startup-builder do Approval.update --json '{"id":"approval_TlxQeWh9uX","verdict":"allowed"}'
```

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

```text
npx startup-builder do Approval.delete --json '<input>' [--try | --send | --do]
```

Emits `Approval.deleted`.

**Inputs**

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

**Returns**

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

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

```bash
npx startup-builder do Approval.delete --json '{"id":"approval_TlxQeWh9uX"}'
```