# Cohort commands: update, delete

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

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

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

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

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

Emits `Cohort.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Cohort. |
| `query` | `json` | No | The Portfolio query that selects its Startups. |
| `control` | `boolean` | No | True when the Cohort stays on the prior Version as the control. |

**Returns**

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

**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 Cohort.update --json '{"id":"cohort_YxPOKnSexq","query":{}}'
```

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

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

Emits `Cohort.deleted`.

**Inputs**

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

**Returns**

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

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