Append raw MIME message to mailbox
Stores raw RFC 5322 email bytes directly into a mailbox under a label without sending (similar to IMAP APPEND). Supports custom flags, Sieve filtering, and historical internaldate. Lone CR and LF are normalized to CRLF before storage; the size limit applies to the normalized message.
bearerAuthAuthorizationBearer <token>Two credential kinds share this scheme; GET /api/v1/auth/whoami answers which one you hold and what it reaches.
oek_… API key (minted by POST /api/v1/api-keys; shown once at mint). role: account reaches the full account surface: the directory (domains, routes, patterns, api-keys, accounts, address lists) plus every mailbox the account owns. role: system additionally reaches the operator surface, which is documented separately.
oemp_… mailbox app password (minted by POST /api/v1/identities/{identityId}/credentials). Reaches ONE mailbox: its messages, labels, threads, search, sync, send, filters and PIM collections. Directory routes refuse it with 403 insufficient_scope.
Refusal vocabulary: a missing, malformed, expired, or revoked credential answers 401 unauthorized with a WWW-Authenticate: Bearer challenge; a VALID credential outside its scope answers 403 (insufficient_scope for an app password on a directory route, system_credentials_required where only the operator may call). The public routes (health, branding, token-in-path capabilities) declare security: [].
mailboxId*stringMailbox ULID identifier
label?stringTarget label or folder (default INBOX)
flags?stringComma-separated initial flags, e.g. seen,draft
keywords?stringComma-separated initial keywords (e.g. $forwarded,$mdnsent), committed WITH the store flip — an IMAP APPEND with keywords is one call rather than a POST followed by a PATCH. Flag-shaped keywords ($seen, $answered, $flagged, $draft) fold onto their flag bit.
length <= 2048filter?stringWhether to run the mailbox's active Sieve filter on this append (default false)
"true""false"internaldate?|Original receive timestamp in epoch seconds for migration/import (default now)
-62135596800 <= value <= 253402300799x-envelope-from?stringEnvelope sender email address
x-envelope-to?stringEnvelope recipient email address
x-delivery-id?stringOptional client idempotency key to prevent duplicate imports. Stored NAMESPACED as append:<your id> (an append is the mailbox's own side writing its own row, announced as message.imported, not message.new), so the traffic log and the filtered response show that form — retry with your original value.
content-length?stringMessage payload size in bytes (required)
body*stringmessage/rfc822Raw RFC 5322 message bytes
Message appended successfully
application/json- response
blobHash?stringOn a fresh store: the blob SHA-256 (what body caches key on)
duplicate*booleanTrue if message was already delivered previously
flags?array<string>On a fresh store: the flags the row was stored with
keywords?array<string>On a fresh store: the keywords the row was stored with
messageId*stringAssigned message ULID
modseq?integerOn a fresh store: the membership row's MODSEQ in the target label
int64receivedAt?integerOn a fresh store: the INTERNALDATE in epoch seconds
int64size?integerOn a fresh store: the stored size in bytes
int64status*"delivered"Message was successfully delivered and stored
"delivered"threadId*|Assigned conversation thread ULID, or null on duplicate
uid*|Assigned message UID, or null on duplicate
int64uidValidity*|Label UID validity epoch, or null on duplicate
int64curl -X POST 'https://api.open.email/api/v1/mailboxes/string/messages' \
-H 'Content-Type: message/rfc822' \
-d 'string'{
"blobHash": "string",
"duplicate": true,
"flags": [
"string"
],
"keywords": [
"string"
],
"messageId": "string",
"modseq": 0,
"receivedAt": 0,
"size": 0,
"status": "delivered",
"threadId": "string",
"uid": 0,
"uidValidity": 0
}Update flags and labels for multiple messages… PATCH
Applies flag, label, and keyword updates across multiple messages in a single atomic operation. Name the targets by `ids`, by `threadIds`, or both: `threadIds`…
Empty trash, or delete a batch of messages or… DELETE
Permanently purges every row on the Recently-deleted tier with state=expunged, or deletes the messages named by `ids` and/or the conversations named by…