Saltar para a documentação
API

Emails

Cada operação deste grupo: o que aceita, o que devolve e os erros com que pode responder.

Operações

Send, schedule, cancel and retrieve.

POST/emails

Send an email

Âmbitosemails:sendEnvia e-mail
Respeita Idempotency-Key

Sends now, or schedules with scheduledAt. Answers 200 when the message has already gone and 202 when something still has to happen to it, so a caller may branch on the status code. Honours Idempotency-Key.

The body can come from html, text, a stored template, or an existing draftId: one of the four, never two.

Add translate to send it in the recipient's language rather than yours. It is resolved at accept time, before any record of the message exists, so a scheduled send carries the words that were approved and a translation that could not be produced refuses the send rather than delivering the original. Works with template, which is the useful case: the rendered output is what gets translated. See the Languages section, and POST /emails/translate to show somebody the result first.

Cabeçalhos

Idempotency-Keystring

Makes a retry safe. Reusing one with a different body is a 422.

Até 255 caracteresPadrão^[A-Za-z0-9_.:-]+$

Corpo do pedido

fromstring | objectObrigatório

Sender as [email protected], Acme Billing <[email protected]> or { email, name }. It must be an address the key may send as, otherwise 403 from_address_forbidden.

emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
to(string | object)[]Obrigatório

One recipient or a list. to, cc and bcc together hold at most 50 addresses, and more is a 422 too_many_recipients.

De 1 a 50 itens
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
cc(string | object)[]

Copy recipients, counted toward the 50 recipient ceiling.

Até 50 itensPredefinição[]
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
bcc(string | object)[]

Blind copy recipients, counted toward the 50 recipient ceiling.

Até 50 itensPredefinição[]
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
replyTostring | object

Written into the Reply-To header.

emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
subjectstring

At most 998 characters. Falls back to the template or draft subject when empty.

Até 998 caracteresPredefinição""
htmlstring

HTML body, at most 1,000,000 characters.

Até 1000000 caracteres
textstring

Plain text body, at most 1,000,000 characters.

Até 1000000 caracteres
templateobject

A stored template by id or slug. Omitting version resolves whatever is published at that moment, so pin it when somebody else owns the copy.

idstringObrigatório
De 1 a 128 caracteres
versioninteger
Mais de 0No máximo 100000
propsRecord<string, any>
slotsRecord<string, any>
translateobject

{ to, from?, includeOriginal?, subject? }. to takes a code, an English name or an endonym. includeOriginal and subject both default to true.

tostringObrigatório
De 2 a 60 caracteres
fromstring
De 2 a 60 caracteres
includeOriginalboolean
Predefiniçãotrue
subjectboolean
Predefiniçãotrue
headersRecord<string, string>

Custom headers limited to X-*, List-*, Reply-To, Precedence, Auto-Submitted, Importance, Priority and Feedback-ID. Anything the server sets itself is a 422 reserved_header.

Predefinição{}
attachmentsobject[]

At most 20 files. Each entry is either an inline file, with filename and content as bytes or a base64 string (bytes are encoded for you, and inline files are capped at 5 MB in total once decoded), or a stored file as { fileId } naming a file already uploaded to the workspace, which is how a file larger than the inline cap is sent.

