Get Phone Number
curl --request GET \
--url https://agents.labs.bandwidth.com/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"address": "<string>",
"address_normalized": "<string>",
"address_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"extra_metadata": {},
"id": 123,
"is_active": true,
"is_default_caller_id": true,
"telephony_configuration_id": 123,
"updated_at": "2023-11-07T05:31:56Z",
"country_code": "<string>",
"inbound_workflow_id": 123,
"inbound_workflow_name": "<string>",
"label": "<string>",
"provider_sync": {
"ok": true,
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Phone Numbers
Get Phone Number
Retrieve a phone number by id
GET
/
api
/
v1
/
organizations
/
telephony-configs
/
{config_id}
/
phone-numbers
/
{phone_number_id}
Get Phone Number
curl --request GET \
--url https://agents.labs.bandwidth.com/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"address": "<string>",
"address_normalized": "<string>",
"address_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"extra_metadata": {},
"id": 123,
"is_active": true,
"is_default_caller_id": true,
"telephony_configuration_id": 123,
"updated_at": "2023-11-07T05:31:56Z",
"country_code": "<string>",
"inbound_workflow_id": 123,
"inbound_workflow_name": "<string>",
"label": "<string>",
"provider_sync": {
"ok": true,
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
LabsAuthLabsApiKey
Headers
Required with X-BW-LABS-AGENTS-API-KEY: the positive local workspace ID to access. The key owner must be a current member. Missing or invalid IDs return 400; non-member workspaces return 403. Not required for bearer authentication, which uses the user's selected workspace.
Response
Successful Response