Appearance
List events
Every event your team has defined or sent, newest first.
http
GET /v1/eventsRequires a Full access API key.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | How many to return. Default 20, min 1, max 100. |
after | string | No | Return events after this event id. Cannot be combined with before. |
before | string | No | Return events before this event id. Cannot be combined with after. |
Example
bash
curl "https://api.sendgrail.com/v1/events?limit=50" \
-H "Authorization: Bearer $SENDGRAIL_API_KEY"js
const res = await fetch('https://api.sendgrail.com/v1/events?limit=50', {
headers: { Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}` },
});
const { data, has_more } = await res.json();Response
Each row is the full event object:
json
{
"object": "list",
"has_more": true,
"data": [
{
"object": "event",
"id": "evt_3nBq7Ld2KeR9",
"name": "user.created",
"schema": {
"plan": "string",
"seats": "number"
},
"created_at": "2026-07-14T19:44:32+00:00",
"updated_at": "2026-07-14T19:44:32+00:00"
},
{
"object": "event",
"id": "evt_7Kd0Za4Ht1Vc",
"name": "order.completed",
"schema": null,
"created_at": "2026-07-02T11:03:19+00:00",
"updated_at": "2026-07-02T11:03:19+00:00"
}
]
}has_more tells you whether another page exists — there is no total, because a keyset paginator never counts the table. To walk every page, pass the last id you saw as after until has_more is false. See Pagination.
An event auto-created by Send an event shows up here just like one you defined explicitly, with "schema": null until you give it a schema.