Skip to main content
GET
/
v1
/
analytics
/
overview
Get Analytics Overview
curl --request GET \
  --url https://api.example.com/v1/analytics/overview \
  --header 'X-API-Key: <x-api-key>'
{
  "success": true,
  "tenant_id": "<string>",
  "period": {
    "start": "<string>",
    "end": "<string>"
  },
  "total_sms_sent": 123,
  "total_sms_received": 123,
  "total_mms_sent": 123,
  "total_mms_received": 123,
  "total_voice_calls": 123,
  "total_voice_seconds": 123,
  "total_cost": 123,
  "cost_breakdown": {
    "messaging_cost": 123,
    "voice_cost": 123,
    "api_request_cost": 123,
    "api_requests_count": 123,
    "api_storage_cost": 123,
    "phone_rental_cost": 123,
    "phone_rental_count": 123,
    "phone_purchase_cost": 123,
    "phone_purchase_count": 123,
    "brand_registration_cost": 123,
    "brand_registration_count": 123,
    "kb_cost": 123,
    "kb_monthly_cost": 123,
    "kb_usage_cost": 123,
    "kb_count": 123,
    "kb_minutes": 123
  },
  "organizations_count": 123,
  "users_count": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.teli.ai/llms.txt

Use this file to discover all available pages before exploring further.

Get Analytics Overview

Returns comprehensive analytics for your tenant including message counts, voice usage, and detailed cost breakdowns.

Authentication

X-API-Key
string
required
Your API key

Query Parameters

start_date
string
Start date for filtering (ISO 8601 format: YYYY-MM-DD). Defaults to 30 days ago.
end_date
string
End date for filtering (ISO 8601 format: YYYY-MM-DD). Defaults to today.

Response

success
boolean
Whether the request was successful
tenant_id
string
Your tenant identifier
period
object
The date range for the analytics data
total_sms_sent
integer
Total SMS messages sent
total_sms_received
integer
Total SMS messages received
total_mms_sent
integer
Total MMS messages sent
total_mms_received
integer
Total MMS messages received
total_voice_calls
integer
Total voice calls made
total_voice_seconds
integer
Total voice call duration in seconds
total_cost
number
Total cost in USD
cost_breakdown
object
Detailed breakdown of costs by category
organizations_count
integer
Number of organizations under this tenant
users_count
integer
Number of users under this tenant

Example Request

curl -X GET "https://api.teli.ai/v1/analytics/overview?start_date=2024-01-01&end_date=2024-01-31" \
  -H "X-API-Key: your-api-key"

Example Response

{
  "success": true,
  "tenant_id": "your_tenant",
  "period": {
    "start": "2024-01-01",
    "end": "2024-01-31"
  },
  "total_sms_sent": 15420,
  "total_sms_received": 3250,
  "total_mms_sent": 520,
  "total_mms_received": 180,
  "total_voice_calls": 2340,
  "total_voice_seconds": 142560,
  "total_cost": 1245.67,
  "cost_breakdown": {
    "messaging_cost": 845.50,
    "voice_cost": 285.12,
    "api_request_cost": 40.00,
    "api_requests_count": 1000000,
    "api_storage_cost": 15.00,
    "phone_rental_cost": 29.90,
    "phone_rental_count": 10,
    "phone_purchase_cost": 5.00,
    "phone_purchase_count": 5,
    "brand_registration_cost": 12.00,
    "brand_registration_count": 3,
    "kb_cost": 13.15,
    "kb_monthly_cost": 10.00,
    "kb_usage_cost": 3.15,
    "kb_count": 2,
    "kb_minutes": 315.5
  },
  "organizations_count": 5,
  "users_count": 23
}

Use Cases

  • Dashboard displays - Show high-level usage metrics
  • Invoice reconciliation - Match costs with Stripe invoices
  • Usage monitoring - Track consumption across all services
  • Budget tracking - Monitor spend against allocated budgets