Delete a Connection
Deletes a connection you previously created. The connection moves to DELETED status and stops being available to routing. Returns 204 No Content on success.
A connection that is still referenced by an active routing rule cannot be deleted — the request fails with 409 CONNECTION_IN_USE. Detach it from your routes first, then retry.
Path Parameters
connection_idstringrequired
The id returned by Create a Connection. Must belong to the account your API key is scoped to.
Headers
X-Account-Codestringrequired
UUID of the account the connection belongs to.
Response
Returns 204 No Content with an empty body.
cURL
curl -X DELETE 'https://api.whitelabel.com/v1/connections/f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' \
-H 'public-api-key: <YOUR_PUBLIC_KEY>' \
-H 'private-secret-key: <YOUR_SECRET_KEY>' \
-H 'X-Account-Code: a1b2c3d4-e5f6-7890-abcd-ef1234567890'409 — In Use
{
"type": "conflict",
"code": "CONNECTION_IN_USE",
"message": "Connection 'f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' is still referenced by an active routing rule",
"details": { "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e" }
}404 Not Found
{
"type": "not_found",
"code": "CONNECTION_NOT_FOUND",
"message": "Connection '...' was not found",
"details": { "connection_id": "..." }
}Errors
| HTTP | code |
|---|---|
401 | NOT_AUTHENTICATEDMissing or invalid API key. |
404 | CONNECTION_NOT_FOUNDUnknown connection_id, or the id belongs to a different account. |
409 | CONNECTION_IN_USEThe connection is still referenced by an active routing rule. |
DELETE
/connections/{connection_id}Deletes a connection. The connection moves to DELETED status and stops being available to routing.
Header Parameters
X-Account-Codestringrequired
Path Parameters
connection_idstringrequired
Response
No Content
Unauthorized
typestring
codestring
messagestring
Not Found
typestring
codestring
messagestring
Conflict
typestring
codestring
messagestring
API Reference › Organizations › Connections