---
docId: doc_72bfef1bcf664bda824b686102764da2
title: Update a channel
description: "Change a channel name or agent, or disconnect it."
api:
  group: canales
  auth: bearer
  operations:
    - operationId: updateChannel
      method: PATCH
      path: '/v1/channels/{channelId}'
      postmanName: Update a channel
---

<script>
  import { Ways, Note } from '$lib/components';
</script>

# Update a channel

Change a channel name or its responding agent. Only the fields you send are modified. The new agent responds from the next message using its published version.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X PATCH https://api.platic.ai/v1/channels/$CHANNEL_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "defaultAgentId": "'"$AGENT_ID"'" }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.channels.update("channel_123", { defaultAgentId: "agent_123" });
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `channelId` | string | Channel id or its `prefixedChannelId` | ✓ |

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | Workspace ID. Required if your credential covers several workspaces; without it the answer is `400` | If the credential has several |

## Request body

Send at least one.

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `defaultAgentId` | string \| null | The agent that answers the channel. It must exist in the workspace. `null` leaves the channel without an agent | — |
| `name` | string | Channel name, 1 to 200 characters | — |
| `isConnected` | boolean | `false` disconnects the channel, as [disconnect a channel](/api-reference/channels/disconnect) does. `true` answers `409 USE_CONNECTIONS`: a channel is connected by [requesting a connection](/api-reference/channels/connections/create) | — |

```json
{
  "defaultAgentId": "tVKljCHCNiebQdasHeit"
}
```

## Response

```json
{
  "status": "success",
  "message": "Channel updated successfully",
  "data": {
    "id": "104857362918475",
    "prefixedChannelId": "fb-104857362918475",
    "platform": "messenger",
    "channelType": "messenger",
    "isConnected": true,
    "status": "CONNECTED",
    "defaultAgentId": "tVKljCHCNiebQdasHeit",
    "name": "Acme Store",
    "displayPhoneNumber": null,
    "phoneNumber": null,
    "businessId": null,
    "wabaId": null,
    "kind": "messaging",
    "commentAutoReply": null,
    "creationDate": "2026-11-12T18:42:10.000Z",
    "lastUpdate": "2026-11-12T19:03:27.000Z",
    "health": {
      "state": "ok",
      "reason": null,
      "since": "2026-11-12T18:42:10.000Z"
    }
  }
}
```

`data` is the channel, with the fields of [list channels](/api-reference/channels/list#channel-fields).

With `isConnected: false`, `message` is `Channel disconnected` and `data` is the disconnected channel, with `nextStep`, as in [disconnect a channel](/api-reference/channels/disconnect#response). If you also send `defaultAgentId` or `name`, they are saved before disconnecting.

## Errors

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | You sent no field, or one is not valid. `details.issues` says which |
| `404` | `CHANNEL_NOT_FOUND` | The channel does not exist in this workspace, or you removed it |
| `404` | — | The `defaultAgentId` agent does not exist in this workspace. `details` only has the message |
| `409` | `USE_CONNECTIONS` | You sent `isConnected: true`. `details.nextStep` says how to connect it |
| `409` | `MANAGE_IN_PLATICA` | You sent `isConnected: false` to a mailbox: it is managed in Platica. The link is in `details.manageUrl`. The other fields you sent are saved |

With `isConnected: false` the errors of [disconnect a channel](/api-reference/channels/disconnect#errors) apply too.

<Note type="tip">

Changing a channel's agent applies right away and does not create an agent version.

</Note>

## Notes

- To remove the channel from the workspace, use [delete a channel](/api-reference/channels/delete).
- On a web chat, the agent, the name, and everything else are changed with [update a web chat](/api-reference/web-chats/update).
- To recover a channel that stopped working, check `health` and [request a connection](/api-reference/channels/connections/create) of the same `type`.
- Needs a workspace API key, or an OAuth token with write access to Integrations and the `platica:write` scope.
