Skip to main content
GET
Search emails

Authorizations

x-api-key
string
header
required

API key (sk-proj-…) from Settings → API Keys. Required for sold API calls outside the Mermail console.

Path Parameters

mailboxId
string
required

Mailbox public_id (UUID), hosted alias id, or current email

Query Parameters

query
string

Free-text query across subject, body, sender, recipients

folder
string

Folder id filter

from
string

Sender contains

to
string

Recipient contains

subject
string

Subject contains

date_start
string

ISO start date

date_end
string

ISO end date

is_read
string

true/1 for read only

is_starred
string

true/1 for starred only

category
string

Category filter

has_attachment
string

Truthy to require attachments

metadata_only
boolean

Set to true to omit body, snippet, raw headers, and threat URLs from candidates

include_held
boolean

Set to true only for a scoped verification flow that must inspect messages temporarily held for auto-draft processing

require_scan_status
enum<string>

Require an exact scan status such as clean; non-matching messages are excluded

Available options:
clean,
flagged,
skipped
agent_safe_content
boolean
default:false

Set to true to omit raw headers, provider metadata, threat details, attachment metadata, and storage diagnostics, and to normalize untrusted text fields to bounded plain text. The response retains attachment_count and remains untrusted.

page
integer

page

limit
integer

limit

Response

Search results

emails
object[]
totalCount
integer