For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
  • Core
    • Overview
    • Authorization
    • Base URL
    • Data formats
    • Paging
    • Error codes
    • Permissions
  • Calling
  • Datasphere
  • Logs
  • Messaging
  • Phone Number Management
      • GETGet phone number
      • GETList phone numbers
      • POSTPurchase phone number
      • DELRelease phone number
      • GETSearch phone numbers
      • PUTUpdate phone number
      • POSTImport phone number
      • GETLook up phone number
      • POSTAssign Resource to phone route
  • Platform
  • Resource Management
LogoLogoSignalWire Docs
Log inSign up
Support
Phone Number ManagementPhone Numbers

Search phone numbers

|View as Markdown|Open in Claude|
GET
https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/search
GET
/api/relay/rest/phone_numbers/search
$curl https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/search \
> -u "<project_id>:<api_token>"
1{
2 "links": {
3 "self": "string",
4 "first": "string",
5 "next": "string",
6 "prev": "string"
7 },
8 "data": [
9 {
10 "number": "+15551234567",
11 "region": "CA",
12 "city": "Los Angeles",
13 "rate_center": "string",
14 "lata": "string",
15 "capabilities": {
16 "voice": true,
17 "sms": true,
18 "mms": true,
19 "fax": true
20 }
21 }
22 ]
23}

Searches for available phone numbers to purchase.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Numbers.

Learn more about API scopes.

Was this page helpful?
Previous

Update phone number

Next
Built with

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Query parameters

areacodestringOptional
An areacode to search within.
number_typestringOptional

Search for either local or toll-free numbers. Defaults to local.

starts_withstringOptional

A string of 3 to 7 digits that should be used as the start of a number. Cannot be used in combination with contains or ends_with.

containsstringOptional

A string of 3 to 7 digits that should appear somewhere in the number. Cannot be used in combination with starts_with or ends_with.

ends_withstringOptional

A string of 3 to 7 digits that should be used as the end of a number. Cannot be used in combination with starts_with or contains.

max_resultsintegerOptional
The maximum number of matches to return. Upper limit of 100. Defaults to 50.
regionstringOptional

A region or state to search within. Must be an ISO 3166-2 alpha-2 code, i.e. TX for Texas. Only supported for local searches; not supported when number_type is toll-free.

citystringOptional

A specific City to search within. Must be used in combination with region. Only supported for local searches; not supported when number_type is toll-free.

Response

The request has succeeded.
linksobject
Pagination links.
datalist of objects
List of available phone numbers.

Errors

401
Unauthorized Error
500
Internal Server Error

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)