# Tenant programs: update, delete

URL: /code/mcp/tenant/records-update · Id: `page:code/mcp/tenant/records-update`

> The Tenant Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.

Reference for [Tenant](/business/nouns/tenant), one group of [Tenant programs](/code/mcp/tenant).

### Tenant.update
Changes the given properties of a Tenant. [Verb page](/business/nouns/tenant/update?interface=mcp).

```text
do: return await $.Tenant.update(input)
```

Emits `Tenant.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Tenant. |
| `placement` | `string` | No | Where the Tenant sits in an address: `path` or `host`. |
| `apiVersion` | `string` | No | The API version an unversioned call with this Tenant’s keys answers at; set at creation, moved only by `pin`. |

**Returns**

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

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

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Tenant.update({ id: 'ten_Bu63f0he26', placement: 'path' })"
  }
}
```

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

```text
do: return await $.Tenant.delete(input)
```

Emits `Tenant.deleted`.

**Inputs**

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

**Returns**

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

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

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Tenant.delete({ id: 'ten_Bu63f0he26' })"
  }
}
```