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 "previous_page_uri": null,
6 "page": 0,
7 "page_size": 50,
8 "incoming_phone_numbers": [
9 {
10 "account_id": "b3877c40-da60-4998-90ad-b792e98472ac",
11 "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
12 "address_requirements": "none",
13 "address_sid": null,
14 "api_version": "2010-04-01",
15 "beta": false,
16 "capabilities": {
17 "voice": true,
18 "sms": true,
19 "mms": true,
20 "fax": true
21 },
22 "country_code": "US",
23 "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
24 "date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
25 "emergency_address_sid": null,
26 "emergency_status": "Inactive",
27 "friendly_name": "(310) 338-6745",
28 "identity_sid": null,
29 "origin": "signalwire",
30 "phone_number": "+13103386745",
31 "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
32 "sms_application_sid": null,
33 "sms_fallback_method": "POST",
34 "sms_fallback_url": null,
35 "sms_method": "POST",
36 "sms_url": null,
37 "status_callback": null,
38 "status_callback_method": "POST",
39 "trunk_sid": null,
40 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
41 "voice_application_sid": null,
42 "voice_caller_id_lookup": null,
43 "voice_fallback_method": "POST",
44 "voice_fallback_url": null,
45 "voice_method": "POST",
46 "voice_url": null,
47 "verification_status": "Unverified"
48 }
49 ]
50}

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)