List events
Read back your project's events, newest first
Your project's event history, newest first: the events your webhooks and your stream receive, read back. Use it to catch up on what happened before you were listening. The stream starts from now or from an id you already hold, and a webhook endpoint is sent only what happens after it subscribes; neither reads back.
curl "https://api.mapier.ai/v1/events?type=message.received,command.settled&limit=2" \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01"{
"events": [
{
"id": "0192a7c4-6a02-7e11-8c4d-2b9f7e3a5d10",
"type": "message.received",
"occurredAt": "2026-08-24T18:03:11.000Z",
"data": {
"conversationId": "a0000000-0000-4000-8000-000000000001",
"from": "+14155550100",
"text": "is it here yet?",
"externalId": "5D1B7E0A-2F3C-4B8E-9A61-1C2D3E4F5A6B",
"replyToExternalId": null,
"occurredAt": "2026-08-24T18:03:11.000Z",
"attachmentIds": [],
"attachments": [],
"messageId": "0192a7c4-6a02-7e11-8c4d-2b9f7e3a5d22",
"lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
"contactId": "c0000000-0000-4000-8000-000000000003",
"optedOut": false
}
},
{
"id": "0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a37",
"type": "command.settled",
"occurredAt": "2026-08-24T18:01:02.000Z",
"data": {
"commandId": "3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71",
"logicalActionId": "order-2481",
"status": "succeeded",
"errorCode": null,
"conversationId": "a0000000-0000-4000-8000-000000000001",
"type": "message.send",
"messageId": "0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a99",
"lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
"externalId": null,
"namePhoto": null,
"projectId": "b0000000-0000-4000-8000-000000000002",
"environment": "live",
"failureClass": null
}
}
],
"nextCursor": "eyJiZWZvcmUiOiIyMDI2LTEwLTExVDA5OjEyOjQwWiJ9"
}Parameters
Prop
Type
Omit type and the list is the types a new webhook endpoint is subscribed to by
default. The ten opt-in types are listed only when type names them, as a
webhook endpoint and the stream treat them: location.share_started,
location.updated, location.share_ended, message.edited, message.unsent,
poll.created, poll.options_changed, poll.voted, poll.vote_cleared and
conversation.background_changed.
from and to filter on when an event was recorded. For most events that
is its occurredAt. An inbound event — a message, a receipt, a reaction — is
recorded later, by however long the channel took to report it: usually seconds,
longer after a connection outage. So a to copied from an inbound event's
occurredAt can leave that event out.
Page with cursor: pass each answer's nextCursor back, with the same filters,
until it is null. A cursor past the last page answers an empty page. A cursor
is opaque: never build or parse one.
Response
events is one page, newest first, and nextCursor is the cursor for the next,
older page, or null on the last.
Prop
Type
Each type the stream also sends carries that stream event as its data:
type | data is the stream's |
|---|---|
message.received | message event |
command.settled | command event |
message.delivered, message.read | receipt event |
message.delivery_failed | delivery_failed event |
location.share_started, location.updated, location.share_ended | location event |
message.edited, message.unsent | moderation event |
poll.created, poll.options_changed, poll.voted, poll.vote_cleared | poll event |
conversation.background_changed | chat_background event |
Every other type — message.sent, message.failed, reaction.added,
conversation.created, line.status_changed and the rest — carries the data
a webhook subscribed to it receives.
Read back, then follow
Any id you read here is a Last-Event-ID that
/v1/response_stream
resumes after, so you can read back and then follow. Resume from an id a few
seconds older than the newest you read, and deduplicate on id: an event can
appear a moment after one with a newer id.
How long events are kept
Events are kept for at least 90 days.
Errors
| Status | Code | Cause |
|---|---|---|
400 | bad_request | With a personal access token, no x-mapier-project header |
401 | invalid_credentials | No key, or one that is unknown, revoked or expired |
403 | forbidden | A personal access token not made for this environment, or whose owner's role no longer allows this |
403 | insufficient_scope | The key does not carry the messages:read scope |
404 | not_found | With a personal access token, an x-mapier-project it cannot reach |
409 | project_archived | The project is archived |
422 | validation_failed | A type that is not an event type, a resourceId that is not a UUID, a bad from, to or cursor, or an x-mapier-version that is not a published version |
429 | rate_limited | 120 requests per minute, per key; the Retry-After header says how long to wait |
500 | internal_error | An unexpected error on Mapier's side; quote the error's requestId to support |
503 | service_busy | Mapier was too busy to take the request and did nothing; wait details.retryAfter seconds and ask again |
503 | upstream_unavailable | A service behind Mapier did not answer; retry with backoff |