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

Retrieve an attachment

Retrieve a bounded email attachment as base64.

GET/api/v1/mailboxes/{mailboxId}/messages/{uid}/attachments/{attachment}/
Permission read

Path parameters

mailboxIdintegerrequired

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

uidintegerrequired

The message UID in the specified folder and UIDVALIDITY.

Maximum: 4294967295

attachmentintegerrequired

The zero-based attachment index returned by the message.

Minimum: 0 · Maximum: 999

Query parameters

folderstring

The mailbox folder name. Unicode names are supported.

Default: "INBOX" · Maximum 255 characters

uidValiditystringrequired

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

confirmMailboxstring

Optional confirmation of the exact mailbox address.

Maximum 254 characters

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.