Fetch phone number
Phone numbers associated with trunks
Path parameters
-
The SID of the Trunk from which to fetch the PhoneNumber resource.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^TK[0-9a-fA-F]{32}$
. -
The unique string that we created to identify the PhoneNumber resource to fetch.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^PN[0-9a-fA-F]{32}$
.
GET
/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}
curl \
--request GET 'https://trunking.twilio.com/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}' \
--user "username:password"
Response examples (200)
{
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"beta": false,
"links": {
"phone_number": "https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
},
"sms_url": "https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Message",
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"voice_url": "https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Call",
"sms_method": "POST",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"api_version": "2010-04-01",
"capabilities": {
"mms": true,
"sms": true,
"voice": true
},
"date_created": "2010-12-10T17:27:34Z",
"date_updated": "2015-10-09T11:36:32Z",
"phone_number": "+14158675309",
"voice_method": "POST",
"friendly_name": "(415) 867-5309",
"status_callback": "",
"sms_fallback_url": "",
"voice_fallback_url": null,
"sms_application_sid": "APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_fallback_method": "POST",
"address_requirements": "none",
"voice_application_sid": "",
"voice_fallback_method": null,
"status_callback_method": "POST",
"voice_caller_id_lookup": null
}