Ticket report: the backlog, volume, response and resolution times, by day, source, channel, agent and tag
const url = 'https://api.motenya.app/v1/products/example/ticket-report?timeZone=Europe%2FBucharest';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.motenya.app/v1/products/example/ticket-report?timeZone=Europe%2FBucharest' \ --header 'Authorization: Bearer <token>'Tickets waiting now, and over the last days days what came in, what was resolved and how fast, each compared with the period before.
Requires tickets:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Days ending today, 1–180 (default 30).
Days ending today, 1–180 (default 30).
IANA zone days are counted in, e.g. Europe/Bucharest; UTC when omitted or unknown.
Example
Europe/BucharestIANA zone days are counted in, e.g. Europe/Bucharest; UTC when omitted or unknown.
Responses
Section titled “Responses”Success
A product’s tickets over a period of days ending now. Leaves out spam, ignored and merged tickets and those of channels the key can’t see. A ticket is resolved when it is solved or closed, at the last time it became so (a ticket brought over from another help desk: its last update there). First reply is the time from the customer’s first message to the first reply after it; tickets an agent opened have none. Times are calendar time, not office hours.
object
The start of the period’s first day.
Now.
The zone days are counted in.
Tickets waiting now, whatever the period.
object
Waiting on the customer.
Open or pending with no assignee.
Tickets created.
object
Tickets resolved.
object
Time to first reply of the tickets created.
object
object
Tickets with a duration.
object
Tickets with a duration.
Time from creation to resolution of the tickets resolved.
object
object
Tickets with a duration.
object
Tickets with a duration.
Each day of the period, oldest first.
object
“YYYY-MM-DD” in the report’s time zone.
Tickets created, by where they came from; most first.
object
Email tickets created, by channel; most first.
object
The channel address the tickets came in on.
Members with tickets or replies; most resolved first.
object
The member, as in Ticket.assigneeUserId.
Open or pending tickets assigned to them now.
Tickets assigned to them resolved in the period.
Replies they sent in the period.
Median time to first reply of the period’s tickets they replied to first.
The ten tags most used on the tickets created.
object
Example
{ "sources": [ { "source": "EMAIL" } ]}Invalid request
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing, invalid, revoked or expired API key
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing scope, API turned off, published article without publish scope, or account suspended
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Not found, or outside the knowledge bases this key may use
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Slug or translation already exists
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rejected by validation (e.g. unknown language or category)
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rate limited; see Retry-After
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Internal error