List

View as Markdown

Use this endpoint for the IncomingPhoneNumber method to read all of the IncomingPhoneNumbers that are associated with your SignalWire account. This will be returned as a list of IncomingPhoneNumbers.

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
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": "string",
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": "string",
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": "string",
26 "emergency_status": "Inactive",
27 "friendly_name": "(310) 338-6745",
28 "identity_sid": "string",
29 "origin": "signalwire",
30 "phone_number": "+13103386745",
31 "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
32 "sms_application_sid": "string",
33 "sms_fallback_method": "POST",
34 "sms_fallback_url": "string",
35 "sms_method": "POST",
36 "sms_url": "string",
37 "status_callback": "string",
38 "status_callback_method": "POST",
39 "trunk_sid": "string",
40 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
41 "voice_application_sid": "string",
42 "voice_caller_id_lookup": true,
43 "voice_fallback_method": "POST",
44 "voice_fallback_url": "string",
45 "voice_method": "POST",
46 "voice_url": "string",
47 "verification_status": "Unverified"
48 }
49 ]
50}

Request examples

1const { RestClient } = require('@signalwire/compatibility-api')
2const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
3
4client.incomingPhoneNumbers.each(incomingPhoneNumbers => console.log(incomingPhoneNumbers.sid));