Skip to main content

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​

ParameterDescription
prefixArea code or prefix to search
cityCity name
stateState abbreviation
quantityNumber 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​

FieldTypeDescription
featuresarrayEnabled features (cnam, e911, etc.)
assigned_toobjectWhat the number is assigned to
statestringCurrent number state
cnamobjectCaller ID name settings
e911objectEmergency services config

Number States​

StateDescription
availableNumber available for purchase
reservedNumber reserved but not active
in_serviceNumber active and in use
releasedNumber released, pending removal
port_inNumber being ported in
port_outNumber being ported out

Features​

FeatureDescription
cnamCaller ID Name lookup/display
e911Emergency services
portNumber portability
prependNumber 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​