list

View as MarkdownOpen in Claude

List incoming phone numbers in the account.

Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier for the account that is associated with this phone number.

Query parameters

PageintegerOptional>=0Defaults to 0
The page index to retrieve. Zero-indexed.
PageSizeintegerOptional1-1000Defaults to 50
The number of results per page. Default is 50, maximum is 1000.
PageTokenstringOptional
Token for cursor-based pagination. Required when Page > 0.
PhoneNumberstringOptional
Only show numbers that match this pattern.
FriendlyNamestringOptional
Only show numbers with this friendly name.

Response

uristringRequired
The URI of the current page.
first_page_uristringRequired
The URI of the first page.
next_page_uristring or nullRequired
The URI of the next page, or null if there are no more pages.
previous_page_uristring or nullRequired
The URI of the previous page, or null if this is the first page.
pageintegerRequired
The current page number.
page_sizeintegerRequired
The number of items per page.
incoming_phone_numberslist of objectsRequired
List of incoming phone numbers.

Response Example

Response
1{
2 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers?Page=0&PageSize=50",
3 "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers?Page=0&PageSize=50",
4 "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers?Page=1&PageSize=50&PageToken=PAb3877c40da604998",
5 "page": 0,
6 "page_size": 50,
7 "incoming_phone_numbers": [
8 {
9 "account_id": "b3877c40-da60-4998-90ad-b792e98472ac",
10 "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
11 "address_requirements": "none",
12 "api_version": "2010-04-01",
13 "beta": false,
14 "capabilities": {
15 "voice": true,
16 "sms": true,
17 "mms": true,
18 "fax": true
19 },
20 "country_code": "US",
21 "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
22 "date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
23 "emergency_status": "Inactive",
24 "friendly_name": "(310) 338-6745",
25 "origin": "signalwire",
26 "phone_number": "+13103386745",
27 "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
28 "sms_fallback_method": "POST",
29 "sms_method": "POST",
30 "status_callback_method": "POST",
31 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
32 "voice_fallback_method": "POST",
33 "voice_method": "POST",
34 "verification_status": "Unverified"
35 }
36 ]
37}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9numbers = client.compat.phone_numbers.list(PageSize=20)