search_toll_free

View as MarkdownOpen in Claude

Search for available toll-free phone numbers in a specific country.

Path parameters

AccountSidstringRequiredformat: "uuid"
The Project ID that uniquely identifies the Account to retrieve.
IsoCountrystringRequired
The ISO country code of the number.

Query parameters

AreaCodestringOptional
Find numbers in the provided area code. Only available for numbers in US and Canada.
BetabooleanOptional
New numbers on SignalWire are marked as `beta`.
ContainsstringOptional
Find numbers based off of a pattern. Valid characters are `[0-9a-zA-Z]`.
ExcludeAllAddressRequiredbooleanOptional
Accepted but has no effect on the response.
ExcludeForeignAddressRequiredbooleanOptional
Accepted but has no effect on the response.
ExcludeLocalAddressRequiredbooleanOptional
Accepted but has no effect on the response.
FaxEnabledbooleanOptional
Accepted but not supported; has no effect on the response.
InLocalitystringOptional
Limits search to a city/locality. Requires InRegion to also be set.
InRegionstringOptional
Limits search to same region as number. Must be a two-letter state/province code.
MmsEnabledbooleanOptional
Accepted but not supported; has no effect on the response.
SmsEnabledbooleanOptional
Accepted but not supported; has no effect on the response.
VoiceEnabledbooleanOptional
Accepted but not supported; has no effect on the response.

Response

uristringRequired
The URI for the API call.
available_phone_numberslist of objectsRequired
List of available phone numbers.

Response Example

Response
1{
2 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers/US/Local",
3 "available_phone_numbers": [
4 {
5 "friendly_name": "(253) 218-6751",
6 "phone_number": "+12532186751",
7 "lata": null,
8 "locality": null,
9 "rate_center": "AUBURN",
10 "latitude": null,
11 "longitude": null,
12 "region": "WA",
13 "postal_code": null,
14 "iso_country": "US",
15 "capabilities": {
16 "voice": true,
17 "SMS": true,
18 "MMS": true
19 },
20 "beta": false
21 }
22 ]
23}

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.search_toll_free("US", Contains="800")