Messages
All message routes live under an inbox:/v0/emails/inboxes/:inbox_id/emails….
Send
POST …/emails/send with Idempotency-Key header support:
content (base64, 6 MB total request cap) or url
(fetched, 30 MB cap) — stored on R2. track_opens injects a 1px pixel;
first open adds the opened label and fires email.opened once.
Sends are allow/block-list gated (403 rejected + email.rejected event).
Conversation
POST …/emails/:id/replyand/reply-all— recipients/subject/threading derived from the source email.POST …/emails/:id/forward— new thread,Fwd:subject, body merged.GET …/emails/search?q=— substring + tokenized-body search.POST …/batch-get{ email_ids[] },POST …/batch-updatewithadd_labels/remove_labels(single string or array).PATCH …/:idrelabels one message;DELETEremoves it and recomputes the thread.GET …/:id/rawreturns the RFC822 source (message/rfc822).
labels, preview, extracted_text (quoted replies
stripped), attachments[] metadata, in_reply_to, references, headers.