Diska
Analytics

Analytics overview

The summary of a window that ends when you make the request, compared with the previous window of the same size.
GET https://api.diska.ai/v1/analytics/overview

Scope: analytics:read

Daily dates are in UTC.

Parameters

Query string

NameTypeRequiredDescription
periodstringNodaily (last 24 hours), weekly (last 7 days) or monthly (last 30 days). Default: weekly.
agent_idstring | nullNoOnly this agent.
agent_typestringNoall, inbound or outbound. Default: all.

Examples

curl "https://api.diska.ai/v1/analytics/overview?period=weekly" \
  -H "Authorization: Bearer $DISKA_API_KEY"

Try it

Send the request from this page, with your key. The key stays on this page: it is not stored and is only sent to api.diska.ai. Use a test key with the fewest scopes you need.

GEThttps://api.diska.ai/v1/analytics/overview?period=weekly
Starts with dsk_. It stays in this browser tab only.
query
query
query
Enter an API key (dsk_…).

Response 200

FieldTypeDescription
periodstringAnalyzed window. One of: daily, weekly, monthly. Default: weekly.
startstringWindow start.
endstringWindow end (when the request was made).
totalsobjectWindow totals, compared with the previous one.
totals.callsobjectNumber of calls.
totals.calls.valuenumberValue in the current window. Default: 0.
totals.calls.previousnumberValue in the previous window. Default: 0.
totals.calls.change_pctnumber | nullChange in percent, or null when the previous window has no data.
totals.minutesobjectCall minutes.
totals.minutes.valuenumberValue in the current window. Default: 0.
totals.minutes.previousnumberValue in the previous window. Default: 0.
totals.minutes.change_pctnumber | nullChange in percent, or null when the previous window has no data.
totals.avg_duration_secondsobjectAverage duration in seconds.
totals.avg_duration_seconds.valuenumberValue in the current window. Default: 0.
totals.avg_duration_seconds.previousnumberValue in the previous window. Default: 0.
totals.avg_duration_seconds.change_pctnumber | nullChange in percent, or null when the previous window has no data.
dailyarrayDay-by-day evolution.
daily[].datestringDay, in UTC (YYYY-MM-DD).
daily[].callsintegerCalls that day. Default: 0.
daily[].minutesnumberMinutes that day. Default: 0.
daily[].completedintegerCompleted calls. Default: 0.
daily[].failedintegerFailed calls. Default: 0.
daily[].cancelledintegerCancelled calls. Default: 0.
by_statusarrayDistribution by call state.
by_status[].keystringValue (code).
by_status[].labelstringReadable name.
by_status[].countintegerNumber of calls. Default: 0.
by_status[].pctnumberPercent of the total. Default: 0.
by_end_reasonarrayDistribution by end reason.
by_end_reason[].keystringValue (code).
by_end_reason[].labelstringReadable name.
by_end_reason[].countintegerNumber of calls. Default: 0.
by_end_reason[].pctnumberPercent of the total. Default: 0.
sentimentobjectCall sentiment.
sentiment.positive_pctobjectPercent of positive calls.
sentiment.positive_pct.valuenumberValue in the current window. Default: 0.
sentiment.positive_pct.previousnumberValue in the previous window. Default: 0.
sentiment.positive_pct.change_pctnumber | nullChange in percent, or null when the previous window has no data.
sentiment.classifiedintegerCalls with a classified sentiment. Default: 0.
sentiment.totalintegerTotal calls. Default: 0.
sentiment.breakdownarrayDistribution by sentiment.
sentiment.breakdown[].keystringValue (code).
sentiment.breakdown[].labelstringReadable name.
sentiment.breakdown[].countintegerNumber of calls. Default: 0.
sentiment.breakdown[].pctnumberPercent of the total. Default: 0.
sentiment.dailyarrayDaily evolution.
sentiment.daily[].datestringDay, in UTC (YYYY-MM-DD).
sentiment.daily[].positiveintegerPositive calls. Default: 0.
sentiment.daily[].neutralintegerNeutral calls. Default: 0.
sentiment.daily[].negativeintegerNegative calls. Default: 0.
agentsarrayPerformance per agent.
agents[].agent_idstring | nullAgent.
agents[].namestringAgent name. Default: —.
agents[].callsintegerCalls. Default: 0.
agents[].minutesnumberMinutes. Default: 0.
agents[].completedintegerCompleted calls. Default: 0.
agents[].completion_pctnumberPercent of completed calls (technical completion, not a business outcome). Default: 0.
agents[].completion_change_pctnumber | nullChange in completion against the previous window.
agents[].goal_achieved_pctnumber | nullPercent of calls that reached the goal, or null when unknown.
agents[].calls_change_pctnumber | nullChange in calls.
agents[].minutes_change_pctnumber | nullChange in minutes.
agents[].goal_change_pctnumber | nullChange in goal achieved.
actionsarrayUsage of each executed action.
actions[].tool_namestringAction (code).
actions[].labelstringAction name.
actions[].usageobjectExecutions in the window, with the change.
actions[].usage.valuenumberValue in the current window. Default: 0.
actions[].usage.previousnumberValue in the previous window. Default: 0.
actions[].usage.change_pctnumber | nullChange in percent, or null when the previous window has no data.
actions[].dailyarrayExecutions per day.
actions[].daily[].datestringDay, in UTC (YYYY-MM-DD).
actions[].daily[].countintegerExecutions that day. Default: 0.
failed_callsarrayRecent failed calls.
failed_calls[].idstringCall ID.
failed_calls[].started_atstring | nullCall start.
failed_calls[].contactstring | nullCaller contact.
failed_calls[].agent_namestring | nullAgent.
failed_calls[].end_reasonstring | nullWhy it failed.
{
  "period": "weekly",
  "start": "2026-10-25T18:40:00Z",
  "end": "2026-11-01T18:40:00Z",
  "totals": {
    "calls": {
      "value": 42,
      "previous": 38,
      "change_pct": 10.5
    },
    "minutes": {
      "value": 42,
      "previous": 38,
      "change_pct": 10.5
    },
    "avg_duration_seconds": {
      "value": 42,
      "previous": 38,
      "change_pct": 10.5
    }
  },
  "daily": [
    {
      "date": "2026-10-25",
      "calls": 42,
      "minutes": 63.5,
      "completed": 38,
      "failed": 3,
      "cancelled": 1
    }
  ],
  "by_status": [
    {
      "key": "completed",
      "label": "Concluída",
      "count": 38,
      "pct": 90.5
    }
  ],
  "by_end_reason": [
    {
      "key": "completed",
      "label": "Concluída",
      "count": 38,
      "pct": 90.5
    }
  ],
  "sentiment": {
    "positive_pct": {
      "value": 42,
      "previous": 38,
      "change_pct": 10.5
    },
    "classified": 40,
    "total": 1,
    "breakdown": [
      {
        "key": "completed",
        "label": "Concluída",
        "count": 38,
        "pct": 90.5
      }
    ],
    "daily": [
      {
        "date": "2026-10-25",
        "positive": 30,
        "neutral": 8,
        "negative": 2
      }
    ]
  },
  "agents": [
    {
      "agent_id": "3f1c2a7e-5b9d-4c1e-8f3a-2d6b7e9c1a40",
      "name": "Recepção",
      "calls": 42,
      "minutes": 63.5,
      "completed": 38,
      "completion_pct": 90.5,
      "completion_change_pct": 0,
      "goal_achieved_pct": 0,
      "calls_change_pct": 0,
      "minutes_change_pct": 0,
      "goal_change_pct": 0
    }
  ],
  "actions": [
    {
      "tool_name": "transfer_call",
      "label": "Concluída",
      "usage": {
        "value": 42,
        "previous": 38,
        "change_pct": 10.5
      },
      "daily": [
        {
          "date": "2026-10-25",
          "count": 38
        }
      ]
    }
  ],
  "failed_calls": [
    {
      "id": "8d0c6a3e-2f14-4b7a-9c55-1e3f0a6d2b81",
      "started_at": "2026-10-25T18:40:00Z",
      "contact": "+244900000000",
      "agent_name": "Recepção",
      "end_reason": "caller_hangup"
    }
  ]
}

Errors

This endpoint has no errors of its own.

Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

Copyright © 2026