Phone Numbers
The Phone Numbers API allows you to search for available numbers, purchase numbers, manage porting, and configure routing for your Audian account.
Base URL​
https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers
Authentication​
All requests require the X-Auth-Token header:
curl -X GET "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Accept: application/json"
List Phone Numbers​
curl -X GET "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers?paginate=false" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Accept: application/json"
Response​
{
"auth_token": "eyJhbGciOiJSUzI1...",
"data": {
"+14155552671": {
"features": ["cnam", "e911"],
"assigned_to": {
"type": "callflow",
"id": "callflow_abc123"
},
"state": "in_service"
},
"+14155552672": {
"features": ["cnam"],
"state": "in_service"
}
},
"request_id": "req_xyz789",
"status": "success"
}
Search Available Numbers​
curl -X GET "https://api.audian.com:8443/v2/phone_numbers?prefix=415&quantity=10" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Accept: application/json"
Search Parameters​
| Parameter | Description |
|---|---|
prefix | Area code or prefix to search |
city | City name |
state | State abbreviation |
quantity | Number of results to return |
Response​
{
"auth_token": "eyJhbGciOiJSUzI1...",
"data": [
"+14155550001",
"+14155550002",
"+14155550003"
],
"status": "success"
}
Purchase Phone Number​
curl -X PUT "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers/+14155550001" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"data": {}
}'
Get Phone Number Details​
curl -X GET "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers/+14155552671" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Accept: application/json"
Update Phone Number​
curl -X POST "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers/+14155552671" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"data": {
"cnam": {
"display_name": "Acme Corp"
}
}
}'
Delete/Release Phone Number​
curl -X DELETE "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers/+14155552671" \
-H "X-Auth-Token: {AUTH_TOKEN}"
Phone Number Fields​
| Field | Type | Description |
|---|---|---|
features | array | Enabled features (cnam, e911, etc.) |
assigned_to | object | What the number is assigned to |
state | string | Current number state |
cnam | object | Caller ID name settings |
e911 | object | Emergency services config |
Number States​
| State | Description |
|---|---|
available | Number available for purchase |
reserved | Number reserved but not active |
in_service | Number active and in use |
released | Number released, pending removal |
port_in | Number being ported in |
port_out | Number being ported out |
Features​
| Feature | Description |
|---|---|
cnam | Caller ID Name lookup/display |
e911 | Emergency services |
port | Number portability |
prepend | Number prepending |
Configure E911​
curl -X POST "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers/+14155552671" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"data": {
"e911": {
"street_address": "123 Main St",
"extended_address": "Suite 100",
"locality": "San Francisco",
"region": "CA",
"postal_code": "94105",
"caller_name": "Acme Corp"
}
}
}'
Assign to Callflow​
curl -X POST "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/phone_numbers/+14155552671" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"data": {
"used_by": "callflow"
}
}'
Topics​
- Search Numbers - Find available numbers
- Purchase Numbers - Buy phone numbers
- Configuration - Configure routing
- E911 - Emergency services setup
- Porting - Port existing numbers