An
/2008-08-01/Accounts/{YourAccountSid}/OutgoingCallerIds
| Property | Description |
|---|---|
| Sid | A 34 character string that uniquely identifies this resource. |
| DateCreated | The date that this resource was created, given in RFC 2822 format. |
| DateUpdated | The date that this resource was last updated, given in RFC 2822 format. |
| FriendlyName | A human readable descriptive text for this resource, up to 64 characters long. By default, the FriendlyName is a nicely formatted version of the PhoneNumber. |
| AccountSid | The id of the account with which this resource is associated. |
| PhoneNumber | The 10 digit incoming phone number. Always presented as a 10 digit number, with no "decoration" (like dashes, parentheses, etc.) |
/2008-08-01/Accounts/{YourAccountSid}/OutgoingCallerIds
Returns a list of <OutgoingCallerId> elements, each representing a Caller ID number validated for your account, under an <OutgoingCallerIds> list element, which includes paging information.
Example:
<TwilioResponse>
<OutgoingCallerIds page="0" numpages="1" pagesize="50" total="2" start="0" end="0">
<OutgoingCallerId>
<Sid>PNe536dfda7c6184afab78d980cb8cdf43</Sid>
<AccountSid>AC35542fc30a091bed0c1ed511e1d9935d</AccountSid>
<FriendlyName>Bob Cell Phone</FriendlyName>
<PhoneNumber>4158675309</PhoneNumber>
<DateCreated>Tue, 01 Apr 2008 11:26:32 -0700</DateCreated>
<DateUpdated>Tue, 01 Apr 2008 11:26:32 -0700</DateUpdated>
</OutgoingCallerId>
<OutgoingCallerId>
<Sid>PNe536dfda7c6DDd455fed980cb83345FF</Sid>
<AccountSid>AC35542fc30a091bed0c1ed511e1d9935d</AccountSid>
<FriendlyName>Company Main Line</FriendlyName>
<PhoneNumber>4158675310</PhoneNumber>
<DateCreated>Tue, 01 Apr 2008 11:26:32 -0700</DateCreated>
<DateUpdated>Tue, 01 Apr 2008 11:26:32 -0700</DateUpdated>
</OutgoingCallerId>
</OutgoingCallerIds>
</TwilioResponse>
Adds a new CallerID to your account. After making this API call, Twilio will return to you a validation code and Twilio will dial the phone number given to perform validation. The code returned must be entered via the phone before the CallerID will be added to your account. Parameters must include:
| Param | Optional | Description |
|---|---|---|
| PhoneNumber | Required | The 10 digit phone number, but you can specify it in any readable format, such as 415-555-1212 or (415) 555.1212 or 1-415-555-1212 |
| FriendlyName | Optional | A human readable description of Caller ID resource, with maximum length 64 characters. Ex.: 'My Cell Phone'. Defaults to a nicely formatted version of the PhoneNumber. |
| CallDelay | Optional | The number of seconds, between 0 and 60, to delay before initiating the Validation Call. Defaults to 0. |
This will create a new CallerID validation request, which initiates a call to the phone number provided requesting that they enter the validation code. The validation request is represented in the response in a
| Property | Description |
|---|---|
| AccountSid | The account to which the Validation Request belongs. |
| PhoneNumber | The 10 digit phone number that is being validated. |
| FriendlyName | The friendly name you provided, if any. |
| ValidationCode | The 6 digit validation code that must be entered via the phone to validate this phone number for Caller ID. |
For example:
POST /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/OutgoingCallerIds HTTP/1.1 \ FriendlyName=My+Home+Phone+Number&PhoneNumber=4158675309
<TwilioResponse>
<ValidationRequest>
<AccountSid>AC309475e5fede1b49e100272a8640f438</AccountSid>
<PhoneNumber>4158675309</PhoneNumber>
<ValidationCode>123456</ValidationCode>
</ValidationRequest>
</TwilioResponse>
Typically, you would present that validation code to the user who is trying to validate their phone number. If you Add a Caller ID via the Twilio website, this is what we're doing.
Not Supported.
Not Supported.
You may limit the list by providing certain query string parameters to the listing resource. Note, parameters are case-sensitive:
https://api.twilio.com/2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/OutgoingCallerIds?PhoneNumber=4158675309
Would only show the caller id record for phone number (415) 867-5309.
/2008-08-01/Accounts/{YourAccountSid}/OutgoingCallerIds/{OutgoingCallerIdSid}
This resource represents an individual caller id registered to your account.
GET /2008-08-01/Accounts/AC309475e5fede1b49e100272a8640f438/OutgoingCallerIds/PNe536dfda7c6184afab78d980cb8cdf43 HTTP/1.1
<TwilioResponse>
<OutgoingCallerId>
<Sid>PNe536dfda7c6184afab78d980cb8cdf43</Sid>
<AccountSid>AC35542fc30a091bed0c1ed511e1d9935d</AccountSid>
<FriendlyName>My Home Phone Number</FriendlyName>
<PhoneNumber>4158675309</PhoneNumber>
<DateCreated>Tue, 01 Apr 2008 11:26:32 -0700</DateCreated>
<DateUpdated>Tue, 01 Apr 2008 11:26:32 -0700</DateUpdated>
</OutgoingCallerId>
</TwilioResponse>
Update the caller id, and return the updated resource. There is only one field that you may update:
| Param | Optional | Description |
|---|---|---|
| FriendlyName | Required | A human readable description of Caller ID resource, with maximum length 64 characters. Ex.: 'My Cell Phone'. Defaults to a nicely formatted version of the PhoneNumber. |
Delete the caller id from your account. An HTTP 204 response is returned, with no body.