Get an agent's daily analytics
get_agent_analyticsGet an agent's daily analytics
The agent's activity for each UTC day from from to to, both included, at most 92 days,
with the window's totals: new conversations, messages, the customers' mood as the AI
reads it, conversations that turned angry, and the AI's completed actions. to defaults
to today in UTC, and neither date can be later than today; today's row keeps counting.
Days without activity are listed with zeros. Counts are recorded as things happen, and
one that fails to record isn't retried. Every figure but new conversations is counted
from the day Mojeeb started recording analytics, so days before it read zero (and no
mood). Reading analytics costs no messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | The last day of the report, a UTC date written `YYYY-MM-DD`, the whole day included. Defaults to today in UTC. | |
| from | Yes | The first day of the report, a UTC date written `YYYY-MM-DD` and nothing else (`422 invalid_request_body` otherwise). | |
| agent_id | Yes | The agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`. |