Deskhero Developer Hub
Back to deskhero.com
Stats

Ai

What Deskhero answered without a person: auto-reply and chat-bot outcomes, suggested replies, and the approved FAQ library that drives them.

GET /api/{tenant:minlength(2)}/v{version:apiVersion}/stats/ai
Authorisation
Minimum role: USER

Request arguments

Name Type Source
group_idsInt32[]Query
timeframeENUM dashboard_kpi_timeframe
fromDateTime
toDateTime
compareBoolean
Request body example

Response

Status
200 (OK)
Type
DTO_stats_ai
Wrapper
DTO_response_wrap
Other statuses
400 (BadRequest), 403 (Forbidden)
Response body example
DTO_stats_ai
NameTypeReadOnlyDescription
periodDTO_stats_periodPeriod
auto_answered_pctDTO_stats_metricShare of resolved tickets that never needed a human reply, as a percentage.
auto_answered_totalDTO_stats_metricTickets auto-answered in the window.
ai_auto_repliesDTO_stats_metricAI auto-replies sent in the window (conversation documents, not tickets).
static_auto_repliesDTO_stats_metricStatic (non-AI) auto-replies sent in the window.
chat_conversationsDTO_stats_metricTickets that started as a chat-bot conversation.
chat_resolved_pctDTO_stats_metricShare of chat conversations the visitor marked as answered, as a percentage.
suggested_repliesDTO_stats_metricSuggested replies generated in the window.
suggested_reply_coverage_pctDouble (nullable)Tickets that had a draft waiting, as a share of tickets in the window.
success_rate_seriesDTO_stats_series[]The two AI success rates per bucket, in percent: chat-bot resolved rate and auto-reply coverage of inbound email.
approved_faq_seriesDTO_stats_point[]Approved public FAQs per bucket - the bottom panel of the FAQ card. Empty until the nightly snapshot job exists: FaqMongo has no approval timestamp, so history cannot be reconstructed. The card falls back to rates-only and says when collection starts.
approved_faq_currentInt32Approved public FAQs right now, which IS knowable and worth showing.
chat_outcome_seriesDTO_stats_series[]Chat outcomes per bucket: resolved by bot, handed to a form, unrated.
missed_questionsDTO_stats_missed_question[]The visitor questions the bot could not answer. Empty until the audit-log rollup lands: the events are recorded but are neither indexed by date nor grouped by phrasing.
automation_rulesDTO_stats_term[]Automation rule hit counts. Empty until the audit-log index lands.
DTO_stats_period
NameTypeReadOnlyDescription
fromDateTimeFirst day of the window, workspace-local.
toDateTimeLast day of the window, workspace-local.
previous_fromDateTime (nullable)First day of the comparison window. Null when not comparing.
previous_toDateTime (nullable)Last day of the comparison window. Null when not comparing.
time_zoneStringIANA id of the zone every bucket and boundary was cut in.
granularityString"hour", "day" or "month" - the width of one point in every series below.
timeframeENUM dashboard_kpi_timeframeWhich preset produced this window (CUSTOM when from/to were supplied).
compareBooleanTrue when the previous-period figures are populated.
DTO_stats_metric
NameTypeReadOnlyDescription
currentDouble (nullable)Current
previousDouble (nullable)The same figure over the previous window. Null when not comparing, or when there is no history.
DTO_stats_series
NameTypeReadOnlyDescription
keyStringStable key the frontend maps to a colour and a translated label.
labelStringServer-side fallback label, used when the key is dynamic (a group or status name).
pointsDTO_stats_point[]Points
DTO_stats_point
NameTypeReadOnlyDescription
labelStringShort human label for the axis ("Jul 20", "10:00", "Jul 2026").
dateDateTimeStart of the bucket, workspace-local.
valueDouble (nullable)Null means "no data in this bucket", which a chart draws as a gap, not a zero.
DTO_stats_missed_question
NameTypeReadOnlyDescription
questionStringQuestion
countInt32Count
last_askedDateTime (nullable)Last asked
DTO_stats_term
NameTypeReadOnlyDescription
idInt32Entity id when the term refers to one (group, status, mailbox); 0 otherwise.
keyStringStable key for terms that are enums rather than entities ("EMAIL", "CHAT_BOT").
labelStringLabel
countInt32How many tickets fell into this term.
previous_countInt32 (nullable)The term's own count in the comparison window. Null when not comparing.
valueDouble (nullable)A secondary metric where the card shows one (average seconds, a percentage).
ENUM dashboard_kpi_timeframe
ValueNameDescription
0UNKNOWNUNKNOWN
1TODAYTODAY
2YESTERDAYYESTERDAY
3THIS_WEEKTHIS_WEEK
4LAST_4_WEEKSLAST_4_WEEKS
5LAST_12_WEEKSLAST_12_WEEKS
6ALL_TIMEALL_TIME
7CUSTOMStats only: the caller supplies from and to instead. Resolving this without dates is an error, so the shared GetTimeFrame() extension deliberately refuses it.
8LAST_12_MONTHSLAST_12_MONTHS

Generated Aug 4, 2026 18:37