Skip to main content
GET
Get metrics timeseries

Authorizations

Authorization
string
header
required

An Admin API key, starting with cas_admin_.

Query Parameters

userId
string

Only count usage by this user. For meetingHours and meetings, only count meetings billed to them, which are the meetings they were first to add the notetaker to.

externalEmail
string

Only count usage by this external deployment user (e.g. such as a Slack, Microsoft Teams, Google Chat, or email user).

groupId
string

Only count usage by members of this group. This uses current group membership, so it may include a member's usage from before they joined.

agentIds
string[]

Only include these Agents, using the IDs from the agent breakdown or /chats. Built-in models combine their thinking levels. Pass several as a comma-separated list.

Maximum array length: 20
excludeAgentIds
string[]

Leave out these Agents. Pass several as a comma-separated list.

Maximum array length: 20
modelIds
string[]

Only include Agents that use these models, such as claude-opus-5-5, including the built-in model's own Agent. Agents count as the model they use today, so changing an Agent's model moves its past usage too. Thinking levels are combined. Pass several as a comma-separated list.

Maximum array length: 20
excludeModelIds
string[]

Leave out Agents that use these models. Pass several as a comma-separated list.

Maximum array length: 20
workflowId
string

Only count usage of this Workflow.

source
enum<string>

Only count Agent chat usage from this source, such as slack or web. Available for credits and chatMessages; with credits, only Agent chat credits count.

Available options:
web,
slack,
teams,
googleChat,
embedded,
email,
api
from
string<date-time>
required

Inclusive start of the range as an ISO 8601 timestamp. Rounded down to the start of its bucket in UTC.

to
string<date-time>
required

Exclusive end of the range as an ISO 8601 timestamp. Rounded up to the next bucket boundary in UTC.

metric
enum<string>
required

The metric to aggregate.

Available options:
credits,
chatMessages,
workflowRuns,
meetingHours,
meetings
unit
enum<string>
required

Bucket size. Buckets are in UTC and weeks start on Monday. credits is available per day or coarser.

Available options:
hour,
day,
week,
month

Response

Successful response

from
string
required
to
string
required
metric
enum<string>
required
Available options:
credits,
chatMessages,
workflowRuns,
meetingHours,
meetings
unit
enum<string>
required
Available options:
hour,
day,
week,
month
total
number
required

Total for the whole range.

buckets
object[]
required