Skip to main content

API Basics

This section covers the fundamental concepts for working with the Audian API v2.

Base URL​

All API requests use:

https://api.audian.com:8443/v2/

Authentication​

After authenticating with your API key, use the X-Auth-Token header:

curl -X GET "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/users" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Accept: application/json"

See Authentication for details on obtaining your auth token.

Request Format​

Request Body Structure​

All request bodies wrap data in a data object:

{
"data": {
"field1": "value1",
"field2": "value2"
}
}

Example: Create a User​

curl -X PUT "https://api.audian.com:8443/v2/accounts/{ACCOUNT_ID}/users" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"data": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
}
}'

Response Format​

Successful Response​

{
"auth_token": "eyJhbGciOiJSUzI1...",
"data": {
"id": "user_abc123",
"first_name": "John",
"last_name": "Doe"
},
"request_id": "req_xyz789",
"revision": "automatic",
"status": "success"
}

Error Response​

{
"auth_token": "eyJhbGciOiJSUzI1...",
"data": {
"message": "invalid credentials"
},
"error": "401",
"message": "unauthorized",
"request_id": "req_xyz789",
"status": "error"
}

HTTP Methods​

MethodUsageExample
GETRetrieve resourcesGET /accounts/{id}/users
PUTCreate or replacePUT /accounts/{id}/users
POSTUpdate existingPOST /accounts/{id}/users/{user_id}
PATCHPartial updatePATCH /accounts/{id}/users/{user_id}
DELETERemoveDELETE /accounts/{id}/users/{user_id}

Account-Scoped Endpoints​

Most endpoints are scoped to your account:

/v2/accounts/{ACCOUNT_ID}/users
/v2/accounts/{ACCOUNT_ID}/devices
/v2/accounts/{ACCOUNT_ID}/callflows

The account_id is returned when you authenticate.

Common Headers​

HeaderValueRequired
X-Auth-TokenYour auth tokenYes
Content-Typeapplication/jsonYes (for PUT/POST)
Acceptapplication/jsonRecommended

Pagination​

List endpoints support pagination:

# Get users without pagination (all results)
GET /v2/accounts/{ACCOUNT_ID}/users?paginate=false

# Get paginated results
GET /v2/accounts/{ACCOUNT_ID}/users?page_size=50

See Pagination for details.

Filtering​

Filter results with query parameters:

# Filter users by first name
GET /v2/accounts/{ACCOUNT_ID}/users?filter_first_name=John

# Multiple filters
GET /v2/accounts/{ACCOUNT_ID}/devices?filter_device_type=sip_device&filter_enabled=true

See Filtering for details.

HTTP Status Codes​

CodeMeaning
200Success
201Created
204No Content (successful delete)
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Rate Limited
500Server Error

Topics​