Skip to main content
POST
List a folder

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
in
string
required

The mailbox, by its agent's identifier.

Example:

"ag_01j9x2v8k3e0080000000000"

folder
string

inbox, quarantine, sent, or a folder the mailbox made: lowercase letters, digits and hyphens, at most 48 characters, not corr or unread.

Pattern: ^[a-z0-9][a-z0-9-]{0,47}$
Example:

"receipts"

unread
boolean

true for only messages not yet marked read. false is no filter, the same as leaving it out.

agent
boolean

true for only messages carrying a machine-readable part. false is no filter, the same as leaving it out.

since
string<date-time>

Only messages dated at or after this instant, RFC 3339. Anything else is refused rather than read as a different window.

before
string<date-time>

Only messages dated before this instant, RFC 3339.

from
string

Only messages from this address.

thread
string

Only messages in this conversation.

Example:

"thread_01j9x2v8k3e0080000000000"

limit
integer

How many messages to examine for this page. Default 50, at most 200; a larger value is treated as 200.

cursor
string

Resume a listing. Pass back, unchanged, the cursor a previous page of the same operation returned; cursors are opaque, and one operation's cursor means nothing to another.

Response

The object.

ref
string

What was read, as the server understood it.

kind
string

Which shape this is, so a client can branch without re-parsing.

text
string

The rendering, for the kinds that have one.

content
object

The structured form, for the kinds that have one. Its shape depends on kind.

provenance
object

Where the content came from. Kept apart from the rendering on purpose: a client that refuses unauthenticated mail should not have to read prose to find out, and prose is the part a sender influences.

cursor
string

Present when there is more to read.

truncated
boolean

There is more than this response carries.

error
object