Cancel a connection
SDK platic.channels.connections.cancel()
Cancel a pending connection. shareUrl shows that it was cancelled, and authorizeIn no longer allows authorization. Use this if you requested the connection by mistake or no longer want to complete it.
If you only sent the link to the wrong person, you can also renew it: the previous one stops working and the connection stays pending.
Example
curl -X DELETE https://api.platic.ai/v1/channels/connections/$CONNECTION_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.channels.connections.cancel("connection_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
connectionId | string | Connection id (chc_…) | ✓ |
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workspace | string | Only if your credential has several workspaces: which one the connection is in | — |
Response
data is the connection, now cancelled.
{
"status": "success",
"message": "Connection cancelled",
"data": {
"id": "chc_7f3k9QmX2pLwR4tZ",
"type": "messenger",
"completion": "authorize",
"status": "cancelled",
"authorizeIn": null,
"shareUrl": null,
"createdAt": "2026-11-12T18:40:00.000Z",
"expiresAt": "2026-11-13T18:40:00.000Z",
"agentId": "tVKljCHCNiebQdasHeit",
"availableAssets": [],
"channels": [],
"error": null,
"nextStep": "Cancelled. To connect this channel, start a new connection with POST /v1/channels/connections."
}
} The fields are in get a connection.
Errors
If already cancelled, it returns 200 with cancelled. You can repeat the call if you lost the response.
| 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 |
403 | READ_ONLY_CREDENTIAL | An internal Platica agent can only read |
404 | CONNECTION_NOT_FOUND | The connection does not exist in this workspace |
409 | CONNECTION_INSTALLING | The connection is installing (installing); it can no longer be cancelled |
409 | CONNECTION_FINISHED | The connection already finished: connected, failed, or expired, in details.status |
503 | OPERATION_UNCONFIRMED | Platica could not confirm the cancellation. Get the connection before retrying |
{
"code": 409,
"error": "Conflict - The resource state conflicts with this request",
"details": {
"code": "CONNECTION_FINISHED",
"message": "La conexión ya terminó: el canal quedó conectado.",
"status": "connected"
}
} Messages that come from Platica (details.message) are in Spanish; code against details.code. The general format is in Errors.
Notes
- It does not touch channels that already exist.
- To connect later, request another connection.
- Needs a workspace API key, or an OAuth token with write access to Integrations and the
platica:writescope.