Skip to main content
Use the Chatarmin CX reporting API to track ticket volume, response times, satisfaction, and automation in your own dashboards.

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

The response is { "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.
The response uses { "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 the query 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 add TIMESERIES 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.
Time-series point values use keys from series. Explicit comparisons add series keys ending in __compare.
A category result contains labeled values.
A table describes each column’s metric and format. Do not add or average daily percentages, medians, or averages to reconstruct a period KPI; query the KPI for that period instead.

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.
  • count counts the defined tickets, messages, surveys, actions, or events; sum adds values; average is an arithmetic mean; median is the middle observation; ratio divides the eligible numerator by its denominator.
  • duration-seconds returns seconds, currency-eur returns EUR, decimal returns a decimal value, and percent returns percentage points: 75 means 75%, not 0.75. CSAT scores use a 1-5 scale.
  • Attribution chooses the date population: ticket_created is a creation cohort; ticket_resolved, reply_event, reopen_event, reassignment_event, survey_submitted, action_executed, and order_paid refer to their respective events. agent_presence measures online-session time; mixed_events combines creation and resolution; current_snapshot means now.
  • Creation-cohort facts can change as tickets develop. In particular, messages and messages_per_ticket include recorded messages on tickets created in the period, not only messages sent during it. Use agent_messages for 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_rate is a sent-survey cohort: scored submissions divided by surveys sent in the period. Its catalog attribution is survey_submitted, but this calculation uses the sent date, unlike the other CSAT metrics.
  • time_saved and money_saved are estimates based on your workspace’s action-time and hourly-rate assumptions. ai_spend converts 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 is action_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.