Skip to main content

Usage Tracking

Monitor your API usage and feature consumption with the Usage API.

Get Current Usage​

Retrieve your current usage for the billing period.

Endpoint​

GET https://api.audian.com:8443/v2/billing/usage

Parameters​

ParameterTypeRequiredDescription
start_datestringNoStart date (ISO 8601 format)
end_datestringNoEnd date (ISO 8601 format)
granularitystringNoGranularity (day, week, month) - default: month

Request Example​

curl -X GET 'https://api.audian.com:8443/v2/billing/usage' \
-H 'X-Auth-Token: YOUR_API_KEY'

Response​

{
"success": true,
"data": {
"billing_period": {
"start": "2024-01-01T00:00:00Z",
"end": "2024-01-31T23:59:59Z"
},
"usage": {
"api_calls": {
"count": 15234,
"limit": 100000,
"percentage": 15.2,
"cost": 0.00
},
"sms_messages": {
"count": 1234,
"unit_cost": 0.01,
"cost": 12.34
},
"voice_minutes": {
"count": 456,
"unit_cost": 0.02,
"cost": 9.12
},
"phone_numbers": {
"count": 10,
"unit_cost": 0.99,
"monthly_cost": 9.90
}
},
"total_charges": 31.36,
"estimated_final_charge": 31.36
}
}

Usage Metrics​

API Calls​

  • Free Tier: 10,000 calls/month
  • Standard: Unlimited
  • Rate Limits: Apply per endpoint (see rate limiting docs)

SMS Messages​

  • Per Message: $0.01 USD
  • Inbound: Free
  • Outbound: Charged

Voice Minutes​

  • Per Minute: $0.02 USD
  • Inbound: Free (within plan limits)
  • Outbound: Charged
  • Overage: Additional charges per minute

Phone Numbers​

  • Monthly Rental: $0.99 - $4.99 USD
  • Setup Fee: Free
  • Porting: $25 one-time fee

Additional Features​

FeatureCost
Voicemail Transcription$0.25 per transcription
MMS Messages$0.05 per message
Number Porting$25 per number
Emergency Address (E911)Included

Get Detailed Usage​

Get itemized usage broken down by metric.

Endpoint​

GET https://api.audian.com:8443/v2/billing/usage/breakdown

Parameters​

ParameterTypeRequiredDescription
metricstringNoFilter by metric (api_calls, sms, voice, etc.)
granularitystringNoTime granularity (hour, day, week, month)

Request Example​

curl -X GET 'https://api.audian.com:8443/v2/billing/usage/breakdown?metric=sms&granularity=day' \
-H 'X-Auth-Token: YOUR_API_KEY'

Response​

{
"success": true,
"data": {
"metric": "sms",
"breakdown": [
{
"date": "2024-01-15",
"count": 150,
"cost": 1.50
},
{
"date": "2024-01-16",
"count": 200,
"cost": 2.00
},
{
"date": "2024-01-17",
"count": 175,
"cost": 1.75
}
],
"total_count": 525,
"total_cost": 5.25
}
}

Usage by Phone Number​

Get usage breakdown by specific phone numbers.

Endpoint​

GET https://api.audian.com:8443/v2/billing/usage/numbers

Parameters​

ParameterTypeRequiredDescription
limitintegerNoMaximum results (default: 20)
offsetintegerNoPagination offset

Request Example​

curl -X GET 'https://api.audian.com:8443/v2/billing/usage/numbers?limit=20' \
-H 'X-Auth-Token: YOUR_API_KEY'

Response​

{
"success": true,
"data": {
"numbers": [
{
"number": "+14155551234",
"friendly_name": "Support Line",
"sms_count": 234,
"sms_cost": 2.34,
"voice_minutes": 120,
"voice_cost": 2.40,
"monthly_fee": 0.99,
"total_cost": 5.73
},
{
"number": "+14155551235",
"friendly_name": "Sales Line",
"sms_count": 456,
"sms_cost": 4.56,
"voice_minutes": 340,
"voice_cost": 6.80,
"monthly_fee": 0.99,
"total_cost": 12.35
}
]
}
}

Get historical usage data to analyze trends.

Endpoint​

GET https://api.audian.com:8443/v2/billing/usage/trends

Parameters​

ParameterTypeRequiredDescription
monthsintegerNoNumber of months to retrieve (max: 24)

Request Example​

curl -X GET 'https://api.audian.com:8443/v2/billing/usage/trends?months=6' \
-H 'X-Auth-Token: YOUR_API_KEY'

Response​

{
"success": true,
"data": {
"trends": [
{
"month": "2023-09",
"sms_messages": 1000,
"voice_minutes": 200,
"phone_numbers": 8,
"total_cost": 28.50
},
{
"month": "2023-10",
"sms_messages": 1500,
"voice_minutes": 350,
"phone_numbers": 8,
"total_cost": 35.75
},
{
"month": "2023-11",
"sms_messages": 1234,
"voice_minutes": 456,
"phone_numbers": 10,
"total_cost": 42.30
}
]
}
}

Forecasting​

Estimate charges based on current month usage.

Endpoint​

GET https://api.audian.com:8443/v2/billing/forecast

Request Example​

curl -X GET 'https://api.audian.com:8443/v2/billing/forecast' \
-H 'X-Auth-Token: YOUR_API_KEY'

Response​

{
"success": true,
"data": {
"current_date": "2024-01-15",
"days_remaining": 16,
"current_charges": 15.50,
"projected_final_charge": 32.58,
"daily_average": 1.03
}
}

Usage Alerts​

Set up alerts to be notified when usage reaches thresholds.

Create Usage Alert​

POST https://api.audian.com:8443/v2/billing/alerts

Parameters:

{
"name": "SMS Usage Alert",
"metric": "sms",
"threshold": 5000,
"alert_type": "count",
"notification": "email"
}

Best Practices​

  1. Monitor Regularly: Check usage at least weekly
  2. Set Alerts: Configure alerts for your expected usage
  3. Review Trends: Look for unexpected usage patterns
  4. Forecast Costs: Use the forecast endpoint to budget
  5. Optimize Usage: Review high-cost numbers and metrics

FAQ​

Q: Why does my usage not match my invoice? A: Invoices are generated at the end of the month. Usage API shows real-time data.

Q: Can I get a daily usage report? A: Yes, use the breakdown endpoint with granularity=day.

Q: What happens if I exceed my limit? A: You'll receive an alert and your account may be restricted.

Q: Are inbound calls and SMS free? A: Inbound calls are free. Inbound SMS is free.

Q: How are overage charges calculated? A: Overages are charged at the same rate as normal usage.