Access and limits
Both endpoints extend the existing/public/v1 API. Send your API key in the cx-api-key header. The key needs analytics:read and must be assigned to a support agent. Configure it in Settings → API.
Report queries enforce that agent’s dashboard permissions and channel, team, and agent restrictions. A metric appearing in the catalog does not grant permission to read its data.
Neither endpoint changes tickets or sends messages. See rate limits for retry guidance and the OpenAPI reference for complete response schemas.
Discover metrics
{ "success": true, "data": [...] }. It contains the complete static catalog, without pagination. Each entry has:
The catalog contains no ticket records, customer information, workspace entity IDs, or internal data-source names. Labels and descriptions are in English. Cache this metadata rather than fetching it before every query. Not every metric supports every grouping or visualization.
Query report data
Start with one metric and a short period. Send JSON with exactly two fields:query and an IANA timezone, such as Europe/Vienna or UTC.
{ "success": true, "data": ... }. Inspect data.kind to interpret the result: for example, kpi contains value, previousValue, and format; time-series contains series and points. The request returns chart data, not an image or CSV export.
Query language
Write each clause on its own line. This is the CX report query language, not SQL: there are no arbitrary tables, joins, or SQL expressions.
Common visualizations include
kpi, line, area, grouped_bar, stacked_bar, horizontal_bar, and data_table. Charts require metrics with the same format. A data_table can mix formats and requires exactly one breakdown dimension. All metrics, including automation and CSAT, use FROM tickets; there are no separate message or survey datasets.
Query examples
Send each complete query below as thequery string in the HTTP request above, with timezone: "Europe/Vienna". Dates and metric IDs stay in the same format in every example.
Daily ticket volume
Compare tickets created and tickets resolved on each day. These are different event populations, not necessarily the same tickets.Yesterday’s ticket KPI
Compare new demand with the preceding day.New tickets by channel
Rank channels by incoming ticket volume. Channel keys in results identify your workspace’s channels, not a universal list of channel names.First response durations
Compare median waits for a qualifying human or AI reply with waits for a human reply. Both series return seconds; they are not averages.CSAT score and sample size
Keep the score next to the number of responses so you can judge small samples. A table allows the decimal score and count in one result.Automation savings and spend
Compare estimated savings with estimated spend in EUR. This is a same-format daily chart, not a billing reconciliation. These specialized automation metrics support KPIs, daily charts or tables, and action breakdowns except for AI spend. Do not mix them with unrelated ticket metrics or add category splits.Filtered team workload
Review resolved German-language tickets by team, including resolution duration. Repeated filters are combined with AND.status is the current ticket status, not its status at the time of creation. For filters such as team, channel, or human_agent, use your workspace’s entity IDs rather than display names.
Current customer-waiting snapshot
Count open tickets waiting for information from the customer, not customers waiting for support. The date clause is required by the language but does not turn a snapshot into historical data. Do not addTIMESERIES or COMPARE TO to snapshots.
Read results
These are illustrative response shapes with invented values, not guaranteed results for the example periods. Rows and points are shortened. Use returned labels and keys rather than assuming translated labels or fixed channel IDs. A KPI returns a number and its format.previousValue can be null; historical KPIs may already include a prior-period value without an explicit comparison. An explicit COMPARE TO selects the comparison period. Snapshot KPIs have no historical comparison.
series. Explicit comparisons add series keys ending in __compare.
Metric reference
All 50 registered metric IDs are listed below, grouped as in the discovery catalog. Aggregation, format, and attribution are the exact catalog values. You select the metric, not a custom aggregation function.countcounts the defined tickets, messages, surveys, actions, or events;sumadds values;averageis an arithmetic mean;medianis the middle observation;ratiodivides the eligible numerator by its denominator.duration-secondsreturns seconds,currency-eurreturns EUR,decimalreturns a decimal value, andpercentreturns percentage points:75means 75%, not0.75. CSAT scores use a 1-5 scale.- Attribution chooses the date population:
ticket_createdis a creation cohort;ticket_resolved,reply_event,reopen_event,reassignment_event,survey_submitted,action_executed, andorder_paidrefer to their respective events.agent_presencemeasures online-session time;mixed_eventscombines creation and resolution;current_snapshotmeans now. - Creation-cohort facts can change as tickets develop. In particular,
messagesandmessages_per_ticketinclude recorded messages on tickets created in the period, not only messages sent during it. Useagent_messagesfor human public messages sent in the period. - Current snapshots cannot use time dimensions or historical comparisons. Backlog age is measured from creation, not from the last message. Even with an older date clause, a snapshot is not an end-of-period backlog reconstruction.
- Rates use the denominators in their definitions below, within the applicable scope. A zero or empty result alone does not establish that no activity occurred: reporting data can be incomplete or awaiting updates. Validate important totals before using them for commitments or financial reporting.
csat_response_rateis a sent-survey cohort: scored submissions divided by surveys sent in the period. Its catalog attribution issurvey_submitted, but this calculation uses the sent date, unlike the other CSAT metrics.time_savedandmoney_savedare estimates based on your workspace’s action-time and hourly-rate assumptions.ai_spendconverts recorded AI credits using a fallback EUR-per-credit rate; it is not your invoice or a guarantee of your contracted price. Although its catalog attribution isaction_executed, spend is dated by AI run creation, including spend on days without tracked actions.
Volume and workload
Response and resolution
Quality and satisfaction
AI and automation
Troubleshooting
Date-range validation, an estimated query-cost check, and returned row/point limits do not guarantee a universal execution deadline or a cap on every result cell or underlying database operation.
LIMIT trims returned rows or points; it is not pagination or a guarantee of less database work. Split large reporting jobs into smaller date windows. Historical completeness and freshness depend on the available reporting data; a successful response does not certify either. If a valid small query fails or totals look incomplete, contact support with the response request_id, timezone, and a redacted query. Never share your API key.