POST /events
Send an agent event for monitoring and rule evaluation.
Request Body
| Field | Type | Required | Description |
|---|
action | string | Yes* | Agent action name |
event_type | string | Yes* | Alternative to action |
message | string | No | Human readable description |
severity | string | No | low | medium | high | critical |
metadata | object | No | Any key/value pairs |
resource | string | No | Target resource |
user_id | string | No | Associated user |
tags | string[] | No | Filterable tags |
requires_approval | boolean | No | Force human approval |
callback_url | string | No | Webhook for approval result |
* Provide either action or event_type.
Response
| Field | Type | Description |
|---|
success | boolean | Event accepted |
event_id | string | Event ID |
rules_matched | number | Rules that fired |
blocked | boolean | If true, stop the action |
approval_id | string? | Present if approval required |
incident_created | boolean | Incident opened |
ai_classification | object? | Risk score + label |
Error Codes
| Code | Meaning | Fix |
|---|
| 401 | Invalid API key | Check key in dashboard |
| 403 | Action blocked by rule | Review rules |
| 422 | Invalid payload | Check required fields |
| 429 | Plan limit reached | Upgrade plan |
| 500 | Server error | Retry or contact support |