An OutgoingCallerId resource represents a single verified number that may be used as a caller ID when making outgoing calls via the REST API and within the TwiML
Path parameters
-
The SID of the Account responsible for the new caller ID resource.
Minimum length is
34, maximum length is34. Format should match the following pattern:^AC[0-9a-fA-F]{32}$.
Body
-
The phone number to verify in E.164 format, which consists of a + followed by the country code and subscriber number.
-
A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number.
-
The number of seconds to delay before initiating the verification call. Can be an integer between
0and60, inclusive. The default is0. -
The digits to dial after connecting the verification call.
-
The URL we should call using the
status_callback_methodto send status information about the verification process to your application. -
The HTTP method we should use to call
status_callback. Can be:GETorPOST, and the default isPOST.Values are
GETorPOST.
curl \
--request POST 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'CallDelay=100&Extension=extension&PhoneNumber=%2B18001234567&FriendlyName=friendly_name&StatusCallback=http%3A%2F%2Fwww.example.com&StatusCallbackMethod=GET'
{"CallDelay" => 100, "Extension" => "extension", "PhoneNumber" => "+18001234567", "FriendlyName" => "friendly_name", "StatusCallback" => "http://www.example.com", "StatusCallbackMethod" => "GET"}
{
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"phone_number": "+18001234567",
"friendly_name": "friendly_name",
"validation_code": "111111"
}