Skip to main content

Searching Numbers on your Account

The Bandwidth Telephone Numbers API allows you to search for telephone numbers across all of the accounts that your user credentials have access to. You can then view detailed information about the telephone numbers on any of your accounts.

caution

When querying for a phone number that is NOT in your account you will receive the error Telephone Numbers cannot be found on accounts. Within an <ErrorList> XML element.

Search All Numbers#

Request URL#

GET https://dashboard.bandwidth.com/api/tns

Examples#

Request

GET https://dashboard.bandwidth.com/api/tns HTTP/1.1
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Response

HTTP 200 OK
Content-Type: application/xml; charset=utf-8
<TelephoneNumbersResponse>
<TelephoneNumberCount>5</TelephoneNumberCount>
<Links>
<first><!-- Snip --></first>
<next><!-- Snip --></next>
</Links>
<TelephoneNumbers>
<TelephoneNumber>
<City>CARY</City>
<Lata>426</Lata>
<State>NC</State>
<FullNumber>9192381138</FullNumber>
<Tier>0</Tier>
<VendorId>49</VendorId>
<VendorName>Bandwidth CLEC</VendorName>
<RateCenter>CARY</RateCenter>
<Status>Inservice</Status>
<AccountId>9900008</AccountId>
<LastModified>2013-12-05T05:58:27.000Z</LastModified>
<InServiceDate>2013-12-05T05:58:27.000Z</InServiceDate>
</TelephoneNumber>
<TelephoneNumber>
<City>CARY</City>
<Lata>426</Lata>
<State>NC</State>
<FullNumber>9192381139</FullNumber>
<Tier>0</Tier>
<VendorId>49</VendorId>
<VendorName>Bandwidth CLEC</VendorName>
<RateCenter>CARY</RateCenter>
<Status>Inservice</Status>
<AccountId>9900000</AccountId>
<LastModified>2013-12-05T05:58:27.000Z</LastModified>
<InServiceDate>2013-12-05T05:58:27.000Z</InServiceDate>
</TelephoneNumber>
</TelephoneNumbers>
</TelephoneNumbersResponse>

Search for Specific Numbers#

Request URL#

POST https://dashboard.bandwidth.com/api/tns

Examples#

Request

POST https://dashboard.bandwidth.com/api/tns HTTP/1.1
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
<TnList>
<Tn>3172000285</Tn>
<Tn>3172000207</Tn>
</TnList>

Response

HTTP 200 OK
Content-Type: application/xml; charset=utf-8
<TelephoneNumbersResponse>
<TelephoneNumberCount>4</TelephoneNumberCount>
<Links>
<first><!-- Snip --></first>
</Links>
<TelephoneNumbers>
<TelephoneNumber>
<City>INDIANAPOLIS</City>
<Lata>336</Lata>
<State>IN</State>
<FullNumber>3172000000</FullNumber>
<Tier>0</Tier>
<VendorId>49</VendorId>
<VendorName>Bandwidth CLEC</VendorName>
<RateCenter>INDIANAPLS</RateCenter>
<Status>Available</Status>
<AccountId>753</AccountId>
<LastModified>2016-11-16T19:34:22.000Z</LastModified>
</TelephoneNumber>
<TelephoneNumber>
<City>INDIANAPOLIS</City>
<Lata>336</Lata>
<State>IN</State>
<FullNumber>3172000500</FullNumber>
<Tier>0</Tier>
<VendorId>49</VendorId>
<VendorName>Bandwidth CLEC</VendorName>
<RateCenter>INDIANAPLS</RateCenter>
<Status>Aging</Status>
<AccountId>14</AccountId>
<LastModified>2016-11-16T19:34:22.000Z</LastModified>
</TelephoneNumber>
</TelephoneNumbers>
</TelephoneNumbersResponse>

Specific Number Details#

Request URL#

GET https://dashboard.bandwidth.com/api/tns/{tn}

Examples#

Request

GET https://dashboard.bandwidth.com/api/tns/{tn} HTTP/1.1
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Response

HTTP 200 OK
Content-Type: application/xml; charset=utf-8
<TelephoneNumberResponse>
<TelephoneNumber>2012035013</TelephoneNumber>
<Status>Inservice</Status>
<LastModifiedDate>2014-03-25 12:55:11.0</LastModifiedDate>
<OrderCreateDate>2014-03-25T12:55:11.810Z</OrderCreateDate>
<OrderId>cf79d3c3-21b7-4db7-9867-273a1867f934</OrderId>
<OrderType>NEW_NUMBER_ORDER</OrderType>
<InServiceDate>2014-03-25T12:55:11.810Z</InServiceDate>
<SiteId>2409</SiteId>
<AccountId>8000273</AccountId>
</TelephoneNumberResponse>