Phone Numbers
Get DID routing config
Returns the current routing target for a phone number.
/api/v1/dids/orders/configBefore you start
Use the ID of a number order belonging to your account.
Result
Read its current routing choices before editing.
Charges and safe retries
Only route to destinations and identities you are authorized to use.
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/orders/config?order_id=YOUR_ORDER_ID" \
-H "X-Api-Key: ${ILLYVOIP_API_KEY:?Set ILLYVOIP_API_KEY}"Node.js
const response = await fetch("https://api.illyvoip.com/api/v1/dids/orders/config?order_id=YOUR_ORDER_ID", {
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/orders/config?order_id=YOUR_ORDER_ID');
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/orders/config?order_id=YOUR_ORDER_ID",
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
order_idintegerrequiredOrder ID.
Request behavior
Use this to show whether a DID points to a SIP line, queue, PSTN, or external URI.
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.
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": {
"order": {
"id": 123,
"number": "+12494251304",
"status": "active"
},
"routing": {
"type": "sip_line",
"enabled": true,
"targets": {
"sip_user_id": "1051"
},
"destination_region": "de"
},
"options": {
"sip_lines": [
{
"sip_user_id": "1051",
"display_name": "1051",
"is_main": true
}
],
"queues": [
{
"queue_id": 7,
"name": "Sales"
}
]
},
"supported_types": [
"sip_line",
"queue",
"pstn",
"sip_uri",
"external_sip_server"
],
"supported_regions": [
"de",
"us",
"sg"
]
}
}statusstringrequireddataobjectrequiredView nested fields
orderobjectrequiredView nested fields
idintegerrequirednumberstringrequiredstatusstringrequiredAdditional properties: not allowed.
routingobjectrequiredView nested fields
typestringrequiredenabledbooleanrequiredtargetsobjectrequiredView nested fields
sip_user_idstringrequiredAdditional properties: not allowed.
destination_regionstringrequiredAdditional properties: not allowed.
optionsobjectrequiredView nested fields
sip_linesarray<object>requiredView nested fields
Array items
sip_user_idstringrequireddisplay_namestringrequiredis_mainbooleanrequiredAdditional properties: not allowed.
queuesarray<object>requiredView nested fields
Array items
queue_idintegerrequirednamestringrequiredAdditional properties: not allowed.
Additional properties: not allowed.
supported_typesarray<string>requiredView nested fields
Array items
Type: string
supported_regionsarray<string>requiredView nested fields
Array items
Type: string
Additional 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": {
"order": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer"
},
"number": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"id",
"number",
"status"
]
},
"routing": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"targets": {
"type": "object",
"additionalProperties": false,
"properties": {
"sip_user_id": {
"type": "string"
}
},
"required": [
"sip_user_id"
]
},
"destination_region": {
"type": "string"
}
},
"required": [
"type",
"enabled",
"targets",
"destination_region"
]
},
"options": {
"type": "object",
"additionalProperties": false,
"properties": {
"sip_lines": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"sip_user_id": {
"type": "string"
},
"display_name": {
"type": "string"
},
"is_main": {
"type": "boolean"
}
},
"required": [
"sip_user_id",
"display_name",
"is_main"
]
}
},
"queues": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"queue_id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"required": [
"queue_id",
"name"
]
}
}
},
"required": [
"sip_lines",
"queues"
]
},
"supported_types": {
"type": "array",
"items": {
"type": "string"
}
},
"supported_regions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"order",
"routing",
"options",
"supported_types",
"supported_regions"
]
}
},
"required": [
"status",
"data"
]
}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."
}
}
}404 The requested owned resource was not found.
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