Delete a web chat

SDK platic.webchats.delete()

Permanently delete the web chat, its settings, page, and images. It is also disconnected from its agent. Remove the code from your HTML because it will stop working.

To hide it temporarily, turn it off. Its settings remain saved, and you can turn it on by publishing it.

Example

await platic.webchats.delete("webchat_123");

Path parameters

ParameterTypeDescriptionRequired
webchatIdstringWeb chat id (wc-…)✓

Query parameters

ParameterTypeDescriptionRequired
workspacestringOnly if your credential has several workspaces: which one the web chat is in—

Response

{
  "status": "success",
  "message": "Web chat deleted",
  "data": {
    "id": "wc-7Hq2LmN4pR8sT1vX",
    "deleted": true,
    "nextStep": "Deleted for good, with its configuration: the code pasted in sites and its page stop working, so take the code out of the site. To have a web chat again, create one with POST /v1/webchats."
  }
}

Response fields

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

A missing web chat also returns deleted: true, whether it was deleted or never existed. You can repeat the call if it failed.

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTwebchatId does not start with wc-
403FORBIDDENThe credential does not have write permission on Integrations
503WEBCHAT_SERVICE_UNAVAILABLE, WEBCHAT_SERVICE_TIMEOUTThe web chat service did not respond. You can repeat the call

Notes

  • Deleting the channel with DELETE /v1/channels/{webchatId} does the same.
  • Needs a workspace API key, or an OAuth token with write access to Integrations and the platica:write scope.