Skip to main content
GET
/
v1
/
agent-analytics
/
overview
Get Overview Analytics
curl --request GET \
  --url https://api.tryhamsa.com/v1/agent-analytics/overview \
  --header 'Authorization: <api-key>'
{
  "success": true,
  "data": {
    "liveSessionsNumber": 15,
    "totalSessionsNumber": 50,
    "averageSessionDuration": 6,
    "averageMessagesPerSession": 6,
    "totalSessionDuration": 6,
    "averageWordsPerAiResponse": 6,
    "forwardToHumanAgent": 60,
    "callsOverTime": [
      {
        "timeBucket": "2025-09-15 20:00:00",
        "count": "6"
      }
    ],
    "callsByDurationBuckets": {
      "shortDurationBucketCalls": 6,
      "mediumDurationBucketCalls": 6,
      "longDurationBucketCalls": 6
    }
  }
}

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Query Parameters

voiceAgentId
string<uuid>

The unique identifier of the voice agent. If not sent, the statistics will be for all voice agents.

Example:

"48f7656f-098b-4c43-b165-7cfd2cc8ac30"

period
enum<string>
default:TODAY

The period filter option. Defaults to TODAY.

Available options:
LAST_HOUR,
TODAY,
YESTERDAY,
THIS_WEEK,
THIS_MONTH,
CUSTOM
Example:

"TODAY"

startPeriod
string

The start period timestamp in milliseconds sent in string format. Must be sent with CUSTOM date filter.

Example:

"1737590399000"

endPeriod
string

The end period timestamp in milliseconds sent in string format. Must be sent with CUSTOM date filter.

Example:

"1737590399000"

timeDifference
string
default:0

The time difference between the timezone of the user's machine to the UTC/GMT timezone.

Example:

"-3"

Response

Successful response

success
boolean
Example:

true

data
object