Skip to main content
POST
Query stats

Headers

Authorization
string
required

Bearer token API key

Body

application/json

Stats query. This request does not create or change data.

metrics
object[]
required

Metrics to calculate. Values in each stats row follow this order.

Minimum array length: 1
timeframe
Today · object
required

Time range for the query. Preset ranges include the current day.

filters
(ticketId · object | app · object | team · object | theymesCustomerId · object | status · object | category · object | subCategory · object | article · object | assignee · object | latestAssignee · object | language · object | platform · object | supportSource · object | channel · object | csat · object | csatIsSet · object | csatIsNotSet · object | similarTicketIssue · object | similarTicketIssueIsSet · object | similarTicketIssueIsNotSet · object | tag · object | tagIsSet · object | tagIsNotSet · object | field · object | customerTier · object | reopenStatus · object | resolutionType · object | messageSource · object | appVersion · object | ticketReopened · object | hasCsatReview · object | hasBeenAssistedByTheAssistant · object | csatSurveySent · object | assigned · object | backlogWaitTime · object | firstResponseTime · object | agentMessageCount · object | customerMessageCount · object | bulkAction · object)[]

Filters applied to every metric, in addition to each metric's own filters.

Limits which tickets count toward the stat.

Note on the field filter: it uses operators based on its field type. Dropdowns use include-any, include-all, exclude-any, and exclude-all. Text uses is, is-not, contains, and not-contains. Numbers use is, is-not, greater-than, less-than, and between. Dates use before, after, and between. Boolean fields use is with true or false. Every field type also accepts is-set and is-not-set.

breakdown
Other dimensions · object

Split each stats row by one dimension. The row breakdown is that dimension's display name.

segment
Other dimensions · object

Second dimension, returned on each row as segment.

Response

Calculated stats. This response is a read of existing data.

metrics
object[]
required
Minimum array length: 1
timeframe
Today · object
required

Time range for the query. Preset ranges include the current day.

stats
object[]
required
breakdown
Other dimensions · object

One breakdown or segment. FIELD also requires fieldKey and fieldType.

segment
Other dimensions · object

One breakdown or segment. FIELD also requires fieldKey and fieldType.