Sample - Twilio API
GET/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json

List incoming phone numbers

Lists incoming phone numbers belonging to an account. Filter the results by Beta, FriendlyName, PhoneNumber, or Origin, and use pagination parameters to control the result page.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

8 parameters
AccountSidstringrequired
The account SID that created the incoming phone number resources. Must be a 34-character SID matching the `AC` account SID format.
Betabooleanoptional
Whether to include phone numbers that are new to the platform. Defaults to true when omitted.
FriendlyNamestringoptional
A string used to identify incoming phone numbers by their assigned friendly name.
PhoneNumberstringoptional
A phone number filter in phone-number format. You can provide a partial number and use `*` as a wildcard for any digit.
Originstringoptional
Filters phone numbers by origin, such as `twilio` or `hosted`. Includes phone numbers of all origins when omitted.
PageSizeintegeroptional
The number of resources to return per page. Defaults to 50 when omitted and must be between 1 and 1000.
Pageintegeroptional
The page index used to maintain client-side pagination state. Must be zero or greater.
PageTokenstringoptional
The pagination token provided by the API for retrieving a specific result page.

1 status code
200Returns a paginated response containing incoming phone number resources and page navigation metadata, including the current page, page size, and related page URIs.
endintegeroptional
first_page_uristringoptional
next_page_uristringoptional
pageintegeroptional
page_sizeintegeroptional
previous_page_uristringoptional
startintegeroptional
uristringoptional
incoming_phone_numbersarray<object>optional

Error handling

AccountSid must be a 34-character account SID beginning with AC. PageSize must be between 1 and 1000, Page must be zero or greater, and PhoneNumber must use phone-number format when supplied.