Até 20 itensPredefinição[]
filenamestringObrigatório
De 1 a 255 caracteres
contentstringObrigatório
De 1 a 6990515 caracteresPadrão^[A-Za-z0-9+/=\r\n]+$
contentTypestring
Até 255 caracteresPadrão^[\w.+-]+\/[\w.+-]+(?:[ \t]*;[ \t]*[\w.+-]+=(?:"[^"\r\n]*"|[\w.+-]+))*$
attachmentDeliverystring

How the files in attachments travel. mime carries them inside the message, the way mail always has, so a file over 5 MB is refused. link uploads each file and puts a download link in the body in its place, so the message itself stays small. auto links only when the from domain has an active files domain and the files together come to more than 2 MB, and carries them inside the message otherwise, so nothing changes for a domain with no files domain set up. Left out, the sender's mailbox setting applies, and that defaults to auto. A download link uses the files domain when the from domain has one active and the default OpenEmail host otherwise.

Um de"mime""link""auto"
threadIdstring

Files the sent message into an existing thread.

Até 256 caracteres
draftIdstring

Sends an existing draft as written. Cannot be combined with template or translate.

Até 256 caracteres
scheduledAtstring

A Date, an ISO 8601 instant or a duration such as PT1H or P2D. At least one second and at most 365 days out.

De 3 a 64 caracteres
cancellableForSecondsinteger

An undo window from 0 to 900 seconds on an immediate send. Refused alongside scheduledAt, which is already cancellable until it goes.

Pelo menos 0No máximo 900Predefinição0
trackingobject

Open and link tracking for this send alone. A field left out takes the from address's own setting, then its domain's catch-all's when the catch-all caught that address rather than it being one you created, and is on when neither sets it. Set them per address with PATCH /settings?address=.

opensboolean
clicksboolean
signatureboolean

An html body goes out exactly as written, so it carries a signature only when this is true, while a text-only body carries one unless this is false. When it is added it is the from address's own signature, else its domain catch-all's when the catch-all caught that address, else the OpenEmail footer unless that address turned the footer off. Template sends and encrypted sends never carry one.

tagsRecord<string, string>

Up to 10 tags, keys of 1 to 64 letters, digits, _ or -, values up to 256 characters. Echoed back on every read.

Predefinição{}

Devolve

Sent.

Accepted: queued or scheduled.

Erros

409

domain_not_sendable: the from domain is known to this workspace but its signing records are not in DNS yet, so nothing was accepted. Or translation_not_configured: this workspace has no AI configured, so translate cannot be honoured.

429

send_quota_exceeded: this workspace has spent the monthly send allowance of its plan, which counts sends from this workspace alone. It resets on the first of the month. Or ai_quota_exceeded: with translate, this workspace has used today's AI actions. Nothing was sent, and it resets at midnight UTC.

503

The translator did not answer. Nothing was sent; the request is worth retrying.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.send()
CLI
openemail emails send
MCP
replyToEmailsendEmail

GET/emails

List sent messages

Âmbitosemails:readLê

Newest first, a page at a time. A key limited to particular addresses or domains lists only the messages sent from addresses it covers, and that filter runs before the page is cut, so every page but the last is full.

Requires the emails:read scope.

Parâmetros de consulta

statusstring

Comma-separated.

fromstring

A bare sending address such as [email protected], matched exactly and case insensitively. A display name form does not match.

broadcastIdstring

Only the copies of one broadcast, a brd_ id from POST /broadcasts. Every person a broadcast reaches gets a message of their own, so this is the list of who it went to and what happened to each copy. An id that names no broadcast answers an empty page.

De 1 a 64 caracteres
scheduledFromstring

Only messages scheduled for this instant or later, ISO 8601 with a zone. With scheduledTo and status=scheduled,queued it lists what is waiting to go out in a window, as the calendar of the app does. A message with no scheduledAt is left out.

Formatodate-time
scheduledTostring

Only messages scheduled for this instant or earlier. scheduledFrom after scheduledTo is a 422 invalid_parameter.

Formatodate-time
limitinteger

Rows per page, a whole number from 1 to 100, defaulting to 25. Outside that range is a 422.

Pelo menos 1No máximo 100Predefinição25
cursorstring

A message id. Keyset, not offset.

Devolve

A page of messages, newest first.

Erros

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.list()emails.listAll()emails.iterate()
CLI
openemail emails list
MCP
listSentEmails

POST/emails/batch

Send up to 100 messages

Âmbitosemails:sendEnvia e-mail

Per item, never all-or-nothing: a batch that rolled back on one bad address would make the caller's retry a question of which messages had already gone.

Corpo do pedido

emailsSendEmailRequest[]
Até 100 itens

Devolve

207

Per-item results.

Erros

429

This workspace has spent the monthly send allowance of its plan, which counts sends from this workspace alone. It resets on the first of the month.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.sendBatch()
CLI
openemail emails send-batch

POST/emails/translate

Translate a message without sending it

Âmbitosemails:sendLê

The same round trip translate makes on a send, stopped one step early. The same function produces both, so what this shows is what would go out.

No scope of its own, deliberately. It grants nothing a sender could not already do, and a scope nobody can tell apart from emails:send on a consent screen makes every other scope on that list mean slightly less.

The body is capped at the same megabyte the send path allows, but translation itself refuses anything over 30,000 characters with translation_too_long. That is a refusal and not a truncation on purpose: half a translated message has no seam to show where it stopped, and the person reading acts on the half they were given.

Requires the emails:send scope.

Corpo do pedido

htmlstring

HTML body to translate. Only the content inside <body> is sent to the model when the markup is a full document.

Até 1000000 caracteres
textstring

Plain text body to translate. Translated separately when given alongside html.

Até 1000000 caracteres
subjectstring

Subject line to translate, at most 998 characters.

Até 998 caracteres
tostringObrigatório

Target language as a code (de), English name (German) or endonym (Deutsch). An unrecognised value is a 422 invalid_parameter on to.

De 2 a 60 caracteres
fromstring

The language you wrote in. Stating it skips the detection call.

De 2 a 60 caracteres
includeOriginalboolean

Defaults to true, placing your original text below the translation under a caption in the target language.

Predefiniçãotrue

Devolve

The translation. Nothing was sent.

Erros

409

This workspace has no AI configured, so nothing can be translated.

429

ai_quota_exceeded: this workspace has used today's AI actions. It resets at midnight UTC.

503

The translator did not answer. Nothing was sent; the request is worth retrying.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.translate()
CLI
openemail emails translate
MCP
previewTranslation

POST/emails/check

Check how a message would be rated, without sending it

Âmbitosemails:sendLê

Scores a message the way a receiving mailbox would, before you send it: a spam score, a phishing score and an AI-writing score, each 0 to 100, with the signals behind them. Run it while someone writes, or before an automated send, and fix what it names.

The same checks score every message that arrives in an OpenEmail mailbox, so what you see here is what an OpenEmail recipient sees in Details. It cannot know a recipient's own filter, sender history or reputation, so a low score is a good sign and not a delivery guarantee.

No scope of its own, for the same reason as the translation preview: it grants nothing a sender could not already do. It spends no AI action and never calls a model.

Requires the emails:send scope.

Corpo do pedido

fromstring

The address it will be sent from.

Até 320 caracteres
fromNamestring

The display name it will carry. A name that claims another address or a known brand raises the phishing score.

Até 320 caracteres
replyTostring

A Reply-To on a different domain raises the phishing score.

Até 320 caracteres
subjectstring

Subject line, at most 998 characters.

Até 998 caracteresPredefinição""
htmlstring

HTML body. Links and images are read from it.

Até 200000 caracteres
textstring

Plain text body. Taken from html when left out.

Até 200000 caracteres
replyingboolean

True when it answers an existing thread. A Re: subject on a message that answers nothing raises the spam score.

attachmentNamesstring[]

File names, so an attachment that can run code is caught.

Até 100 itens

Devolve

The scores. Nothing was stored or sent.

Erros

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.check()
CLI
openemail emails check
MCP
checkEmail

GET/emails/{id}

Retrieve a message

Âmbitosemails:readLê

Requires the emails:read scope.

Parâmetros de caminho

idstringObrigatório

The send id, msg_ followed by 24 hex characters, as returned by send.

Devolve

The message, with per-recipient state.

Erros

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.get()
CLI
openemail emails get
MCP
getSentEmail

PATCH/emails/{id}

Change a message that has not gone yet

Âmbitosemails:sendAltera dados

Moves it with scheduledAt, and changes what it says or who it goes to with subject, html, text, from, to, cc and bcc, while it is still queued or scheduled. Send any of them together. A recipient list replaces the stored one whole, and from is checked as it is on a send, so it has to be an address the key may send as. A message that was translated when it was accepted keeps its wording, and one that was encrypted keeps its wording and its recipients: cancel it and send again instead.

Parâmetros de caminho

idstringObrigatório

The msg_ send id to move.

Corpo do pedido

scheduledAtstring

When it goes out instead: an ISO 8601 instant, or a duration such as PT2H, up to a year out.

De 3 a 64 caracteres
subjectstring

The new subject, up to 998 characters.

Até 998 caracteres
htmlstring

The new HTML body.

Até 1000000 caracteres
textstring

The new plain text body.

Até 1000000 caracteres
fromstring

The address it goes out as, checked as it is on a send.

De 3 a 320 caracteres
to(string | object)[]

Replaces the stored recipients whole. So do cc and bcc.

De 1 a 50 itens
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
cc(string | object)[]

Replaces the copied recipients.

Até 50 itens
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
bcc(string | object)[]

Replaces the blind copied recipients.

Até 50 itens
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres

Devolve

The message as it is now.

Erros

409

email_not_cancellable: it has already gone or was cancelled. translation_locked: it was translated when it was accepted, so its wording cannot change.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.reschedule()emails.update()
CLI
openemail emails rescheduleopenemail emails update
MCP
rescheduleEmailupdateScheduledEmail

POST/emails/{id}/cancel

Cancel a message

Âmbitosemails:sendElimina

Idempotent: cancelling twice returns the same cancelled message. A 409 means it has already gone and cannot be un-sent.

Parâmetros de caminho

idstringObrigatório

The msg_ send id to cancel.

Devolve

Cancelled.

Erros

409

No longer cancellable.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.cancel()
CLI
openemail emails cancel
MCP
cancelEmail

GET/emails/{id}/events

What happened to a message

Âmbitosemails:readLê

The event trail, oldest first, one page at a time. Nothing is dropped from it: a tracked message records an event for every counted open, click and download, so a widely read message runs to many pages, and following nextCursor while hasMore is true reaches the newest event.

Requires the emails:read scope.

Parâmetros de caminho

idstringObrigatório

The msg_ send id whose trail to read.

Parâmetros de consulta

limitinteger

Rows per page, 1 to 100.

Pelo menos 1No máximo 100Predefinição25
cursorstring

An event id. Keyset, not offset: pass the previous page's nextCursor. One that names nothing in this list is a 400 invalid_cursor.

Devolve

A page of the event trail, oldest first.

Erros

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.listEvents()emails.listAllEvents()emails.iterateEvents()
CLI
openemail emails list-events
MCP
listEmailEvents

POST/emails/compose

Write an email with AI

Âmbitosemails:sendLê

Writes the body of an email from prompt, an instruction or a few rough notes, in the style of the mail this workspace has sent before, as the composer of the app does. Give threadId to write a reply: the messages of that thread are read as context, which also needs threads:read. Nothing is saved or sent: pass the result to POST /emails or POST /drafts. It spends one AI action.

Requires the emails:send scope.

Corpo do pedido

promptstringObrigatório

What to write: an instruction, a rough draft or a few notes.

De 1 a 20000 caracteres
subjectstring

The subject so far, if there is one.

Até 998 caracteres
tostring[]

Who it goes to, so the greeting and tone fit.

Até 50 itens
ccstring[]

Who is copied.

Até 50 itens
threadIdstring

A thread to reply in. Its messages are read as context, and it needs threads:read.

De 1 a 200 caracteres

Devolve

The body that was written.

Erros

409

ai_not_configured: AI writing is not available on this server.

429

ai_quota_exceeded: this workspace has used the AI actions of its plan for today. Nothing was written, and it resets at midnight UTC.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.compose()
CLI
openemail emails compose
MCP
composeEmail

POST/emails/rewrite

Rewrite part of an email with AI

Âmbitosemails:sendLê

Rewrites a subject or a body and answers with up to five different versions, as the rewrite menu of the composer does. action is shorten, lengthen, rephrase, formal, casual or custom, which needs instruction to say what to change. Give threadId when the text is a reply, so the rewrite fits the conversation. Nothing is saved. It spends one AI action.

Requires the emails:send scope.

Corpo do pedido

targetstring

body or subject. Defaults to body.

Um de"subject""body"Predefinição"body"
textstringObrigatório

The subject or body to rewrite.

De 1 a 100000 caracteres
actionstringObrigatório

What to do: shorten, lengthen, rephrase, formal, casual or custom.

Um de"shorten""lengthen""rephrase""formal""casual""custom"
instructionstring

What to change, up to 500 characters. Required with custom.

Até 500 caracteres
countinteger

How many versions, 1 to 5. Defaults to 3.

Pelo menos 1No máximo 5Predefinição3
threadIdstring

The thread the text replies in, read as context.

De 1 a 200 caracteres

Devolve

The versions, best first.

Erros

409

ai_not_configured: AI writing is not available on this server.

429

ai_quota_exceeded: this workspace has used the AI actions of its plan for today. Nothing was written, and it resets at midnight UTC.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.rewrite()
CLI
openemail emails rewrite
MCP
rewriteEmail

POST/emails/subject

Suggest a subject line

Âmbitosemails:sendLê

Reads the body of an email and suggests a short subject for it, under 100 characters, in the style of the mail this workspace has sent. Nothing is saved. It spends one AI action.

Requires the emails:send scope.

Corpo do pedido

messagestringObrigatório

The body of the email, as text or HTML.

De 1 a 100000 caracteres

Devolve

The suggested subject.

Erros

409

ai_not_configured: AI writing is not available on this server.

429

ai_quota_exceeded: this workspace has used the AI actions of its plan for today. Nothing was written, and it resets at midnight UTC.

Os erros que qualquer operação pode devolver400401403404422500Catálogo de erros

Também disponível em

SDK
emails.suggestSubject()
CLI
openemail emails suggest-subject
MCP
suggestSubject

Objetos

Emailobject

objectstring
Um de"email"
idstring

The durable handle, msg_ + 24 hex.

statusstring
Um de"queued""scheduled""sending""sent""partial""cancelled""failed"
modestring
Um de"live""test"
fromstring
subjectstring
Pode ser null
messageIdstring

RFC 5322 Message-ID. Null until the MIME exists. Do NOT correlate on it: the header is rewritten on the way out, so the value here appears in no bounce or delivery report and a match on it never fires. A delivery event names the send by its id, as emailId.

Pode ser null
threadIdstring
Pode ser null
transportstring

How the bytes left, once they have. Null until dispatch. test is what a message sent with an oe_test_ key records: it was accepted and every recipient marked delivered, but nothing was carried. dev is not a way of sending either: it is what a message records where nothing is configured to carry mail, having been built and sent nowhere.

Pode ser nullUm de"ses""test""dev"
attemptsinteger
lastErrorstring
Pode ser null
scheduledAtstring
Pode ser nullFormatodate-time
cancellableUntilstring
Pode ser nullFormatodate-time
sentAtstring
Pode ser nullFormatodate-time
tagsRecord<string, string>
broadcastIdstring

The brd_ broadcast this message is one copy of, or null for a message sent on its own. GET /emails?broadcastId= lists every copy of one broadcast.

Pode ser null
sourcestring
Um de"api""oauth""composer""mcp""ai""form"
createdAtstring
Formatodate-time
recipientsobject[]

Returned on retrieval only.

emailstring
namestring
Pode ser null
kindstring
Um de"to""cc""bcc"
statusstring

uncertain is real and is shown as itself: a transport that failed part-way cannot say which recipients it reached, and calling those delivered or failed would both be guesses. suppressed is decided before dispatch rather than reported afterwards: the address bounced or complained in this workspace before, so this copy was never offered to the transport. A message whose recipients are all suppressed fails outright.

Um de"pending""delivered""failed""bounced""complained""suppressed""uncertain"
errorstring
Pode ser null
deliveredAtstring
Pode ser nullFormatodate-time
translationobject

Present only when the message was translated, and only on responses that carry the stored request, which are the send itself and a retrieval. A list row does not fetch it, so its absence there says nothing either way.

languagestring

The resolved target code: de, pt-BR.

languageNamestring

Its English name.

detectedSourceLanguagestring

Stated or detected. Null when detection abstained.

Pode ser null
subjectboolean

Whether the subject was translated too.

includeOriginalboolean

Whether the sender's own words went below the translation.

trackingTracking

EmailCheckobject

How a receiving mailbox would likely rate this message, scored from its own content before it is sent. Every score runs 0 to 100, and higher means more of the thing it names. Nothing is stored and nothing is sent.

objectstringObrigatório
Um de"email_check"
spamobjectObrigatório

Spam-like traits in the subject, wording and links: capitals, stacked exclamation marks, stock spam phrases, money or prize bait, link shorteners, an image with almost no text, and a Re: subject on a message that answers nothing.

scoreintegerObrigatório
Pelo menos 0No máximo 100
levelstringObrigatório

medium from 35, high from 60.

Um de"low""medium""high"
signalsstring[]Obrigatório

What raised the score, heaviest first, as stable ids such as spam-phrases or link-shortener.

phishingobjectObrigatório

What a phishing filter would object to: link text that names a different site, links to a bare IP address, pressure to verify or pay, an attachment that can run code, and a display name that claims another address or a known brand. Sender authentication is taken as passing, since the message will be signed for your domain.

scoreintegerObrigatório
Pelo menos 0No máximo 100
levelstringObrigatório

caution from 30, danger from 60.

Um de"clear""caution""danger"
signalsstring[]Obrigatório
reasonsstring[]Obrigatório

One plain sentence per signal, heaviest first.

aiobjectObrigatório

How much the wording reads as written by a language model, from habits such as stock phrasing, even sentence lengths and markdown. Quoted history and the signature are cut first. It is a score, not a probability, and nobody can prove who wrote a sentence.

scoreintegerObrigatório

Null when the message was not judged; skipped says why.

Pode ser nullPelo menos 0No máximo 100
levelstringObrigatório
Um de"unknown""unremarkable""possible""likely"
signalsstring[]Obrigatório
reasonsstring[]Obrigatório
wordsintegerObrigatório

Words of your own prose that were read.

skippedstringObrigatório

too-short under 40 words. Null when it was scored.

Pode ser nullUm de"too-short""encrypted""bulk"

EmailCompositionobject

objectstringObrigatório
Um de"composition"
bodystringObrigatório

The body that was written.

EmailListobject

objectstring
Um de"list"
hasMoreboolean
nextCursorstring
Pode ser null

EmailRewriteobject

objectstringObrigatório
Um de"rewrite"
targetstringObrigatório
Um de"subject""body"
variationsstring[]Obrigatório

Different versions of the text, never the original itself.

Eventobject

objectstring
Um de"event"
idstring
typestring

Dotted, such as email.accepted, email.sent, email.delivered, email.bounced or email.opened.

dataobject

Whatever the event recorded. An empty object when it carries nothing.

createdAtstring
Formatodate-time

EventListobject

objectstring
Um de"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

The id of the last row on this page, or null on the last page.

Pode ser null

Languageobject

codestringObrigatório

BCP-47. What every endpoint here accepts and returns.

labelstringObrigatório

The English name: "Brazilian Portuguese".

nativestringObrigatório

The endonym, in its own script. Show this first.

flagstringObrigatório

Two regional-indicator codepoints. A scanning aid beside the native name, never an identifier. Never show it on its own.

rtlbooleanObrigatório

Right-to-left. A translated body for one of these is wrapped in dir="rtl" before it is sent, because a client that inherits direction renders it backwards otherwise.

SendEmailRequestobject

fromstring | objectObrigatório
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
to(string | object)[]Obrigatório
De 1 a 50 itens
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
cc(string | object)[]
Até 50 itensPredefinição[]
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
bcc(string | object)[]
Até 50 itensPredefinição[]
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
replyTostring | object
emailstringObrigatório
Até 320 caracteres
namestring
Até 128 caracteres
subjectstring
Até 998 caracteresPredefinição""
htmlstring
Até 1000000 caracteres
textstring
Até 1000000 caracteres
templateobject
idstringObrigatório
De 1 a 128 caracteres
versioninteger
Mais de 0No máximo 100000
propsRecord<string, any>
slotsRecord<string, any>
translateobject
tostringObrigatório
De 2 a 60 caracteres
fromstring
De 2 a 60 caracteres
includeOriginalboolean
Predefiniçãotrue
subjectboolean
Predefiniçãotrue
headersRecord<string, string>
Predefinição{}
attachmentsobject[]
Até 20 itensPredefinição[]
filenamestringObrigatório
De 1 a 255 caracteres
contentstringObrigatório
De 1 a 6990515 caracteresPadrão^[A-Za-z0-9+/=\r\n]+$
contentTypestring
Até 255 caracteresPadrão^[\w.+-]+\/[\w.+-]+(?:[ \t]*;[ \t]*[\w.+-]+=(?:"[^"\r\n]*"|[\w.+-]+))*$
attachmentDeliverystring

How the files in attachments travel. mime carries them inside the message, the way mail always has, so a file over 5 MB is refused. link uploads each file and puts a download link in the body in its place, so the message itself stays small. auto links only when the from domain has an active files domain and the files together come to more than 2 MB, and carries them inside the message otherwise, so nothing changes for a domain with no files domain set up. Left out, the sender's mailbox setting applies, and that defaults to auto. A download link uses the files domain when the from domain has one active and the default OpenEmail host otherwise.

Um de"mime""link""auto"
threadIdstring
Até 256 caracteres
draftIdstring
Até 256 caracteres
scheduledAtstring
De 3 a 64 caracteres
cancellableForSecondsinteger
Pelo menos 0No máximo 900Predefinição0
trackingobject

Open and link tracking for this send alone. A field left out takes the from address's own setting, then its domain's catch-all's when the catch-all caught that address rather than it being one you created, and is on when neither sets it. Set them per address with PATCH /settings?address=.

opensboolean
clicksboolean
signatureboolean

An html body goes out exactly as written, so it carries a signature only when this is true, while a text-only body carries one unless this is false. When it is added it is the from address's own signature, else its domain catch-all's when the catch-all caught that address, else the OpenEmail footer unless that address turned the footer off. Template sends and encrypted sends never carry one.

tagsRecord<string, string>
Predefinição{}

SubjectSuggestionobject

objectstringObrigatório
Um de"subject_suggestion"
subjectstringObrigatório

Trackingobject

Every /tracking endpoint returns this whole, its list included. It arrives trimmed in exactly one place, under tracking on a GET /emails row, where it is the counts half only: opens, clicks, opened, clicked, openCount, clickCount and firstOpenAt. A page of fifty sends each carrying its recipients and its links is a report nobody asked to have expanded. The trimmed form has no id on it either, so /emails/{id}/tracking rather than /tracking/{id} is the way back to the rest of it.

objectstring

Present when the report is the whole response body. Absent under an email's tracking field, which is part of that email rather than a resource in its own right.

Um de"tracking"
idstring

The tracking record, tmsg_ + 24 hex. Not the message id and not the send id.

sendIdstring

The msg_ this went out as, when the send service handled it. Null for mail the mailbox agent sent on its own behalf, which is most composer, MCP and assistant traffic. Those messages do get a send record, but nothing links this tracking row to it. Tracking covers the mailbox rather than only the traffic that came through this API.

Pode ser null
threadIdstring
Pode ser null
messageIdstring

RFC 5322 Message-ID. Not a correlation key. The header is rewritten on the way out. Correlate on id.

Pode ser null
subjectstring
Pode ser null
fromstring
sourcestring
Um de"api""oauth""composer""mcp""ai""form"
sentAtstring
Pode ser nullFormatodate-time
opensboolean

What was APPLIED to this message, resolved when it was sent from the setting of the address it was sent from (its own, else its domain catch-all's, else off, while a broadcast copy is on unless the broadcast or its address turned it off) and any per-send override, not what is switched on now. Turning tracking on today does not make yesterday's mail start reporting, and a report that implied otherwise would read as "nobody opened it".

clicksboolean

As opens, for link rewriting. The two are independent switches.

openedboolean
clickedboolean
attributableboolean

Whether every reading on this message can be pinned to a named recipient. False as soon as an unattributed copy has activity of its own, which is what happens whenever one body went to the whole list rather than a separate one per person. This is the flag that decides whether "Bob has not opened it" is a sentence a client is entitled to write, or whether all it may say is that somebody did. recipients carries the same fact one row at a time, and one row at a time is where it gets missed.

openCountinteger

Opens that looked like a person, with repeat fetches within thirty seconds collapsed. A preview pane redrawing is not a second reading. Through Gmail this is a floor and not a total: its proxy fetches the image once and caches it, so later readings never reach us.

clickCountinteger

Counted clicks. Stronger evidence than an open, and worth weighting as such: images are blocked far more often than links go unfollowed, so a message with clicks and no opens was certainly read.

openCountRawinteger

Every open hit, the automated ones included. openCountRaw - openCount is everything that was filtered out: Apple Mail Privacy Protection and corporate link scanners, which fetch on delivery whether or not a person ever looks, and alongside them the repeat fetches collapsed by the thirty-second window. Both are recorded and neither is counted, because discarding them outright would leave a gap in the log that nothing could explain. Do not read the difference as a machine count on its own. A message reopened twice in a minute lands in it too.

clickCountRawinteger

As openCountRaw, for clicks.

firstOpenAtstring
Pode ser nullFormatodate-time
lastOpenAtstring
Pode ser nullFormatodate-time
firstClickAtstring
Pode ser nullFormatodate-time
lastClickAtstring
Pode ser nullFormatodate-time
recipientsobject[]

One entry per tracked copy, which is not always one entry per person. Absent only from the trimmed form on a GET /emails row; every /tracking response carries it, list included.

emailstring

Null where the bytes could not be varied per person: an encrypted message, one too large to rebuild for each recipient, or a fallback carrier that takes the whole recipient list in a single call. The reading is real; which of the recipients did it is not knowable, and the only honest rendering is "someone on this message", never a name chosen out of the list.

Pode ser null
kindstring
Pode ser nullUm de"to""cc""bcc"
attributedboolean

False on exactly the rows described above. Branch on this rather than on email being a string, and show nothing where it is false: attributing an unattributed open to a named recipient invents evidence about a specific person.

openCountinteger
clickCountinteger
firstOpenAtstring
Pode ser nullFormatodate-time
lastOpenAtstring
Pode ser nullFormatodate-time
firstClickAtstring
Pode ser nullFormatodate-time
lastClickAtstring
Pode ser nullFormatodate-time
linksobject[]

The rewritten links, in the order they appeared in the message. Only links in the new part of the body are here: the quoted history under a reply belongs to whoever wrote it, and routing their URLs through our redirector would both rewrite their message and record the recipient "clicking" something we did not put there. Repeated destinations share one entry, because a campaign page linked from a header image, a button and a footer is one question asked three times. Absent only from the trimmed form on a GET /emails row.

idstring
urlstring

Where it actually goes: the original href.

labelstring

The text the link read as in the message, where it had any. A bare URL rarely tells the sender which of five links somebody followed.

Pode ser null
clickCountinteger
clickCountRawinteger

Translationobject

The preview, and exactly what a translate on POST /emails would produce for the same input. Show it, let someone edit it, then send the edited text as an ordinary html/subject with no translate on the request. Sending with translate after previewing translates a second time and discards the edits.

objectstring
Um de"translation"
languageLanguage
detectedSourceLanguageLanguage
subjectstring

Null when no subject was given. Safe to put straight into a header.

Pode ser null
htmlstring

Null when no html was given. Carries dir="rtl" when the target needs it, and already contains the original beneath the translation when includeOriginal is on.

Pode ser null
textstring

Null when no text was given.

Pode ser null
includeOriginalboolean

Echoed because it changes what html contains: with it on, the original is already in there and appending your own copy would send it twice.