Detach Gateway from Phone Number - API
Detaches both the inbound and outbound SIP gateways from the given phone number, leaving the number itself active and available for re-attachment.
Note: a gateway that becomes empty as a result of this detach is not automatically deleted — it stays in your account until you remove it.
Response shape: { message, phoneNumber, inbound, outbound }. inbound and outbound are the IDs of the gateways the number was detached from (or null if the number wasn't attached to that direction) — they are not full gateway objects.
Responses:
200success.400phoneNumbermissing in body, or the number is not attached to any gateway.404phone number not found.
HTTP method and endpoint
|
values: YOUR_TOKEN_WITHOUT_ANY_PREFIX
This will be a JWT token generate using VideoSDK ApiKey and Secret.
Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.
You can generate a new token by refering this Guide: Generate Auth token
values: application/json
This is usefull for json body parameters, so that VideoSDK servers can understand that the incoming body parameter will be a JSON string.
null if it wasn't attached to one. null if it wasn't attached to one. import fetch from 'node-fetch';
const options = {
method: "POST",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"phoneNumber" : "+14155551234"
}),
};
const url= `https://api.videosdk.live/v2/sip/phone-numbers/detach`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
{
"message": "Detached successfully",
"phoneNumber": {
"phoneNumberId": "pn_abc123",
"e164": "+14155551234",
"countryCode": "US",
"provider": "other",
"origin": "SIP Configured",
"status": "ACTIVE",
"createdAt": "2026-05-11T10:00:00.000Z",
"updatedAt": "2026-05-11T10:05:00.000Z",
"name": "My SIP Setup"
},
"inbound": "gw_inbound_uuid",
"outbound": "gw_outbound_uuid"
}
Got a Question? Ask us on discord