Search for available Phone Numbers to Purchase

View as Markdown

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.

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. Cannot be used in combination with areacode.

citystringOptional

A specific City to search within. Must be used in combination with region. Cannot be used in combination with areacode, starts_with, contains, or ends_with.

Response

The request has succeeded.
datalist of objects or null
List of available phone numbers.

Errors