Stream events
Everything that happens to your project, as it happens
One long-lived server-sent
events
connection carries what happens to your key's project. By default it sends two
events: every incoming message as a message event, and every command's result
as a command event. Ask for more with ?events=
(Asking for more events): receipts, delivery
failures, shared locations, edits and unsends, polls, reactions, conversation
changes, gaps in a line's messages and chat background changes. A stream that
ends because your key or your project stopped working says so in an error
event before it closes.
Every event but the closing error carries an id: you can resume from.
The stream resumes
Every event carries an id:, and reconnecting with Last-Event-ID resumes where you left off;
see Resuming. To read back events from before you held an id, use
GET /v1/events.
Anatomy of a connection
curl -N https://api.mapier.ai/v1/response_stream \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01" \
-H "Accept: text/event-stream"Response headers:
HTTP/1.1 200 OK
content-type: text/event-stream; charset=utf-8
cache-control: no-store
x-accel-buffering: noThe first bytes on the wire are a reconnect hint and a comment confirming the stream is live:
retry: 3000
: connectedThen, every 25 seconds, a heartbeat — on a fixed interval, whether or not events were written in between:
: pingLines starting with : are SSE comments, not events. Five are written:
: connected, : ping, : catching up and : replay window exceeded (the
last two under Resuming), and : bye when the
server is being replaced during a deploy — reconnect on the retry: it gave
you. A client that acts only on event: and data: lines ignores all of them.
Every event but error names the line it happened on at lineId, the line's
id as GET /v1/whoami lists it under lines[]. Only what
happens after a line joins Mapier is sent: its messages, polls and conversations
from before then are never sent, on a live connection or on a resume. See
Read what was said.
Query parameters and headers
| Parameter | In | |
|---|---|---|
events | query | Events to add beyond message and command, comma-separated. See Asking for more events. |
channel | query | Send only the events about conversations on this channel. One value. See Narrowing a stream. |
conversationId | query | Send only the events about this conversation. One value, a UUID. |
lineId | query | Send only the events about this line. One value, a UUID. |
Last-Event-ID | header | The id: of the last event you processed. See Resuming. |
x-mapier-version | header | Read on every route; nothing this operation does differs between the versions yet. |
A value events, channel, conversationId or lineId does not accept is a
422 validation_failed before the stream opens. Pass events once, as one
comma-separated value: ?events=receipts&events=delivery_failures repeats the
parameter, and only the first is read, so no delivery_failed event arrives
and nothing says why. A repeated channel, conversationId or lineId, by
contrast, is refused. A Last-Event-ID that is not a UUID is ignored rather than refused
(see Resuming).
Asking for more events
Omit events and the stream is exactly two events, message and command.
Each value adds one event:
events value | Adds the event | For every message |
|---|---|---|
receipts | receipt | a recipient's device reported delivered or read |
delivery_failures | delivery_failed | the channel accepted it and later reported it not delivered, such as Apple's "Not Delivered" on iMessage |
locations | location | a contact's shared location started, moved or ended |
moderation | moderation | a contact edited or unsent a message they sent |
polls | poll | a poll was created, its choices changed, someone voted or took their vote back |
reactions | reaction | a reaction was put on or taken off a message, in a direct conversation or a group |
conversations | conversation | a conversation started, or a group's name, members or status changed |
gaps | gap | some of a line's messages may be missing from a window of time |
message.received | message.received | an incoming message, in the webhook's shape — in place of its message event |
chat_backgrounds | chat_background | a conversation's background was set or removed — by a person, or by the line |
message.received replaces the message event rather than adding one beside
it. The values combine:
?events=receipts,delivery_failures,locations,moderation,polls,reactions,conversations,gaps,message.received,chat_backgrounds. A value not listed
here is a 422 whose details entry names it in unknown and lists the values
this stream sends in supported:
{
"error": {
"code": "validation_failed",
"message": "That is not a stream option.",
"details": [
{
"path": "events",
"message": "`events` takes a comma-separated list of: receipts, delivery_failures, locations, moderation, polls, reactions, conversations, gaps, message.received, chat_backgrounds.",
"unknown": ["receipt"],
"supported": [
"receipts",
"delivery_failures",
"locations",
"moderation",
"polls",
"reactions",
"conversations",
"gaps",
"message.received",
"chat_backgrounds"
]
}
]
}
}Narrowing a stream
channel sends only the events about conversations on that channel, and takes
one of imessage · whatsapp. An event's channel is its
conversation's, so a command event for a command that names no conversation
is sent only on a stream with no channel.
conversationId sends only the events about one conversation: its inbound
messages, the commands that name it and — on a stream opened with an events
value — the receipt, delivery_failed, location, moderation, poll,
reaction, conversation, gap, message.received and chat_background
events about it. A gap that names no conversation is about every conversation
on its line, so it is sent too. It must be
a conversation in your key's project, and on channel when you
give both. Otherwise the answer is a 422: at conversationId for a
conversation this key cannot stream, or at channel — carrying the channel the
conversation is on in the entry's own channel — when the two disagree. More
than one value for either parameter is a 422 too.
lineId sends only the events about one line: its id as
GET /v1/whoami lists it, the lineId every event carries — at
the top level of its data:, and inside data on a message.received event. A
line this key cannot use is a 403 line_not_allowed. With channel it must be
on that channel, and with conversationId it must be that conversation's
line; otherwise the answer is a 422 naming the field. The three filters
combine: an event is sent when it matches every one given.
A filter narrows what a stream sends, not what it reads: a narrowed stream
reads the project's events as an unnarrowed one does and sends the events that
match, so it costs what any stream costs and counts toward the same four open
streams. Narrow by channel, or follow one conversation; to follow many, open
one stream and read conversationId off the message, command, location,
moderation, poll, reaction, conversation and chat_background events.
A gap names its conversations in conversationIds.
The receipt and delivery_failed events carry none: correlate them by
commandId or messageId.
Resuming with Last-Event-ID
Every event but error carries an id: line before its event: line. Keep
the id: of the last event you finished processing, and send it as
Last-Event-ID when you reconnect:
curl -N https://api.mapier.ai/v1/response_stream \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01" \
-H "Accept: text/event-stream" \
-H "Last-Event-ID: 0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a37"- At most 500 are replayed per batch. The stream sends the events after that
id, 500 at a time, in order. If you were further behind, nothing is dropped:
the rest follows on the same connection, and a
: catching upcomment marks each batch that stopped at the cap, so 500 events and then silence is not mistaken for having caught up. - Events are kept for 90 days, which is how far back an id can resume. An
id older than that is not an error: you are sent everything that remains
after it, preceded by a
: replay window exceededcomment so you can tell it from a quiet period. - On a narrowed stream the 500 counts the events a batch read, not the
events it sent, so a batch may send fewer events and still be followed by
: catching up. - A
Last-Event-IDthat is not a UUID is ignored. Everyid:this stream writes is one, so anything else did not come from it: the stream starts at the live edge rather than refusing it, because a browser'sEventSourcere-sends the same header on every reconnect and a refusal would come back forever.
An event can therefore arrive twice across a reconnect: the one you were
reading when the connection dropped. Apply events by id and a repeat is a no-op.
Reconnection and delivery guarantees has a
loop that keeps the id and a parser that reads it.
To read back events from before you ever held an id, list them with
GET /v1/events: every id it answers is a Last-Event-ID
this stream resumes after.
Event: command
A command reached its terminal status. Emitted once per command.
id: 0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a37
event: command
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","externalId":null,"projectId":"b0000000-0000-4000-8000-000000000002","environment":"live","failureClass":null,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
A 202 — an adopted one included — says the command was queued; this event
says how it ended. For message.send, succeeded is the channel's
result of the send and not a delivery receipt. Delivery is a
receipt event on a stream opened with ?events=receipts,
and a channel's later "not delivered" is a
delivery_failed event, which moves no status.
Switch on failureClass
errorCode is the channel's own word and the set is open; failureClass is
closed, the same for every channel, and it is the one to branch on. What
each value means is in Results and delivery.
The same class is on the command.settled and message.failed webhooks, and
the 409 that hands a retried Idempotency-Key the first attempt's code.
Event: message
Someone sent a message to one of your lines. Your own sends do not echo here.
id: 0192a7c4-6a02-7e11-8c4d-2b9f7e3a5d10
event: message
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}Prop
Type
text is always present in the JSON and can be null. A photo sent with no caption arrives with
text: null and a populated attachmentIds, so code that reaches straight for
event.text.toLowerCase() throws the first time someone sends one.
A null text does not promise an attachment either. An iMessage line
reports a change to a conversation's chat background as a
chat_background event, but a line whose device
predates that event instead leaves a message from the person with no text for
a change in a conversation with one person, whoever made it — a
chat_background.set or a
chat_background.remove of yours, or the person
on their own phone. Skip a received message that has no text and no attachment
rather than reply to it.
Event: receipt
Sent only on a stream opened with ?events=receipts. A recipient's device
reported a message delivered or read.
id: 0192a7c4-7d55-7a90-b3e1-4c6a8f2d9e04
event: receipt
data: {"commandId":"3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71","messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65","status":"delivered","occurredAt":"2026-08-24T18:03:14.000Z","simulated":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
Each channel reports what it
can, and an iMessage line reports from Apple's status of the send, which is first asked about 75 seconds after the send and
last about 10 minutes after it, so on iMessage a delivery or a read later than
that is never sent, and a read arrives only from a recipient who shares read
receipts. A WhatsApp line sends them as Meta reports them. To ask about one message now, whatever the stream said, call
GET /v1/messages/{messageId}/receipts.
Event: delivery_failed
Sent only on a stream opened with ?events=delivery_failures. The channel
accepted a message and later reported it not delivered — Apple's "Not
Delivered" on iMessage and Meta's failed after sent on WhatsApp. It is the same fact as the
message.delivery_failed webhook.
id: 0192a7c4-8e20-7f43-a1b6-9d3c5e7f0a28
event: delivery_failed
data: {"commandId":"3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71","messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65","occurredAt":"2026-08-24T18:05:02.000Z","simulated":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
That send is not a failed one. The message keeps its status, the event
carries no status, errorCode or failureClass, and the send's own
command event still arrives, possibly after this one, because the
channel can report the failure before its result arrives. Correlate by
commandId, and do not assume you recorded the send before the verdict came.
Event: location
Sent only on a stream opened with ?events=locations. A contact sharing their
location with the line started, sent a new position, or stopped — on iMessage
from Apple's Find My, about every 30 seconds per person sharing, a repeated
position sent once. The same facts as the location.share_started,
location.updated and location.share_ended webhooks.
id: 0192a7c4-9b31-7c02-8d44-2f6e1a3b5c70
event: location
data: {"type":"location.updated","conversationId":"a0000000-0000-4000-8000-000000000001","contactId":"c0000000-0000-4000-8000-000000000003","latitude":40.76203,"longitude":-73.985918,"horizontalAccuracyM":12,"capturedAt":"2026-09-30T18:07:00.000Z","occurredAt":"2026-09-30T18:07:00.000Z","simulated":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
A location is sent only for a one-to-one conversation with someone who is already this project's contact, so a person who shares before any message between you produces no event. The coordinates are a person's, and you are responsible for how you store and use them. See Location events.
Event: moderation
Sent only on a stream opened with ?events=moderation. A contact edited or
unsent a message they sent to the line. One event name for both, told apart by
type: the same facts as the message.edited and message.unsent webhooks.
id: 0192a7c4-a412-7e19-b0c5-3d7f2a9e6b18
event: moderation
data: {"type":"message.edited","messageId":"0192a7c4-6c02-7d4e-9a13-5b8f2c1d0e44","conversationId":"a0000000-0000-4000-8000-000000000001","externalId":"5D1B7E0A-2F3C-4B8E-9A61-1C2D3E4F5A6B","text":"See you at 7","previousText":"See you at 6","editedAt":"2026-09-30T18:10:04.000Z","simulated":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Each names the message by the messageId and externalId its message event
carried. Mapier keeps the message's original text (an edit's new text
arrives here alone), and does not delete an unsent message. Only a message
Mapier has recorded produces these events, so an edit of one sent before the
line joined Mapier produces none. Only an edit that changed the text produces
one: an edit that left it as it was, as when only an attachment was removed,
does not. On a channel where a moderator can
delete people's messages, message.unsent is also a message a moderator
deleted. The line's own edits and unsends are command events, never these.
message.edited
Prop
Type
message.unsent
Prop
Type
See Edits and unsends.
Event: poll
Sent only on a stream opened with ?events=polls. A poll in a conversation
was created, had its choices changed, got a vote, or had a vote taken back —
a contact's poll, or the line's own. One event name for all four, told apart by
type: the same facts as the poll.created, poll.options_changed,
poll.voted and poll.vote_cleared webhooks.
id: 0192a7c4-b5e3-7a41-9c28-4e1f6a0b2d93
event: poll
data: {"type":"poll.created","conversationId":"a0000000-0000-4000-8000-000000000001","actor":"line","contactId":null,"pollExternalId":"2F6B1C3D-8E4A-4B5C-9D7E-0A1B2C3D4E5F","question":"Lunch?","options":[{"optionExternalId":"A1B6D8F0-9C2E-4D5F-8A4B-6C8D0E1F2A3B","text":"Tacos"},{"optionExternalId":"B2C7E9A1-0D3F-4E6A-8B5C-7D9E1F2A3B4C","text":"Ramen"}],"occurredAt":"2026-10-01T18:11:40.000Z","simulated":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
Your own poll streams here too, with actor: line: its pollExternalId and
its choices' optionExternalIds — what poll.vote takes — arrive on this event
and nowhere else.
Event: reaction
Sent only on a stream opened with ?events=reactions. A reaction was put on or
taken off a message, by a person or by your line, in a direct conversation or a
group. One event name for both, told apart by type: the same facts as the
reaction.added and reaction.removed webhooks.
id: 0192a7c4-c7a1-7b02-8e13-5d2f9a0b6c41
event: reaction
data: {"type":"reaction.added","messageId":"0192a7c4-6a02-7e11-8c4d-2b9f7e3a5d22","conversationId":"a0000000-0000-4000-8000-000000000002","channel":"imessage","actor":"+14155550100","contactId":"0192a7c0-4444-7555-8666-777788889999","isGroup":true,"emoji":"❤️","providerReactionId":null,"occurredAt":"2026-10-23T17:02:11.000Z","lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
Only a reaction to a message Mapier has recorded produces an event. Where a channel keeps one reaction per person per message, a new one arrives with the one it replaced taken off.
Event: conversation
Sent only on a stream opened with ?events=conversations. A conversation
started on your line, or a group's name, members or status changed. One event
name for all three, told apart by type: the same facts as the
conversation.created, conversation.updated and
conversation.status_changed webhooks. Conversation
events says when each fires on each channel.
id: 0192a7c4-d8b2-7c13-9f24-6e3a0b1c7d52
event: conversation
data: {"type":"conversation.updated","conversationId":"a0000000-0000-4000-8000-000000000002","channel":"imessage","title":"Trip to Lisbon","changed":["title","participants"],"participantsAdded":[{"address":"+14155550123","contactId":null,"displayName":null}],"participantsRemoved":[],"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}conversation.created
Your line saw a conversation for the first time: a person's first message, a group's first message, or your line being added to a group.
Prop
Type
conversation.updated
A group's name or members changed. It names what changed and who joined or
left, never the whole membership: read that with
GET /v1/conversations/{conversationId}.
Prop
Type
conversation.status_changed
A group closed for your line, or opened again. A send into a closed group is
409 conversation_closed.
Prop
Type
Event: gap
Sent only on a stream opened with ?events=gaps. Some of a line's messages may
be missing from a window of time: the channel rate-limited the line, or the
line's connection to the channel was lost. The same
fact as the line.gap webhook.
It is sent once, after recovery has finished. Every message that could be
recovered from the window has already arrived as an ordinary message event,
with the time it was sent, and is in the conversation's history. A window that
lost nothing sends no gap. Reconnection and delivery
guarantees says what
each channel recovers.
id: 0192a7c4-e9c3-7d24-8a35-7f4b1c2d8e63
event: gap
data: {"type":"line.gap","channel":"imessage","from":"2026-10-23T17:00:04.000Z","to":"2026-10-23T17:06:31.000Z","cause":"disconnected","conversationIds":null,"recovered":2,"complete":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
Event: message.received
Sent only on a stream opened with ?events=message.received. Each incoming
message arrives under the name and in the shape of the
message.received webhook, instead of its message
event on this connection, so each incoming message arrives once, as one or the
other. Without the option the message event is unchanged.
The event is the webhook's body less the two keys that name a delivery attempt,
deliveryId and attempt. Use it when one handler should read both the stream
and your webhooks.
id: 0192a7c4-fad4-7e35-9b46-8a5c2d3e9f74
event: message.received
data: {"id":"0192a7c4-fad4-7e35-9b46-8a5c2d3e9f74","type":"message.received","environment":"live","occurredAt":"2026-10-23T17:02:11.000Z","data":{"projectId":"0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b","environment":"live","lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","…":"…"}}Prop
Type
The message's lineId is inside data, not at the top level; ?lineId=
narrows these events as it does every other.
Event: chat_background
Sent only on a stream opened with ?events=chat_backgrounds. A conversation's
chat background was set or removed on an iMessage line — by a person in the
conversation, or by this line. The same fact as the
conversation.background_changed webhook.
id: 0192a7c4-c6f4-7b52-8d39-5f2a7b1c3e04
event: chat_background
data: {"type":"conversation.background_changed","conversationId":"a0000000-0000-4000-8000-000000000001","from":"+14155550100","fromMe":false,"background":{"preset":"sky_dusk"},"occurredAt":"2026-11-02T18:20:31.000Z","simulated":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d"}Prop
Type
It is sent only from a line whose device reports the change. A line on older
software instead leaves a message with no text for a change in a one-to-one
conversation; see Event: message. A change in a
conversation Mapier has no record of produces no event. A change in a group
chat is reported the same way, on the group's conversationId. See
Chat background events.
Event: error
The stream is ending, and this is why. The socket closes after it, and the
event carries no id: — there is nothing after it to resume.
event: error
data: {"code":"invalid_credentials","message":"That API key has been revoked."}Prop
Type
The credential is re-proved every 60 seconds, so a revoked or expired key, or
an archived project, closes the stream within a minute, with invalid_credentials or project_archived here rather than a
dropped connection. Reconnecting does not fix either. A connection that closes
with no error event (a network drop, or a : bye comment) is ordinary:
reconnect with your Last-Event-ID.
Forward compatibility
Fields are added to events without a version change, and an event can carry keys this page does not list. Two habits keep a client working:
- Read the fields you need by name. Do not reject an event for an extra key.
- Tolerate unknown values and unknown
event:names.errorCodeis open, and a new event name is ignored rather than thrown on. Give everyswitcha default:
switch (event.status) {
case "succeeded":
markSucceeded(event.commandId); // succeeded, not delivered
break;
case "failed":
case "cancelled":
case "expired":
markNotDone(event.commandId, event.failureClass, event.errorCode);
break;
case "ambiguous":
case "no_effect":
markOutcomeUnproven(event.commandId, event.errorCode);
break;
default:
markOutcomeUnproven(event.commandId, event.errorCode);
}Reconnecting
The stream drops periodically even when healthy, so the outer loop is
unconditional: connect with the last id you processed, consume until the socket
closes, wait, connect again. The 429 in the table below counts
connections, not events.
const BASE = "https://api.mapier.ai";
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
const onEvent = (name: string, data: unknown) => {
console.log(name, data);
};
const MIN_DELAY = 6_000;
const MAX_DELAY = 30_000;
let lastEventId: string | undefined; // keep this somewhere durable
let delay = MIN_DELAY;
for (;;) {
const startedAt = Date.now();
try {
const res = await fetch(`${BASE}/v1/response_stream?events=receipts,delivery_failures`, {
headers: {
Authorization: `Bearer ${process.env.MAPIER_API_KEY}`,
"x-mapier-version": "2026-12-01",
Accept: "text/event-stream",
...(lastEventId ? { "Last-Event-ID": lastEventId } : {}),
},
});
if (res.status === 429) {
await res.body?.cancel();
await sleep(Math.max((Number(res.headers.get("retry-after")) || 1) * 1_000, MIN_DELAY));
continue;
}
if (!res.ok || !res.body) {
await res.body?.cancel();
throw new Error(`stream status ${res.status}`);
}
await consume(res.body, (id, name, data) => {
onEvent(name, data);
if (id) lastEventId = id; // only once the event is handled
});
} catch (err) {
console.warn("stream dropped, reconnecting", err);
}
delay = Date.now() - startedAt > 30_000 ? MIN_DELAY : Math.min(delay * 2, MAX_DELAY);
await sleep(delay + Math.random() * delay);
}The parser behind consume, and what to do with a command whose result you
never saw, are in Reconnection and delivery
guarantees.
Multiple connections
A key may hold four streams open at once; a connection past that is refused
with 429 rate_limited and details.reason: "too_many_streams",
whose short details.retryAfter means close a stream rather than wait. Every
connection receives every event its filters admit: they are a broadcast, not a
work queue. One stream per project is all an integration needs; two workers on
one stream's events should deduplicate on the event's id.
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 | line_not_allowed | A lineId that is not one of this key's lines |
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 | An events value this stream does not accept, a channel it does not carry or more than one, a conversationId this key cannot stream, a lineId that does not match channel or conversationId, or an x-mapier-version that is not a published version; details names the field |
429 | rate_limited | 10 connects per minute, per key; or more than 4 open at once (details.reason: "too_many_streams", whose short details.retryAfter means close a stream rather than wait) |
500 | internal_error | An unexpected error on Mapier's side; quote the error's requestId to support |
503 | upstream_unavailable | A service behind Mapier did not answer; connect again with backoff |
503 | service_busy | Mapier was too busy to open the stream; wait details.retryAfter seconds and connect again |
Quick reference
| Events | message, command, error; receipt, delivery_failed, location, moderation, poll, reaction, conversation, gap, message.received and chat_background on request (?events=) |
| Narrowing | ?channel=, ?conversationId=, ?lineId= — one value each |
| Heartbeat | : ping every 25 seconds |
| Resume | Last-Event-ID; at most 500 per batch; events kept 90 days |
| Revocation | re-proved every 60 seconds; an error event, then the close |
| Concurrent streams | allowed, all receive every event their filters admit |
| Rate limit | 10 connects per minute, per key; 4 open at once, per key |