Search Available Numbers
Search the inventory of phone numbers available to rent.
GET
https://api.identitycall.ai/api/v1/public/virtual_numbers/availableQueries our phone-number provider for numbers available to purchase in the requested country and number type.
Requires read permission
Scopes
| API key scope | Behavior |
|---|---|
| Account-wide | Allowed. |
| Project-scoped | Allowed. The search is provider-side and not constrained by project. |
Query Parameters
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
country | string | No | US | ISO 3166-1 alpha-2 country code (case-insensitive) |
number_type | string | No | mobile | Number type: mobile, local, toll-free, or national |
Request
cURL
curl -X GET "https://api.identitycall.ai/api/v1/public/virtual_numbers/available?country=US&number_type=local" \
-H "Authorization: Bearer $IDENTITYCALL_API_KEY"Response
The shape of each entry is passed through from our phone-number provider. The fields below are typical but provider-dependent.
Response200 OK
{
"data": [
{
"phone_number": "+15551234567",
"country_code": "US",
"number_type": "local",
"upfront_cost": "1.00",
"monthly_cost": "1.00",
"features": ["sms", "voice", "mms"],
"region_information": [
{ "region_type": "state", "region_name": "CA" }
]
},
{
"phone_number": "+15551234568",
"country_code": "US",
"number_type": "local",
"upfront_cost": "1.00",
"monthly_cost": "1.00",
"features": ["voice"],
"region_information": [
{ "region_type": "state", "region_name": "NY" }
]
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
phone_number | string | E.164-formatted candidate number |
country_code | string | ISO 3166-1 alpha-2 country code |
number_type | string | Number category (mobile, local, toll-free, national) |
upfront_cost | string | One-time purchase cost (decimal as string) |
monthly_cost | string | Recurring monthly cost (decimal as string) |
features | array | Capabilities supported by the number |
region_information | array | Provider-supplied region metadata |
Errors
| Status | Error | Description |
|---|---|---|
| 422 | Provider error | The upstream provider rejected the search (invalid country, etc.) |
See Also
- Purchase Number — rent one of the candidates returned here
- List Virtual Numbers — view numbers you already own