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
{
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers?Page=0&PageSize=50",
"first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers?Page=0&PageSize=50",
"next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers?Page=1&PageSize=50&PageToken=PAb3877c40da604998",
"previous_page_uri": null,
"page": 0,
"page_size": 50,
"incoming_phone_numbers": [
{
"account_id": "b3877c40-da60-4998-90ad-b792e98472ac",
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"address_requirements": "none",
"address_sid": null,
"api_version": "2010-04-01",
"beta": false,
"capabilities": {
"voice": true,
"sms": true,
"mms": true,
"fax": true
},
"country_code": "US",
"date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
"date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
"emergency_address_sid": null,
"emergency_status": "Inactive",
"friendly_name": "(310) 338-6745",
"identity_sid": null,
"origin": "signalwire",
"phone_number": "+13103386745",
"sid": "b3877c40-da60-4998-90ad-b792e98472pn",
"sms_application_sid": null,
"sms_fallback_method": "POST",
"sms_fallback_url": null,
"sms_method": "POST",
"sms_url": null,
"status_callback": null,
"status_callback_method": "POST",
"trunk_sid": null,
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
"voice_application_sid": null,
"voice_caller_id_lookup": null,
"voice_fallback_method": "POST",
"voice_fallback_url": null,
"voice_method": "POST",
"voice_url": null,
"verification_status": "Unverified"
}
]
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
const numbers = await client.compat.phoneNumbers.list({ PageSize: 20 });