Skip to main content

Analytics API

The Analytics API lets you fetch call analytics and task status for an organization.

Get Analytics

Get analytics data for an organization.
GET /api/v2/platform/organisation/analytics/
Behavior:
  • Automatically filters for contact content type only.
  • If space_token is provided: fetches analytics for that specific space.
  • If space_token is not provided: fetches analytics for all contact spaces in the organization.
Note: For billing data (invoices), use the separate /billing/ endpoint.

Query Parameters

ParameterTypeRequiredDescription
space_tokenstringNoSpace token to filter by specific space. If not provided, fetches all contact spaces.

Headers

HeaderTypeRequiredDescription
Org-HandlestringYesOrganization domain handle
Product-IdstringNoProduct identifier (default: unpod.dev)
AuthorizationstringYesjwt <token>

Example Request

curl -X GET \
  'http://127.0.0.1:8000/api/v2/platform/organisation/analytics/?space_token=F1O3QJM1Y7Q1AVVUYNV4VPRB' \
  -H 'accept: application/json' \
  -H 'Org-Handle: recalll.co' \
  -H 'Product-Id: unpod.dev' \
  -H 'Authorization: jwt <token>'

Response

{
  "status_code": 200,
  "message": "Analytics fetched successfully",
  "data": {
    "call_analytics": {
      "total_calls": 419,
      "interested": 77,
      "call_back": 13,
      "send_details": 1,
      "not_interested": 20,
      "not_connected": 35,
      "failed": 200,
      "avg_success_score": 467
    },
    "call_status": {
      "total_tasks": 419,
      "completed": 302,
      "failed": 109,
      "pending": 2,
      "in_progress": 1,
      "success_rate": 72.08
    }
  }
}

Response Fields

FieldTypeDescription
messagestringStatus message
status_codeintegerHTTP-like status code
dataobjectAnalytics payload
data.call_analytics includes:
FieldTypeDescription
total_callsintegerTotal calls
interestedintegerInterested calls
call_backintegerCallback requests
send_detailsintegerSend details count
not_interestedintegerNot interested count
not_connectedintegerNot connected count
failedintegerFailed calls
avg_success_scorenumberAverage success score
data.call_status includes:
FieldTypeDescription
total_tasksintegerTotal tasks
completedintegerCompleted tasks
failedintegerFailed tasks
pendingintegerPending tasks
in_progressintegerIn progress tasks
success_ratenumberSuccess rate percentage

Error Responses

400 Bad request - missing required headers. 401 Unauthorized
{
  "status_code": 401,
  "message": "Authentication credentials were not provided."
}
404 Organization not found.