# Relationship commands: update, delete

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

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

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

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

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

Emits `Relationship.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Relationship. |
| `predicate` | `string` | No | The name read from the source, such as `makes`. |
| `inverse` | `string` | No | The name read from the target, such as `madeBy`. |
| `provenance` | `string` | No | Who asserted it: `Stated`, `Ratified`, `Inferred`, or `Observed`. |

**Returns**

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

**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 Relationship.update --json '{"id":"relationship_iUVcHztTJh","provenance":"Stated"}'
```

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

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

Emits `Relationship.deleted`.

**Inputs**

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

**Returns**

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

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