Phone Numbers
List DID regions
Returns the regions available inside one DID country.
/api/v1/dids/catalog/regionsBefore you start
Use a catalog country and, where required, a number type.
Result
Choose the region or category that fits the number you want.
Charges and safe retries
Some numbers require documents or manual review; check the returned conditions.
Authentication
Send your account API key in the X-Api-Key header. Keep it on your server; never embed it in browser code.
Request examples
Replace the example values with your own inputs. Examples do not run on this page. Production requests can change your account or incur charges.
cURL
curl -X GET "https://api.illyvoip.com/api/v1/dids/catalog/regions?country_iso=CA&number_type=local" \
-H "X-Api-Key: ${ILLYVOIP_API_KEY:?Set ILLYVOIP_API_KEY}"Node.js
const response = await fetch("https://api.illyvoip.com/api/v1/dids/catalog/regions?country_iso=CA&number_type=local", {
method: "GET",
headers: {
"X-Api-Key": process.env.ILLYVOIP_API_KEY
}
});
const data = await response.json();
console.log(response.status, data);PHP
<?php
$ch = curl_init('https://api.illyvoip.com/api/v1/dids/catalog/regions?country_iso=CA&number_type=local');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Api-Key: ' . getenv('ILLYVOIP_API_KEY')
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . PHP_EOL;
echo $response;Python
import os
import json
import requests
response = requests.request(
"GET",
"https://api.illyvoip.com/api/v1/dids/catalog/regions?country_iso=CA&number_type=local",
headers={
"X-Api-Key": os.environ["ILLYVOIP_API_KEY"]
},
)
print(response.status_code)
print(response.json())Node.js examples run on the server (Node.js 22.17+). Python examples require requests; PHP examples require cURL. Set the environment variables referenced in each example.
Request parameters
Query parameters
country_isostringrequiredISO2 country code.
number_typestringoptionalOptional DID type.
Request behavior
Call this after choosing a country to narrow the number search. Use the returned region_code value exactly as-is in the number search API. Some destinations use numeric region codes.
Response fields
status: Request outcome. Read the resource state separately; success does not always mean delivery or completion.data: Endpoint-specific result object. Its nested fields are shown in the sample response.meta: Additional documented result metadata; consult the example for this endpoint.
HTTP responses
Expand a status to inspect its documented response format and examples. Example prices, IDs and timestamps are illustrative values, not quotes or account records.
200 Successful customer-facing response.
application/json
{
"status": "success",
"data": {
"country_iso": "CA",
"number_type": "local",
"regions": [
{
"country_iso": "CA",
"region_code": "249",
"region_name": "Area code 249",
"number_type": "local",
"pricing": {
"setup_fee": 1,
"monthly_fee": 1,
"per_minute_fee": 0.01,
"connection_fee": 0,
"currency": "EUR",
"available_quantity": 1832
},
"regulation": {
"requires_documents": false,
"documents_required": false,
"address_required": false,
"identity_required": false,
"document_labels": [],
"restrictions": null
}
}
]
},
"meta": {
"count": 1
}
}statusstringrequireddataobjectrequiredView nested fields
country_isostringrequirednumber_typestringrequiredregionsarray<object>requiredView nested fields
Array items
country_isostringrequiredregion_codestringrequiredregion_namestringrequirednumber_typestringrequiredpricingobjectrequiredView nested fields
setup_feeintegerrequiredmonthly_feeintegerrequiredper_minute_feenumberrequiredconnection_feenumberrequiredCustomer connection charge per incoming call in EUR, when available.
currencystringrequiredavailable_quantityintegerrequiredAdditional properties: not allowed.
regulationobjectrequiredView nested fields
requires_documentsbooleanrequireddocuments_requiredbooleanrequiredaddress_requiredbooleanrequiredidentity_requiredbooleanrequireddocument_labelsarray<string>requiredView nested fields
Array items
Type: string
restrictionsstringrequiredAdditional properties: not allowed.
Additional properties: not allowed.
Additional properties: not allowed.
metaobjectrequiredView nested fields
countintegerrequiredAdditional properties: not allowed.
Additional properties: not allowed.
Full schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "string",
"enum": [
"success"
]
},
"data": {
"type": "object",
"additionalProperties": false,
"properties": {
"country_iso": {
"type": "string"
},
"number_type": {
"type": "string"
},
"regions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"country_iso": {
"type": "string"
},
"region_code": {
"type": "string"
},
"region_name": {
"type": "string"
},
"number_type": {
"type": "string"
},
"pricing": {
"type": "object",
"additionalProperties": false,
"properties": {
"setup_fee": {
"type": "integer"
},
"monthly_fee": {
"type": "integer"
},
"per_minute_fee": {
"type": "number"
},
"connection_fee": {
"type": "number",
"nullable": true,
"description": "Customer connection charge per incoming call in EUR, when available."
},
"currency": {
"type": "string"
},
"available_quantity": {
"type": "integer"
}
},
"required": [
"setup_fee",
"monthly_fee",
"per_minute_fee",
"connection_fee",
"currency",
"available_quantity"
]
},
"regulation": {
"type": "object",
"additionalProperties": false,
"properties": {
"requires_documents": {
"type": "boolean"
},
"documents_required": {
"type": "boolean"
},
"address_required": {
"type": "boolean"
},
"identity_required": {
"type": "boolean"
},
"document_labels": {
"type": "array",
"items": {
"type": "string"
}
},
"restrictions": {
"type": "string",
"nullable": true
}
},
"required": [
"requires_documents",
"documents_required",
"address_required",
"identity_required",
"document_labels",
"restrictions"
]
}
},
"required": [
"country_iso",
"region_code",
"region_name",
"number_type",
"pricing",
"regulation"
]
}
}
},
"required": [
"country_iso",
"number_type",
"regions"
]
},
"meta": {
"type": "object",
"additionalProperties": false,
"properties": {
"count": {
"type": "integer"
}
},
"required": [
"count"
]
}
},
"required": [
"status",
"data",
"meta"
]
}400 The request failed validation.
application/json
statusstringrequiredmessagestringrequirederror_codestringoptionalPublic incident or validation code when the endpoint provides one.
fieldsobjectoptionalPublic validation details when supplied by the endpoint.
Additional properties: not allowed.
Full schema
{
"type": "object",
"additionalProperties": false,
"required": [
"status",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
]
},
"message": {
"type": "string"
},
"error_code": {
"type": "string",
"nullable": true,
"description": "Public incident or validation code when the endpoint provides one."
},
"fields": {
"type": "object",
"additionalProperties": true,
"description": "Public validation details when supplied by the endpoint."
}
}
}401 The API key or browser token is missing or invalid.
application/json
statusstringrequiredmessagestringrequirederror_codestringoptionalPublic incident or validation code when the endpoint provides one.
fieldsobjectoptionalPublic validation details when supplied by the endpoint.
Additional properties: not allowed.
Full schema
{
"type": "object",
"additionalProperties": false,
"required": [
"status",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
]
},
"message": {
"type": "string"
},
"error_code": {
"type": "string",
"nullable": true,
"description": "Public incident or validation code when the endpoint provides one."
},
"fields": {
"type": "object",
"additionalProperties": true,
"description": "Public validation details when supplied by the endpoint."
}
}
}403 The account is not allowed to perform this operation.
application/json
statusstringrequiredmessagestringrequirederror_codestringoptionalPublic incident or validation code when the endpoint provides one.
fieldsobjectoptionalPublic validation details when supplied by the endpoint.
Additional properties: not allowed.
Full schema
{
"type": "object",
"additionalProperties": false,
"required": [
"status",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
]
},
"message": {
"type": "string"
},
"error_code": {
"type": "string",
"nullable": true,
"description": "Public incident or validation code when the endpoint provides one."
},
"fields": {
"type": "object",
"additionalProperties": true,
"description": "Public validation details when supplied by the endpoint."
}
}
}429 The request rate limit was exceeded.
application/json
statusstringrequiredmessagestringrequirederror_codestringoptionalPublic incident or validation code when the endpoint provides one.
fieldsobjectoptionalPublic validation details when supplied by the endpoint.
Additional properties: not allowed.
Full schema
{
"type": "object",
"additionalProperties": false,
"required": [
"status",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
]
},
"message": {
"type": "string"
},
"error_code": {
"type": "string",
"nullable": true,
"description": "Public incident or validation code when the endpoint provides one."
},
"fields": {
"type": "object",
"additionalProperties": true,
"description": "Public validation details when supplied by the endpoint."
}
}
}500 An unexpected service error occurred.
application/json
statusstringrequiredmessagestringrequirederror_codestringoptionalPublic incident or validation code when the endpoint provides one.
fieldsobjectoptionalPublic validation details when supplied by the endpoint.
Additional properties: not allowed.
Full schema
{
"type": "object",
"additionalProperties": false,
"required": [
"status",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
]
},
"message": {
"type": "string"
},
"error_code": {
"type": "string",
"nullable": true,
"description": "Public incident or validation code when the endpoint provides one."
},
"fields": {
"type": "object",
"additionalProperties": true,
"description": "Public validation details when supplied by the endpoint."
}
}
}503 The service is temporarily unavailable.
application/json
statusstringrequiredmessagestringrequirederror_codestringoptionalPublic incident or validation code when the endpoint provides one.
fieldsobjectoptionalPublic validation details when supplied by the endpoint.
Additional properties: not allowed.
Full schema
{
"type": "object",
"additionalProperties": false,
"required": [
"status",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
]
},
"message": {
"type": "string"
},
"error_code": {
"type": "string",
"nullable": true,
"description": "Public incident or validation code when the endpoint provides one."
},
"fields": {
"type": "object",
"additionalProperties": true,
"description": "Public validation details when supplied by the endpoint."
}
}
}Sandbox scenarios
Use https://sandbox-api.illyvoip.com with Sandbox credentials and the X-Illyvoip-Sandbox-Scenario header. Omit the header for the documented success default. This header belongs to sandbox requests.
success, not-found, rate-limited, forbidden, service-unavailable
Try this operation in Sandbox · Environment setup and limitations