Disconnect a channel

SDK platic.channels.disconnect()

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.

Example

await platic.channels.disconnect("channel_123");

Path parameters

ParameterTypeDescriptionRequired
channelIdstringChannel id or its prefixedChannelId✓

Query parameters

ParameterTypeDescriptionRequired
workspacestringOnly 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.

{
  "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. 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

Statusdetails.codeWhen it happens
400INVALID_REQUESTYour 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
401UNAUTHENTICATED / CREDENTIAL_REVOKEDThe credential is missing, invalid, or no longer covers this workspace
403FORBIDDENThe credential does not have write access to Integrations
403INSUFFICIENT_SCOPEThe OAuth token does not have platica:write
404CHANNEL_NOT_FOUNDThe channel does not exist in this workspace, or you removed it
409MANAGE_IN_PLATICAIt is a mailbox (or an internal Platica assistant): it is managed in Platica. The link is in details.manageUrl
409WEBCHAT_CONFLICTThe web chat cannot be turned off in its current state
variesCHANNEL_DISCONNECT_FAILEDMeta did not confirm the disconnection. Try again
503OPERATION_UNCONFIRMEDPlatica could not confirm the result. Get the channel before retrying
{
  "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.

Notes

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