Skip to main content
GET
List all metrics available.

Authorizations

X-CB-KEY
string
header
required

CloseBot API Key Authorization

Response

OK

key
string | null
required

Wire key to pass as metric on POST /analytics/query.

label
string | null
required

Display name.

description
string | null
required

What the metric counts, and anything it deliberately excludes.

category
string | null
required

Group heading for the metric picker. Categories should be rendered in the order they first appear in this response rather than sorted.

icon
string | null
required

Semantic icon name (e.g. "clock", "currency"). Clients map it to their own icon set and should fall back to a generic icon for an unrecognised name.

format
string | null
required

How to render the value: integer, decimal, duration (milliseconds), currency (USD), or score (0-100).

aggregation
string | null
required

How buckets combine: "sum" for counts, "average" for metrics that are already a per-bucket average, "endingBalance" for a running balance whose range value is the last bucket's, "distinct" for a count of distinct things. Only "sum" may be folded from buckets the client already has — for the others, re-query the whole range as a single bucket instead.

supportsSourceSplit
boolean
required

False for agency-wide metrics. The query endpoint rejects groupBy/source filters and the source resolution for these.

dimensions
object[] | null
required

What this metric can be filtered and segmented by. Build the filter chips from this — the endpoint rejects any dimension not listed, so offering more would surface as a 400 rather than an ignored filter.

distinctCount
boolean
required

True when the value counts contacts rather than events. Segmenting one of these gives series that sum to more than the unsegmented total — a contact active on two channels belongs to both — which is worth saying in the UI rather than hiding.

locked
boolean
required

True when this agency cannot query the metric. Analytics add-on metrics are locked without HasAnalytics; rebilled spend is locked off an agency plan. The query endpoint rejects a locked metric.

minResolution
string | null

Finest time bucket this metric can answer, or null for no limit. Contact counts are daily facts, so their finer resolutions must be disabled rather than requested.