# Channel programs: update, delete

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

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

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

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

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

Emits `Channel.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Channel. |
| `medium` | `string` | No | The platform type, such as `email`, `sms`, or `chat`. |
| `organization` | [Organization](/business/nouns/organization) | No | The outside Organization the Channel is shared with; its new Messages open Conversations for that Customer. |
| `external` | `boolean` | No | True when people from another Organization post in it, as in a channel two companies share. |
| `areaCode` | `string` | No | For an `sms` Channel, the phone area code its number is drawn from, such as `512`. |
| `number` | `string` | No | For an `sms` Channel, its phone number in international form, assigned when it is created. |

**Returns**

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

**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 $.Channel.update({ id: 'channel_EQ8se34AOW', medium: 'email' })"
  }
}
```

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

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

Emits `Channel.deleted`.

**Inputs**

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

**Returns**

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

**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 $.Channel.delete({ id: 'channel_EQ8se34AOW' })"
  }
}
```