> 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/operate/send-an-agent-event.md).

# Send an agent event

Trigger an agent action asynchronously. The event is enqueued for processing and the endpoint returns immediately with status "accepted".

```json
{"openapi":"3.1.0","info":{"title":"Business Agent API","version":"1.51.5"},"tags":[{"name":"Operate","description":"Endpoints for evaluating and operating the agent (eval jobs, events, and tests)"}],"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":{"operate.BizAIOmniChannelAgentEventRequest":{"description":"Trigger an agent action asynchronously","properties":{"event":{"$ref":"#/components/schemas/operate.BizAIOmniChannelAgentEvent"},"to":{"description":"Consumer to send the event to: their phone number in E.164 format, or their business-scoped user ID (BSUID),\ni.e. the user_id from your webhook, e.g. US.13491208655302741918. Use the BSUID when the consumer's phone\nnumber is not available to you, for example a consumer who has adopted a WhatsApp username. Parent BSUIDs\n(parent_user_id) are not supported. The consumer must already have a conversation with your business.","type":"string"}},"required":["event","to"],"type":"object"},"operate.BizAIOmniChannelAgentEvent":{"description":"Event-specific fields","properties":{"description":{"description":"Human-readable description of the event. Max 1024 characters.","type":"string"},"payload":{"description":"Opaque JSON string passed through to the agent as-is. Max 4096 characters.","type":"string"},"type":{"description":"Partner-defined event identifier, e.g. document_verified. Max 256 characters.","type":"string"}},"required":["description","payload","type"],"type":"object"},"operate.BizAIOmniChannelAgentEventResponse":{"description":"Acknowledgment that the event was accepted for processing","properties":{"agent_event_id":{"description":"The ID of the recorded agent event, when one was created","type":"string"},"status":{"description":"\"accepted\" when the event is successfully enqueued","type":"string"}},"required":["status"],"type":"object"},"operate.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":{"/agent_event":{"post":{"description":"Trigger an agent action asynchronously. The event is enqueued for processing and the endpoint returns immediately with status \"accepted\".","operationId":"post-agent-event","parameters":[{"description":"Meta Business Agent API version","in":"header","name":"X-API-Version","schema":{"enum":["2.0.0"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.BizAIOmniChannelAgentEventRequest","summary":"requestBody","description":"Agent event to send"}}},"description":"Agent event to send","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.BizAIOmniChannelAgentEventResponse"}}},"description":"Acknowledgment that the event was accepted for processing"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Forbidden"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Server error"}},"summary":"Send an agent event","tags":["Operate"]}}}}
```


---

# 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/operate/send-an-agent-event.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.
