Skip to content

Full-text search messages in an inbox

GET
/v1/inboxes/{inbox_id}/messages/search
inbox_id
required
string

Opaque inbox id (the canonical path key). The inbox’s email address is also accepted here as a within-project alias. Treat the id as opaque.

q
required
string

Search query (required).

folder
string

IMAP folder to read (default INBOX).

limit
integer
default: 50 >= 1 <= 100

Page size for the cursor-paginated agent surface (default 50; clamped to the 1-100 range).

offset
integer

Result offset for the legacy offset-paginated surface.

Ok

A paginated page of messages.

object
items
Array<object>

The canonical message wire shape (agent plane).

object
id

Opaque

string
Example
msg_8Tz
thread_id
string
Example
thr_9aB
inbox
string
Example
agent7@extrovertmail.com
direction

Derived relative to the owning inbox.

string
Allowed values: inbound outbound
from

A structured RFC5322 address.

object
name
string
Example
Acme Support
email
required
string format: email
Example
support@acme.test
to
Array<object>

A structured RFC5322 address.

object
name
string
Example
Acme Support
email
required
string format: email
Example
support@acme.test
cc
Array<object>

A structured RFC5322 address.

object
name
string
Example
Acme Support
email
required
string format: email
Example
support@acme.test
reply_to
Array<object>

A structured RFC5322 address.

object
name
string
Example
Acme Support
email
required
string format: email
Example
support@acme.test
subject
string
text

Decoded UTF-8 text/plain MIME alternative; null when the message had no plain-text part. Never derived from HTML.

string
nullable
html

Decoded text/html MIME alternative; null for text-only mail. Never synthesized from plain text.

string
nullable
extracted_text

Best-effort derivative of text with quoted history and signatures removed; null when text is absent or no authored text remains. Not authoritative.

string
nullable
extracted_html

Best-effort derivative of html with common quoted-history containers removed; null when html is absent or no authored HTML remains. Not authoritative.

string
nullable
date

Original Date header value.

string
message_id

RFC5322 Message-ID.

string
in_reply_to

RFC5322 In-Reply-To header.

string
references

RFC5322 References header chain.

string
folder
string
seen

Native IMAP \Seen flag (read state).

boolean
total
integer
next_cursor

Present when more results remain; pass the opaque value back as cursor.

string

Invalid request.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope

Missing or invalid credential.

The canonical error envelope. error is a stable machine code.

object
error
required

Stable error code (e.g. unauthorized, forbidden, not_found, invalid, quota_exceeded, rate_limited).

string
Example
forbidden
message

Human-readable detail (never leaks internals).

string
Example
missing required scope