Read the mailbox back
There is no schema to apply — the mailbox is hosted and already scoped to your account. A search returns hits (addressing, subject, preview) and the same rows the dashboard shows; the body is fetched per message with the id a hit names.
# domainId is the domain's id (GET /api/agent/domains lists them),
# not the domain name.
curl "https://sdk.flowmails.net/api/agent/emails/search?domainId=<domain-id>&q=invoice&limit=10" \
-H "Authorization: Bearer fm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
{
"messages": [
{
"id": 8421,
"messageId": "<CAF8…@stripe.com>",
"from": "no-reply@stripe.com",
"to": "support@yourdomain.com",
"subject": "Order #8421 confirmed",
"receivedAt": "2026-07-06T12:34:56.000Z",
"preview": "Your order is confirmed…"
}
],
"total": 1,
"domainId": "<domain-id>"
}
# The body is fetched per message, never returned by a search:
curl "https://sdk.flowmails.net/api/agent/messages/<Message-ID>" \
-H "Authorization: Bearer fm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"