Delete a channel

SDK platic.channels.delete()

Removes the channel from the workspace and unassigns its agent. If it was still connected, it is disconnected first. From that moment it no longer appears in list channels, and getting, changing, or disconnecting it answers 404 CHANNEL_NOT_FOUND.

If you only want it to stop receiving messages for a while, disconnect it instead.

Mailboxes (Gmail, Outlook, or on your domain) are removed in Platica: they answer 409 MANAGE_IN_PLATICA with the link in details.manageUrl.

Deleting a web chat also deletes its configuration and page. Your site's code stops working. It has the same effect as delete a web chat.

Example

await platic.channels.delete("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—

Response

{
  "status": "success",
  "message": "Channel removed from the workspace",
  "data": {
    "id": "104857362918475",
    "deleted": true,
    "nextStep": "Removed from this workspace and its agent unassigned: it no longer appears among the channels. To use it again, start a connection of the same type with POST /v1/channels/connections."
  }
}

Response fields

FieldTypeDescription
idstringId of the channel you removed
deletedbooleanAlways true
nextStepstringEnglish text that says what comes next. Do not program against its wording

Errors

Deleting again a channel you already removed answers the same, deleted: true: you can repeat the call if it failed.

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 never existed in this workspace
404NOT_FOUNDYou sent connections as channelId. To cancel a connection, use cancel a connection
409MANAGE_IN_PLATICAIt is a mailbox (or an internal Platica assistant): it is removed in Platica. The link is in details.manageUrl
409WEBCHAT_CONFLICTThe web chat cannot be deleted in its current state
variesCHANNEL_DELETE_FAILEDThe channel could not be removed. Try again
503OPERATION_UNCONFIRMEDPlatica could not confirm the result. List the channels before retrying

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

Notes

  • Needs a workspace API key, or an OAuth token with write access to Integrations and the platica:write scope.