# Setting commands: update, delete

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

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

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

### Setting.update
Changes the given properties of a Setting. [Verb page](/business/nouns/setting/update?interface=cli).

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

Emits `Setting.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Setting. |
| `key` | `string` | No | The name of the choice. |
| `value` | `json` | No | The chosen value. |
| `locked` | `boolean` | No | True when no holder below may override it. |

**Returns**

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

**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 Setting.update --json '{"id":"setting_mfZPXxFQYD","value":{}}'
```

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

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

Emits `Setting.deleted`.

**Inputs**

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

**Returns**

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

**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 Setting.delete --json '{"id":"setting_mfZPXxFQYD"}'
```