Skip to main content
GET
/
v1
/
accounts
/
{account_id}
/
analytics
/
usage
Get usage analytics
curl --request GET \
  --url https://api.itellico.ai/v1/accounts/{account_id}/analytics/usage \
  --header 'X-API-Key: <api-key>'
{
  "meta": {
    "account_id": "<string>",
    "start": "2023-11-07T05:31:56Z",
    "end": "2023-11-07T05:31:56Z",
    "granularity": "hour",
    "group_by": [
      "agent"
    ],
    "tz": "UTC"
  },
  "data": [
    {
      "ts": "2023-11-07T05:31:56Z",
      "values": [
        {
          "seconds": 1,
          "conversations": 1,
          "dimensions": {}
        }
      ]
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Path Parameters

account_id
string
required

Query Parameters

start
string<date-time> | null

Start timestamp (ISO-8601). Defaults to 30 days before end.

end
string<date-time> | null

End timestamp (ISO-8601). Defaults to now.

granularity
enum<string>
default:day

Bucket granularity for aggregation.

Available options:
hour,
day,
month
group_by
enum<string>[] | null

Dimensions to break results by (comma separated or repeated query params).

Dimensions for grouping usage analytics.

Attributes: AGENT: Group by individual agent. SUBACCOUNT: Group by subaccount (child team). TYPE: Group by conversation type.

Available options:
agent,
subaccount,
type
tz
string | null

IANA timezone name used for bucket boundaries (default UTC).

limit
integer | null

Maximum number of time buckets to return (default 500).

Required range: 1 <= x <= 500

Response

OK

Complete usage analytics response payload.

Attributes: meta: Metadata about the query and response. data: List of time buckets with aggregated usage values.

meta
UsageMetaSchema · object
required

Metadata describing the usage analytics response.

Attributes: account_id: UUID of the account for this usage data. start: Start datetime of the query range. end: End datetime of the query range. granularity: Time bucket granularity used. group_by: Grouping dimensions requested. tz: Timezone applied to bucket boundaries.

data
UsageBucketSchema · object[]