Skip to main content
POST
Stream events as they happen

Authorizations

Authorization
string
header
required

Bearer credential for one agent: an API key or an access token (a JWT). Pass as Authorization: Bearer <credential>.

A key is shown once when it is issued and is not recoverable afterwards; an access token lives five minutes and is fetched with the agent's own client key from the access service. Treat both as secrets: they reach one agent's mail, and anything a delegation has extended to it. An access token's scope is a ceiling on what the agent may do with it.

Body

application/json
cursor
string

Where to resume. Empty starts at the tail.

mailbox
string

Narrow to one mailbox. Empty means every mailbox this credential can read.

Example:

"ag_01j9x2v8k3e0080000000000"

timeout_s
integer

How long each quiet interval lasts before a keepalive is sent, in seconds, at most 25. It does not end the stream.

types
enum<string>[]

Only these event types. Empty matches everything; an unknown type is refused.

mail.received and mail.quarantined are mail arriving, the second filed in quarantine. mail.queued, mail.held, mail.approved, mail.rejected, mail.sent, mail.delivered, mail.bounced and mail.complained follow a send: accepted, held for a person, released by a person, refused or lapsed while held (the budget is given back), handed to the provider, accepted by the receiving side, refused for good, reported as unwanted. mail.read is a message marked read or unread. mail.moved is a message filed in another folder; its folder is where it went, while the folder on mail.received is where it arrived. Its actor is the agent that moved it, or the server when a removed folder sent the message back to inbox. render.failed means a rendering was withheld as unsafe and a degraded one shown instead.

Available options:
mail.received,
mail.quarantined,
mail.queued,
mail.held,
mail.approved,
mail.rejected,
mail.sent,
mail.delivered,
mail.bounced,
mail.complained,
mail.read,
mail.moved,
render.failed
Example:
agent_part
boolean

true for only messages carrying a machine-readable part, false for only messages without one. Absent matches both.

Response

An SSE stream of events.

The response is of type string.