Skip to main content

Disconnecting Numbers

Disconnecting a phone number leaves it in all applicable inventories, but makes it available for activation with a new subscriber.

Create a Disconnect Order

Request URL

POST https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects

Request Parameters

ParameterRequiredDescription
NameYesThe name of the order. Max length restricted to 50 characters
TelephoneNumberListYesA list of telephone numbers to disconnect.
DisconnectModeNoThe severity of disconnect order. Typically Normal.
ProtectedNoChange protected status of telephones during disconnection. Possible values: TRUE, FALSE, UNCHANGED. Typically UNCHANGED.

Example

Request

POST https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects HTTP/1.1
Content-Type: application/xml; charset=utf-8
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

<?xml version="1.0"?>
<DisconnectTelephoneNumberOrder>
<name>training run</name>
<DisconnectTelephoneNumberOrderType>
<TelephoneNumberList>
<TelephoneNumber>5405514342</TelephoneNumber>
<TelephoneNumber>7034343704</TelephoneNumber>
</TelephoneNumberList>
</DisconnectTelephoneNumberOrderType>
</DisconnectTelephoneNumberOrder>

Response

HTTP/1.1 201 Created
Content-Type: application/xml; charset=utf-8
Location: https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects/df2gc2e2-653d-466c-945d-8f292f09ce55

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DisconnectTelephoneNumberOrderResponse>
<orderRequest>
<OrderCreateDate>2018-01-23T21:00:23.802Z</OrderCreateDate>
<id>df2gc2e2-653d-466c-945d-8f292f09ce55</id>
<DisconnectTelephoneNumberOrderType>
<TelephoneNumberList>
<TelephoneNumber>5405514342</TelephoneNumber>
<TelephoneNumber>7034343704</TelephoneNumber>
</TelephoneNumberList>
<DisconnectMode>normal</DisconnectMode>
</DisconnectTelephoneNumberOrderType>
</orderRequest>
<OrderStatus>RECEIVED</OrderStatus>
</DisconnectTelephoneNumberOrderResponse>

Fetching Disconnect Order Status

A GET Request to an existing disconnect will return it's status as well as any information originally used to create the disconnect.

Request URL

GET https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects/{disconnectId}

Example

Request

GET https://dashboard.bandwidth.com/api/accounts/{accountId}/disconnects/df2gc2e2-653d-466c-945d-8f292f09ce55 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Response

HTTP/1.1 200 OK
Content-Type: application/xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DisconnectTelephoneNumberOrderResponse>
<DisconnectedTelephoneNumberList>
<TelephoneNumber>5405514342</TelephoneNumber>
<TelephoneNumber>7034343704</TelephoneNumber>
</DisconnectedTelephoneNumberList>
<ErrorList/>
<orderRequest>
<OrderCreateDate>2015-01-20T21:05:58.026Z</OrderCreateDate>
<id>df2gc2e2-653d-466c-945d-8f292f09ce55</id>
<DisconnectTelephoneNumberOrderType>
<TelephoneNumberList>
<TelephoneNumber>7034343704</TelephoneNumber>
<TelephoneNumber>5405514342</TelephoneNumber>
</TelephoneNumberList>
<DisconnectMode>normal</DisconnectMode>
</DisconnectTelephoneNumberOrderType>
</orderRequest>
<OrderStatus>COMPLETE</OrderStatus>
</DisconnectTelephoneNumberOrderResponse>