---
docId: doc_7b46c073ab2544eebdcc83a735739dd3
title: Disconnect a channel
description: "Stop sending and receiving messages without deleting the channel."
api:
  group: canales
  auth: bearer
  operations:
    - operationId: disconnectChannel
      method: POST
      path: '/v1/channels/{channelId}/disconnect'
      postmanName: Disconnect a channel
---

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

# Disconnect a channel

Stop the channel from sending and receiving messages:

- On WhatsApp, Messenger, Instagram, and comments, Platica stops receiving what Meta sends.
- On a web chat, it turns it off: it stops loading on your site and on its page right away.

Mailboxes (Gmail, Outlook, or on your domain) are managed in Platica: it answers `409 MANAGE_IN_PLATICA` with the link in `details.manageUrl` and changes nothing.

The channel stays in the workspace with its history and its agent. A web chat also keeps its configuration and its code, and is turned on again by [publishing it](/api-reference/web-chats/publish).

## Example

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

```bash
curl -X POST https://api.platic.ai/v1/channels/$CHANNEL_ID/disconnect \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

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

```ts
await platic.channels.disconnect("channel_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 | Only if your credential has several workspaces: which one the channel is in | — |

## Request body

It has no body.

## Response

`data` is the disconnected channel, with `nextStep`.

```json
{
  "status": "success",
  "message": "Channel disconnected",
  "data": {
    "id": "104857362918475",
    "prefixedChannelId": "fb-104857362918475",
    "platform": "messenger",
    "channelType": "messenger",
    "isConnected": false,
    "status": "DISCONNECTED",
    "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-14T10:15:00.000Z",
    "health": {
      "state": "disconnected",
      "reason": "disconnected",
      "since": "2026-11-14T10:15:00.000Z"
    },
    "nextStep": "Disconnected. The channel keeps its history and its agent. To connect it again, start a connection of the same type with POST /v1/channels/connections."
  }
}
```

The channel's fields are in [list channels](/api-reference/channels/list#channel-fields). `nextStep` is English text that says what comes next.

On a web chat, `health` ends up `disconnected` and `nextStep` says how to turn it on.

## Errors

<Collapsible summary="Show error codes and fixes">

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | Your credential covers several workspaces and you did not send `?workspace=`, or you sent one it does not cover. `details.available` lists the ones you can use |
| `401` | `UNAUTHENTICATED` / `CREDENTIAL_REVOKED` | The credential is missing, invalid, or no longer covers this workspace |
| `403` | `FORBIDDEN` | The credential does not have write access to Integrations |
| `403` | `INSUFFICIENT_SCOPE` | The OAuth token does not have `platica:write` |
| `404` | `CHANNEL_NOT_FOUND` | The channel does not exist in this workspace, or you removed it |
| `409` | `MANAGE_IN_PLATICA` | It is a mailbox (or an internal Platica assistant): it is managed in Platica. The link is in `details.manageUrl` |
| `409` | `WEBCHAT_CONFLICT` | The web chat cannot be turned off in its current state |
| varies | `CHANNEL_DISCONNECT_FAILED` | Meta did not confirm the disconnection. Try again |
| `503` | `OPERATION_UNCONFIRMED` | Platica could not confirm the result. [Get the channel](/api-reference/channels/get) before retrying |

```json
{
  "code": 409,
  "error": "Conflict - The resource state conflicts with this request",
  "details": {
    "code": "MANAGE_IN_PLATICA",
    "message": "Este canal todavía se administra desde Platica.",
    "manageUrl": "https://app.platica.mx/workspace/g6yCA16pkWl5eXo7KszB/integrations/channels"
  }
}
```

Messages that come from Platica (`details.message`) are in Spanish; code against `details.code`.

Disconnecting a channel that was already disconnected changes nothing: you can repeat the call if it failed.

<Note type="tip">

To connect it again, [request a connection](/api-reference/channels/connections/create) of the same `type`. If the person authorizes the same page or the same mailbox, the channel that already exists is connected again. A web chat does not use a connection: it is turned on by [publishing it](/api-reference/web-chats/publish).

</Note>

</Collapsible>

## Notes

- `PATCH /v1/channels/{channelId}` with `isConnected: false` does the same. See [update a channel](/api-reference/channels/update).
- To remove it from the workspace, use [delete a channel](/api-reference/channels/delete).
- Needs a workspace API key, or an OAuth token with write access to Integrations and the `platica:write` scope.
