Follow the organization's sandbox events as they happen

The same events a webhook receives (`WebhookEvent`, the same JSON and ids), as Server-Sent Events over one long-lived `GET` (`text/event-stream`), for a caller that would rather hold a connection open than run a receiver.

GET/v1/events

Not available yet The API does not serve the live stream of your organization's sandbox events yet.

The same events a webhook receives (WebhookEvent, the same JSON and ids), as Server-Sent Events over one long-lived GET (text/event-stream), for a caller that would rather hold a connection open than run a receiver. Each event is one message: id: is its cursor (EventCursor, ecur_…), and data: the event's JSON on one line. A message named error (event: error) carries an Error body and ends the stream: invalid with field: cursor when the cursor is older than the events kept (7 days), so events were missed and the caller starts again from a time; unavailable when the cell's stream went away, so the caller reconnects with its last cursor. Lines that begin with : are comments that keep the connection open; skip them. Where it starts: after the event Last-Event-ID names (a browser's EventSource sends it on reconnecting by itself), else after the one cursor names, else with the first event at or after since (within the last 7 days), else with the next event. A cursor is good only for the 7 days the events are kept, and only in the cell that made it. Events come in the order the cell recorded them; within a sandbox, compare (seq, sub) as a webhook does. The stream has every event of the caller's organization that the caller may read, narrowed to one project or one sandbox when asked; a key sees its own project's. Served by the cell's gateway, which closes its side toward the scheduler as soon as the caller hangs up.

A key with the sandboxes:read scope.

Request

curl "https://api.pod.mapier.ai/v1/events" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
Last-Event-IDheaderstringNoCarry on after this event. Wins over cursor and since.
cursorquerystringNoCarry on after this event, for a client that cannot set Last-Event-ID. Wins over since. An unknown or expired cursor is invalid with field: cursor.
sincequerystringNoStart with the first event at or after this time, within the last 7 days; else invalid.
projectquerystringNoOnly this project's events. A project the caller cannot reach is not_found.
sandboxquerystringNoOnly this sandbox's events. A sandbox the caller cannot reach is not_found.

Answer

200. The stream, open until the caller hangs up or an error message ends it. Each message is id: <EventCursor> and data: <WebhookEvent as JSON>, or event: error and data: <Error as JSON>.

Errors

The refusals this call is known for: invalid, forbidden, not_found, unavailable. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.events.stream({ cursor, since, … })
Pythonpod.events.stream(cursor=…, since=…)