List event history
GET
/events
x-api-key
Returns the events history. Optionally filter by phone number, event type, and tracking id. Supported `event` values are `SENT`, `FAILED`, `DELIVERED`, `READ`, `UNSUBSCRIBE`, `SUGGESTION_RESPONSE`, and `USER_MESSAGE`. Events are retained for 1 year (365 days) and then automatically deleted (each row expires at its `expires_at` timestamp).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from |
query | string | yes | Inclusive start date (UTC, YYYY-MM-DD). |
to |
query | string | yes | Inclusive end date (UTC, YYYY-MM-DD). The range must not exceed 31 days. |
phone_number |
query | string | no | Optionally filter by normalized phone number. |
event |
query | string | no | Optionally filter by one event type. Values are case-sensitive: `SENT`, `FAILED`, `DELIVERED`, `READ`, `UNSUBSCRIBE`, `SUGGESTION_RESPONSE`, or `USER_MESSAGE`. |
tracking |
query | string | no | Optionally filter events by client tracking id (e.g., campaign-123). |
agent_id |
query | string | no | Optionally filter events by the agent that sent/received them. Accepts both the short (`abc123`) and the fully-qualified (`abc123@rbm.goog`) form; event rows always store the canonical short `agent_id`. |
limit |
query | integer | no | Page size: number of events returned per page (default 100, maximum 200). |
next_token |
query | string | no | Continues a previous page. |
Responses
| Status | Description |
|---|---|
200 |
Event history page. |
400 |
Missing or invalid dates, a range over 31 days, an invalid phone_number, an invalid limit (must be an integer between 1 and 200), or a `user_id` query parameter (not accepted — events are always scoped to the caller). |
401 |
Missing or invalid API key. |
200 example
{
"events": [
{
"event_id": "01HZXAMPLE",
"type": "SENT",
"phone_number": "+33612345678",
"tracking": "campaign-123",
"agent_id": "01HAGENTEXAMPLE0000000000"
}
],
"next_token": null
}