SMAO API Documentation
Public APIStatistics

Usage breakdown for a week + assistant filter

GET
/statistics/usage

Returns the monthly + weekly + last-24h breakdown for the selected week/year window. assistant_id=all aggregates across every assistant; passing a concrete 24-hex ID filters to that assistant's calls only. Supplying an ID that does not belong to the caller's organization returns 404.

All duration fields are whole seconds (rounded down), not minutes, rated the way SMAO invoices calls: each call counts its recorded assistant session time with a minimum of 60 seconds, and the time stops once the platform hands the call off completely (a completed SIP REFER transfer). A call without recorded session time counts 0 seconds, for example a call bypassed to another destination before it reaches the assistant or one rejected by admission policy. Calls fall into weeks, days and hours by their start time in German time (Europe/Berlin); deleted calls count the usage recorded when they were deleted. hourly_call_counts_last_24h always reflects the 24h window ending at request time - it ignores the week/year filter.

Authorization

bearerAuth
AuthorizationBearer <token>

API key in the Authorization: Bearer <key> header. Keys are created in the SMAO dashboard (Settings → API Keys).

In: header

Query Parameters

week*integer

ISO week number (1–53). The week runs Monday 00:00 to Sunday 24:00 in German time (Europe/Berlin).

Range1 <= value <= 53
year*integer
Range2020 <= value <= 2100
assistant_id*|

Either the sentinel all or a 24-hex assistant id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/statistics/usage?week=1&year=2020&assistant_id=all"
{  "data": {    "period": {      "week": 0,      "year": 0    },    "assistant_id": "all",    "monthly": {      "property1": {        "call_count": 0,        "overall_call_seconds": 0,        "average_calls_per_day": 0,        "daily_call_counts": [          {            "date": "string",            "count": 0          }        ]      },      "property2": {        "call_count": 0,        "overall_call_seconds": 0,        "average_calls_per_day": 0,        "daily_call_counts": [          {            "date": "string",            "count": 0          }        ]      }    },    "weekly_call_counts": [],    "weekly_call_seconds": [],    "hourly_call_counts_last_24h": [      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0,      0    ]  }}