Host a phone number's capability on Twilio's platform.
Host a phone number's capability on Twilio's platform.
Body
-
The number to host in +E.164 format
-
The contact phone number of the person authorized to sign the Authorization Document.
-
Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
Minimum length is
34, maximum length is34. Format should match the following pattern:^AD[0-9a-fA-F]{32}$. -
Optional. Email of the owner of this phone number that is being hosted.
-
This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to.
Minimum length is
34, maximum length is34. Format should match the following pattern:^AC[0-9a-fA-F]{32}$. -
A 128 character string that is a human readable text that describes this resource.
-
Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to.
-
The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.
-
The HTTP method that should be used to request the SmsUrl. Must be either
GETorPOST. This will be copied onto the IncomingPhoneNumber resource.Values are
GETorPOST. -
A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource.
-
Used to specify that the SMS capability will be hosted on Twilio's platform.
-
The HTTP method that should be used to request the SmsFallbackUrl. Must be either
GETorPOST. This will be copied onto the IncomingPhoneNumber resource.Values are
GETorPOST. -
Optional. The Status Callback URL attached to the IncomingPhoneNumber resource.
-
Optional. The Status Callback Method attached to the IncomingPhoneNumber resource.
Values are
GETorPOST. -
Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a
SmsApplicationSidis present, Twilio will ignore all of the SMS urls above and use those set on the application.Minimum length is
34, maximum length is34. Format should match the following pattern:^AP[0-9a-fA-F]{32}$. -
The title of the person authorized to sign the Authorization Document for this phone number.
curl \
--request POST 'https://numbers.twilio.com/v2/HostedNumber/Orders' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Email=test%40twilio.com&AddressSid=AD11111111111111111111111111111111&PhoneNumber=%2B14153608311&ContactTitle=contact_title_test&ContactPhoneNumber=%2B12344444444'
{"Email" => "test@twilio.com", "AddressSid" => "AD11111111111111111111111111111111", "PhoneNumber" => "+14153608311", "ContactTitle" => "contact_title_test", "ContactPhoneNumber" => "+12344444444"}
{"Email" => "test@twilio.com", "AddressSid" => "AD11111111111111111111111111111111", "PhoneNumber" => "+14153608311", "ContactPhoneNumber" => "+12344444444"}
{
"sid": "HRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://numbers.twilio.com/v2/HostedNumber/Orders/HRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"email": "test@twilio.com",
"status": "received",
"cc_emails": [],
"next_step": "next_step",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"address_sid": "AD11111111111111111111111111111111",
"capabilities": {
"sms": true,
"voice": false
},
"date_created": "2017-03-28T20:06:39Z",
"date_updated": "2017-03-28T20:06:39Z",
"phone_number": "+14153608311",
"contact_title": "contact_title_test",
"friendly_name": null,
"failure_reason": "",
"verification_code": null,
"verification_type": "phone-call",
"contact_phone_number": "+12344444444",
"signing_document_sid": null,
"verification_attempts": 0,
"verification_call_sids": [],
"verification_call_delay": 0,
"bulk_hosting_request_sid": "BH11111111111111111111111111111111",
"incoming_phone_number_sid": "PN11111111111111111111111111111111",
"verification_call_extension": null
}
{
"sid": "HRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://numbers.twilio.com/v2/HostedNumber/Orders/HRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"email": "test@twilio.com",
"status": "received",
"cc_emails": [],
"next_step": "next_step",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"address_sid": "AD11111111111111111111111111111111",
"capabilities": {
"sms": true,
"voice": false
},
"date_created": "2017-03-28T20:06:39Z",
"date_updated": "2017-03-28T20:06:39Z",
"phone_number": "+14153608311",
"contact_title": null,
"friendly_name": null,
"failure_reason": "",
"verification_code": null,
"verification_type": "phone-call",
"contact_phone_number": "+12344444444",
"signing_document_sid": null,
"verification_attempts": 0,
"verification_call_sids": [],
"verification_call_delay": 0,
"bulk_hosting_request_sid": "BH11111111111111111111111111111111",
"incoming_phone_number_sid": "PN11111111111111111111111111111111",
"verification_call_extension": null
}