CherryMail
Skip to documentation
Developersv1
Search the CherryMail developer documentation
Developers/API reference/Messages
Messages

Search messages

Search messages with bounded pagination. Returns UIDVALIDITY for later operations.

GET/api/v1/mailboxes/{mailboxId}/messages/
Permission read

Path parameters

mailboxIdintegerrequired

The selected mailbox ID. Email access requires a current mailbox grant.

Query parameters

folderstring

The mailbox folder name. Unicode names are supported.

Default: "INBOX" · Maximum 255 characters

limitinteger

Maximum number of items to return in this page.

Default: 25 · Minimum: 1 · Maximum: 100

cursorinteger

The continuation cursor from the previous response.

uidValiditystring

The exact UIDVALIDITY returned by the folder listing. Stale values are rejected.

fromstring

Sender identity. Must exactly match the granted mailbox address.

Maximum 254 characters

tostring

Recipient email addresses. To, Cc, and Bcc combined must not exceed 20.

Maximum 254 characters

subjectstring

The email subject, without control characters.

Maximum 200 characters

textstring

Plain-text message body.

Maximum 200 characters

sincestring · date-time

Match messages from this ISO date-time onward.

beforestring · date-time

Match messages before this ISO date-time.

seenboolean

Filter by read status.

flaggedboolean

Filter by starred status.

Responses

200Success

The requested resource or collection.

400Invalid request

Invalid input or missing idempotency key.

401Unauthenticated

Missing, expired, or revoked bearer credential.

403Forbidden

Wrong credential purpose, insufficient scope, or missing mailbox grant.

404Not found

Resource or message not found or unavailable to this integration.

409Conflict

Resource conflict, stale message reference, ambiguous submission, or idempotency conflict.

413Too large

Request or message exceeds the supported size.

429Rate limited

Rate limited. Honor Retry-After before retrying.

500Internal server error

Unexpected server error. Contact support with the request ID; inspect uncertain writes before retrying.

503Service unavailable

Integrations disabled or an upstream service unavailable.

See limits and errors for retry handling and the error envelope.