> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/mba/api-ref/insights/get-agent-event-insights.md).

# Get agent event insights

Retrieve per-event-type volume, completion, and latency for the events sent to the agent over a date range, broken down by the event type supplied. Figures are rolled up once a day, so the most recent day may still be incomplete.

```json
{"openapi":"3.1.0","info":{"title":"Business Agent API","version":"1.51.5"},"tags":[{"name":"Insights","description":"Endpoints for retrieving the agent's usage insights"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"insights.AgentEventInsightsResponse":{"description":"The agent event insights for the requested range","properties":{"avg_e2e_latency_ms":{"description":"Mean time in milliseconds from receiving an event to the agent finishing with it, across every event type in the range. Null when nothing ran end to end","type":"number"},"data":{"description":"One row per event type received in the range, busiest first. Empty when no event of yours was received","items":{"$ref":"#/components/schemas/insights.BizAIOmniChannelAgentEventInsights"},"type":"array","uniqueItems":false}},"required":["data"],"type":"object"},"insights.BizAIOmniChannelAgentEventInsights":{"description":"Volume, completion, and latency for a single agent event type","properties":{"avg_e2e_latency_ms":{"description":"Mean time in milliseconds from receiving one of these events to the agent finishing with it, over every request in the range that ran end to end. Null when none did","type":"number"},"event_type":{"description":"The event type these figures cover, exactly as you sent it in the agent event request","type":"string"},"received":{"description":"Requests of this event type that arrived over the range, counted once each and summed across days","type":"integer"},"successfully_processed":{"description":"Requests of this event type the agent finished handling, summed across days. Requests that were turned away, skipped, or failed are not counted here. Finishing means the agent sent its message; it is not a delivery signal, and does not guarantee the message reached the customer device","type":"integer"}},"required":["event_type","received","successfully_processed"],"type":"object"},"insights.StandardError":{"description":"Standard error response for Meta Business Agent endpoints","properties":{"detail":{"description":"Human-readable explanation of the error","type":"string"},"status":{"description":"HTTP status code","type":"integer"},"title":{"description":"Short, human-readable summary of the problem","type":"string"},"type":{"description":"A URI reference identifying the problem type","type":"string"}},"type":"object"}}},"paths":{"/insights/agent_events":{"get":{"description":"Retrieve per-event-type volume, completion, and latency for the events sent to the agent over a date range, broken down by the event type supplied. Figures are rolled up once a day, so the most recent day may still be incomplete.","operationId":"get-agent-event-insights","parameters":[{"description":"Meta Business Agent API version","in":"header","name":"X-API-Version","schema":{"enum":["2.0.0"],"type":"string"}},{"description":"First day to include, as YYYY-MM-DD in Pacific Time, which may differ from your own time zone. The boundary is inclusive.","in":"query","name":"start_date","required":true,"schema":{"type":"string"}},{"description":"Last day to include, as YYYY-MM-DD in Pacific Time, which may differ from your own time zone. The boundary is inclusive. start_date and end_date may span at most 30 days, counting both the first and last day.","in":"query","name":"end_date","required":true,"schema":{"type":"string"}},{"description":"Return only this event type, named as you sent it. Omit to get every event type received in the range.","in":"query","name":"event_type","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.AgentEventInsightsResponse"}}},"description":"The agent event insights for the requested range"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Server error"}},"summary":"Get agent event insights","tags":["Insights"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/mba/api-ref/insights/get-agent-event-insights.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
