Path parameters
-
The SID of the Trunk to associate the phone number with.
Body
-
The SID of the Incoming Phone Number that you want to associate with the trunk.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^PN[0-9a-fA-F]{32}$
.
POST /v1/Trunks/{TrunkSid}/PhoneNumbers
curl \
-X POST https://trunking.twilio.com/v1/Trunks/{TrunkSid}/PhoneNumbers \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'PhoneNumberSid=string'
Request example
{
"PhoneNumberSid": "string"
}
Request examples
{
"PhoneNumberSid": "string"
}
Response examples (201)
{
"account_sid": "string",
"address_requirements": "none",
"api_version": "string",
"beta": true,
"capabilities": {},
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"friendly_name": "string",
"links": {},
"phone_number": "string",
"sid": "string",
"sms_application_sid": "string",
"sms_fallback_method": "HEAD",
"sms_fallback_url": "https://example.com",
"sms_method": "HEAD",
"sms_url": "https://example.com",
"status_callback": "https://example.com",
"status_callback_method": "HEAD",
"trunk_sid": "string",
"url": "https://example.com",
"voice_application_sid": "string",
"voice_caller_id_lookup": true,
"voice_fallback_method": "HEAD",
"voice_fallback_url": "https://example.com",
"voice_method": "HEAD",
"voice_url": "https://example.com"
}
Response examples (201)
{
"account_sid": "string",
"address_requirements": "none",
"api_version": "string",
"beta": true,
"capabilities": {},
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"friendly_name": "string",
"links": {},
"phone_number": "string",
"sid": "string",
"sms_application_sid": "string",
"sms_fallback_method": "HEAD",
"sms_fallback_url": "https://example.com",
"sms_method": "HEAD",
"trunk_sid": "string",
"url": "https://example.com",
"voice_application_sid": "string",
"voice_caller_id_lookup": true,
"voice_fallback_method": "HEAD",
"voice_fallback_url": "https://example.com",
"voice_method": "HEAD",
"voice_url": "https://example.com",
"sms_url": "https://example.com",
"status_callback": "https://example.com",
"status_callback_method": "HEAD"
}