Disconnect a channel
const url = 'https://api.siprtc.io/v1/Accounts/example/Integrations/Channels/example';const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.siprtc.io/v1/Accounts/example/Integrations/Channels/example \ --header 'Authorization: Basic <credentials>'Disconnects a sender: messages on it stop flowing. The provider webhook is cleared (always for SMS and Viber; for WhatsApp only when it is the account’s last WhatsApp sender; never for a sender imported by hand), a Viber bot is deleted, the sender’s routing is removed (the shared provider credentials go with the account’s last sender of that provider), a number this connection added is removed from the account’s numbers (otherwise only its messaging carrier is cleared), and an SMPP link no other sender uses is torn down. If the provider cannot be reached the disconnect still completes; the provider-side webhook may then need clearing by hand. Not reversible: connect again to restore. Authentication: HTTP Basic with the account’s Auth ID and Auth Secret. {auth_id} must be the authenticated account itself: a parent account’s credentials on a sub-account’s path are refused with 403 “account mismatch”, and only an account of type tenant may manage channels (403 “only the tenant administrator manages channels”). Another account’s connection is reported as 404, never shown.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of the account (must be the authenticated account)
Channel connection id (CH followed by 32 hex characters)
Responses
Section titled “ Responses ”OK
object
Data is always null.
object
Message is “Channel disconnected”.
Status is “success”.
Example
{ "message": "Channel disconnected", "status": "success"}Missing or invalid credentials; the body is the JSON string Authentication failed
Example generated
exampleAccount mismatch, or the account is not a tenant
object
Message says what went wrong.
Status is always “failed” on an error (some validation errors omit it).
Example
{ "message": "error message", "status": "failed"}No such connection on this account (message: channel connection not found)
object
Message says what went wrong.
Status is always “failed” on an error (some validation errors omit it).
Example
{ "message": "error message", "status": "failed"}Internal error, including a failed account lookup (message: the channel could not be saved)
object
Message says what went wrong.
Status is always “failed” on an error (some validation errors omit it).
Example
{ "message": "error message", "status": "failed"}Channel onboarding is not configured on this platform
object
Message says what went wrong.
Status is always “failed” on an error (some validation errors omit it).
Example
{ "message": "error message", "status": "failed"}