# Thread commands: update, delete

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

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

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

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

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

Emits `Thread.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Thread. |
| `subject` | `string` | No | What the Thread is about. |

**Returns**

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

**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 Thread.update --json '{"id":"thread_GzIHRhK100","subject":"Example subject"}'
```

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

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

Emits `Thread.deleted`.

**Inputs**

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

**Returns**

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

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