Письма
Каждая операция этой группы: что она принимает, что возвращает и какими ошибками может ответить.
Операции
Send, schedule, cancel and retrieve.
POST/emails
Send an email
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.
Заголовки
Idempotency-KeystringMakes a retry safe. Reusing one with a different body is a 422.
До 255 символовШаблон^[A-Za-z0-9_.:-]+$
Тело запроса
fromstring | objectОбязательноSender as
[email protected],Acme Billing <[email protected]>or{ email, name }. It must be an address the key may send as, otherwise 403from_address_forbidden.emailstringОбязательно- До 320 символов
namestring- До 128 символов
to(string | object)[]ОбязательноOne recipient or a list.
to,ccandbcctogether hold at most 50 addresses, and more is a 422too_many_recipients.От 1 до 50 элементовemailstringОбязательно- До 320 символов
namestring- До 128 символов
cc(string | object)[]Copy recipients, counted toward the 50 recipient ceiling.
До 50 элементовПо умолчанию[]emailstringОбязательно- До 320 символов
namestring- До 128 символов
bcc(string | object)[]Blind copy recipients, counted toward the 50 recipient ceiling.
До 50 элементовПо умолчанию[]emailstringОбязательно- До 320 символов
namestring- До 128 символов
replyTostring | objectWritten into the
Reply-Toheader.emailstringОбязательно- До 320 символов
namestring- До 128 символов
subjectstringAt most 998 characters. Falls back to the template or draft subject when empty.
До 998 символовПо умолчанию""htmlstringHTML body, at most 1,000,000 characters.
До 1000000 символовtextstringPlain text body, at most 1,000,000 characters.
До 1000000 символовtemplateobjectA stored template by id or slug. Omitting
versionresolves whatever is published at that moment, so pin it when somebody else owns the copy.idstringОбязательно- От 1 до 128 символов
versioninteger- Больше 0Не больше 100000
propsRecord<string, any>slotsRecord<string, any>
translateobject{ to, from?, includeOriginal?, subject? }.totakes a code, an English name or an endonym.includeOriginalandsubjectboth default to true.tostringОбязательно- От 2 до 60 символов
fromstring- От 2 до 60 символов
includeOriginalboolean- По умолчанию
true subjectboolean- По умолчанию
true
headersRecord<string, string>Custom headers limited to
X-*,List-*,Reply-To,Precedence,Auto-Submitted,Importance,PriorityandFeedback-ID. Anything the server sets itself is a 422reserved_header.По умолчанию{}attachmentsobject[]At most 20 files. Each entry is either an inline file, with
filenameandcontentas 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.До 20 элементовПо умолчанию[]filenamestringОбязательно- От 1 до 255 символов
contentstringОбязательно- От 1 до 6990515 символовШаблон
^[A-Za-z0-9+/=\r\n]+$ contentTypestring- До 255 символовШаблон
^[\w.+-]+\/[\w.+-]+(?:[ \t]*;[ \t]*[\w.+-]+=(?:"[^"\r\n]*"|[\w.+-]+))*$
attachmentDeliverystringHow the files in
attachmentstravel.mimecarries them inside the message, the way mail always has, so a file over 5 MB is refused.linkuploads each file and puts a download link in the body in its place, so the message itself stays small.autolinks only when thefromdomain 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 toauto. A download link uses the files domain when thefromdomain has one active and the default OpenEmail host otherwise.Одно из"mime""link""auto"threadIdstringFiles the sent message into an existing thread.
До 256 символовdraftIdstringSends an existing draft as written. Cannot be combined with
templateortranslate.До 256 символовscheduledAtstringA
Date, an ISO 8601 instant or a duration such asPT1HorP2D. At least one second and at most 365 days out.От 3 до 64 символовcancellableForSecondsintegerAn undo window from 0 to 900 seconds on an immediate send. Refused alongside
scheduledAt, which is already cancellable until it goes.Не меньше 0Не больше 900По умолчанию0trackingobjectOpen and link tracking for this send alone. A field left out takes the
fromaddress'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 withPATCH /settings?address=.opensbooleanclicksboolean
signaturebooleanAn
htmlbody goes out exactly as written, so it carries a signature only when this istrue, while atext-only body carries one unless this isfalse. When it is added it is thefromaddress'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.По умолчанию{}
Возвращает
Ошибки
- 409
domain_not_sendable: thefromdomain is known to this workspace but its signing records are not in DNS yet, so nothing was accepted. Ortranslation_not_configured: this workspace has no AI configured, sotranslatecannot 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. Orai_quota_exceeded: withtranslate, 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.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
GET/emails
List sent messages
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.
Параметры запроса
statusstringComma-separated.
fromstringA bare sending address such as
[email protected], matched exactly and case insensitively. A display name form does not match.broadcastIdstringOnly the copies of one broadcast, a
brd_id fromPOST /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.От 1 до 64 символовscheduledFromstringOnly messages scheduled for this instant or later, ISO 8601 with a zone. With
scheduledToandstatus=scheduled,queuedit lists what is waiting to go out in a window, as the calendar of the app does. A message with noscheduledAtis left out.Форматdate-timescheduledTostringOnly messages scheduled for this instant or earlier.
scheduledFromafterscheduledTois a 422invalid_parameter.Форматdate-timelimitintegerRows per page, a whole number from 1 to 100, defaulting to 25. Outside that range is a 422.
Не меньше 1Не больше 100По умолчанию25cursorstringA message id. Keyset, not offset.
Возвращает
A page of messages, newest first.
Ошибки
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
POST/emails/batch
Send up to 100 messages
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.
Тело запроса
emailsSendEmailRequest[]- До 100 элементов
Возвращает
Per-item results.
Ошибки
- 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.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
POST/emails/translate
Translate a message without sending it
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.
Тело запроса
htmlstringHTML body to translate. Only the content inside
<body>is sent to the model when the markup is a full document.До 1000000 символовtextstringPlain text body to translate. Translated separately when given alongside
html.До 1000000 символовsubjectstringSubject line to translate, at most 998 characters.
До 998 символовtostringОбязательноTarget language as a code (
de), English name (German) or endonym (Deutsch). An unrecognised value is a 422invalid_parameteronto.От 2 до 60 символовfromstringThe language you wrote in. Stating it skips the detection call.
От 2 до 60 символовincludeOriginalbooleanDefaults to true, placing your original text below the translation under a caption in the target language.
По умолчаниюtrue
Возвращает
The translation. Nothing was sent.
Ошибки
- 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.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
POST/emails/check
Check how a message would be rated, without sending it
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.
Тело запроса
fromstringThe address it will be sent from.
До 320 символовfromNamestringThe display name it will carry. A name that claims another address or a known brand raises the phishing score.
До 320 символовreplyTostringA Reply-To on a different domain raises the phishing score.
До 320 символовsubjectstringSubject line, at most 998 characters.
До 998 символовПо умолчанию""htmlstringHTML body. Links and images are read from it.
До 200000 символовtextstringPlain text body. Taken from
htmlwhen left out.До 200000 символовreplyingbooleanTrue 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.
До 100 элементов
Возвращает
The scores. Nothing was stored or sent.
Ошибки
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
GET/emails/{id}
Retrieve a message
Requires the emails:read scope.
Параметры пути
idstringОбязательноThe send id,
msg_followed by 24 hex characters, as returned bysend.
Возвращает
The message, with per-recipient state.
Ошибки
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
PATCH/emails/{id}
Change a message that has not gone yet
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.
Параметры пути
idstringОбязательноThe
msg_send id to move.
Тело запроса
scheduledAtstringWhen it goes out instead: an ISO 8601 instant, or a duration such as
PT2H, up to a year out.От 3 до 64 символовsubjectstringThe new subject, up to 998 characters.
До 998 символовhtmlstringThe new HTML body.
До 1000000 символовtextstringThe new plain text body.
До 1000000 символовfromstringThe address it goes out as, checked as it is on a send.
От 3 до 320 символовto(string | object)[]Replaces the stored recipients whole. So do
ccandbcc.От 1 до 50 элементовemailstringОбязательно- До 320 символов
namestring- До 128 символов
cc(string | object)[]Replaces the copied recipients.
До 50 элементовemailstringОбязательно- До 320 символов
namestring- До 128 символов
bcc(string | object)[]Replaces the blind copied recipients.
До 50 элементовemailstringОбязательно- До 320 символов
namestring- До 128 символов
Возвращает
The message as it is now.
Ошибки
- 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.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
POST/emails/{id}/cancel
Cancel a message
Idempotent: cancelling twice returns the same cancelled message. A 409 means it has already gone and cannot be un-sent.
Параметры пути
idstringОбязательноThe
msg_send id to cancel.
Возвращает
Cancelled.
Ошибки
- 409
No longer cancellable.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
GET/emails/{id}/events
What happened to a message
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.
Параметры пути
idstringОбязательноThe
msg_send id whose trail to read.
Параметры запроса
limitintegerRows per page, 1 to 100.
Не меньше 1Не больше 100По умолчанию25cursorstringAn event id. Keyset, not offset: pass the previous page's
nextCursor. One that names nothing in this list is a 400invalid_cursor.
Возвращает
A page of the event trail, oldest first.
Ошибки
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
POST/emails/compose
Write an email with AI
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.
Тело запроса
promptstringОбязательноWhat to write: an instruction, a rough draft or a few notes.
От 1 до 20000 символовsubjectstringThe subject so far, if there is one.
До 998 символовtostring[]Who it goes to, so the greeting and tone fit.
До 50 элементовccstring[]Who is copied.
До 50 элементовthreadIdstringA thread to reply in. Its messages are read as context, and it needs
threads:read.От 1 до 200 символов
Возвращает
The body that was written.
Ошибки
- 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.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
POST/emails/rewrite
Rewrite part of an email with AI
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.
Тело запроса
targetstringbodyorsubject. Defaults tobody.Одно из"subject""body"По умолчанию"body"textstringОбязательноThe subject or body to rewrite.
От 1 до 100000 символовactionstringОбязательноWhat to do:
shorten,lengthen,rephrase,formal,casualorcustom.Одно из"shorten""lengthen""rephrase""formal""casual""custom"instructionstringWhat to change, up to 500 characters. Required with
custom.До 500 символовcountintegerHow many versions, 1 to 5. Defaults to 3.
Не меньше 1Не больше 5По умолчанию3threadIdstringThe thread the text replies in, read as context.
От 1 до 200 символов
Возвращает
The versions, best first.
Ошибки
- 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.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
POST/emails/subject
Suggest a subject line
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.
Тело запроса
messagestringОбязательноThe body of the email, as text or HTML.
От 1 до 100000 символов
Возвращает
The suggested subject.
Ошибки
- 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.
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
Объекты
Emailobject
objectstring- Одно из
"email" idstringThe durable handle,
msg_+ 24 hex.statusstring- Одно из
"queued""scheduled""sending""sent""partial""cancelled""failed" modestring- Одно из
"live""test" fromstringsubjectstring- Может быть null
messageIdstringRFC 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, asemailId.Может быть nullthreadIdstring- Может быть null
transportstringHow the bytes left, once they have. Null until dispatch.
testis what a message sent with anoe_test_key records: it was accepted and every recipient marked delivered, but nothing was carried.devis 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.Может быть nullОдно из"ses""test""dev"attemptsintegerlastErrorstring- Может быть null
scheduledAtstring- Может быть nullФормат
date-time cancellableUntilstring- Может быть nullФормат
date-time sentAtstring- Может быть nullФормат
date-time tagsRecord<string, string>broadcastIdstringThe
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.Может быть nullsourcestring- Одно из
"api""oauth""composer""mcp""ai""form" createdAtstring- Формат
date-time recipientsobject[]Returned on retrieval only.
emailstringnamestring- Может быть null
kindstring- Одно из
"to""cc""bcc" statusstringuncertainis 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.suppressedis 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.Одно из"pending""delivered""failed""bounced""complained""suppressed""uncertain"errorstring- Может быть null
deliveredAtstring- Может быть nullФормат
date-time
translationobjectPresent 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.
languagestringThe resolved target code:
de,pt-BR.languageNamestringIts English name.
detectedSourceLanguagestringStated or detected. Null when detection abstained.
Может быть nullsubjectbooleanWhether the subject was translated too.
includeOriginalbooleanWhether 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.
objectstringОбязательно- Одно из
"email_check" spamobjectОбязательно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.scoreintegerОбязательно- Не меньше 0Не больше 100
levelstringОбязательноmediumfrom 35,highfrom 60.Одно из"low""medium""high"signalsstring[]ОбязательноWhat raised the score, heaviest first, as stable ids such as
spam-phrasesorlink-shortener.
phishingobjectОбязательно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.
scoreintegerОбязательно- Не меньше 0Не больше 100
levelstringОбязательноcautionfrom 30,dangerfrom 60.Одно из"clear""caution""danger"signalsstring[]Обязательноreasonsstring[]ОбязательноOne plain sentence per signal, heaviest first.
aiobjectОбязательно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.
scoreintegerОбязательноNull when the message was not judged;
skippedsays why.Может быть nullНе меньше 0Не больше 100levelstringОбязательно- Одно из
"unknown""unremarkable""possible""likely" signalsstring[]Обязательноreasonsstring[]ОбязательноwordsintegerОбязательноWords of your own prose that were read.
skippedstringОбязательноtoo-shortunder 40 words. Null when it was scored.Может быть nullОдно из"too-short""encrypted""bulk"
EmailCompositionobject
objectstringОбязательно- Одно из
"composition" bodystringОбязательноThe body that was written.
EmailListobject
objectstring- Одно из
"list" dataEmail[]hasMorebooleannextCursorstring- Может быть null
EmailRewriteobject
objectstringОбязательно- Одно из
"rewrite" targetstringОбязательно- Одно из
"subject""body" variationsstring[]ОбязательноDifferent versions of the text, never the original itself.
Eventobject
objectstring- Одно из
"event" idstringtypestringDotted, such as
email.accepted,email.sent,email.delivered,email.bouncedoremail.opened.dataobjectWhatever the event recorded. An empty object when it carries nothing.
createdAtstring- Формат
date-time
EventListobject
objectstring- Одно из
"list" dataEvent[]hasMorebooleanTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringThe id of the last row on this page, or null on the last page.
Может быть null
Languageobject
codestringОбязательноBCP-47. What every endpoint here accepts and returns.
labelstringОбязательноThe English name: "Brazilian Portuguese".
nativestringОбязательноThe endonym, in its own script. Show this first.
flagstringОбязательноTwo regional-indicator codepoints. A scanning aid beside the native name, never an identifier. Never show it on its own.
rtlbooleanОбязательно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 | objectОбязательноemailstringОбязательно- До 320 символов
namestring- До 128 символов
to(string | object)[]Обязательно- От 1 до 50 элементов
emailstringОбязательно- До 320 символов
namestring- До 128 символов
cc(string | object)[]- До 50 элементовПо умолчанию
[]emailstringОбязательно- До 320 символов
namestring- До 128 символов
bcc(string | object)[]- До 50 элементовПо умолчанию
[]emailstringОбязательно- До 320 символов
namestring- До 128 символов
replyTostring | objectemailstringОбязательно- До 320 символов
namestring- До 128 символов
subjectstring- До 998 символовПо умолчанию
"" htmlstring- До 1000000 символов
textstring- До 1000000 символов
templateobjectidstringОбязательно- От 1 до 128 символов
versioninteger- Больше 0Не больше 100000
propsRecord<string, any>slotsRecord<string, any>
translateobjecttostringОбязательно- От 2 до 60 символов
fromstring- От 2 до 60 символов
includeOriginalboolean- По умолчанию
true subjectboolean- По умолчанию
true
headersRecord<string, string>- По умолчанию
{} attachmentsobject[]- До 20 элементовПо умолчанию
[]filenamestringОбязательно- От 1 до 255 символов
contentstringОбязательно- От 1 до 6990515 символовШаблон
^[A-Za-z0-9+/=\r\n]+$ contentTypestring- До 255 символовШаблон
^[\w.+-]+\/[\w.+-]+(?:[ \t]*;[ \t]*[\w.+-]+=(?:"[^"\r\n]*"|[\w.+-]+))*$
attachmentDeliverystringHow the files in
attachmentstravel.mimecarries them inside the message, the way mail always has, so a file over 5 MB is refused.linkuploads each file and puts a download link in the body in its place, so the message itself stays small.autolinks only when thefromdomain 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 toauto. A download link uses the files domain when thefromdomain has one active and the default OpenEmail host otherwise.Одно из"mime""link""auto"threadIdstring- До 256 символов
draftIdstring- До 256 символов
scheduledAtstring- От 3 до 64 символов
cancellableForSecondsinteger- Не меньше 0Не больше 900По умолчанию
0 trackingobjectOpen and link tracking for this send alone. A field left out takes the
fromaddress'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 withPATCH /settings?address=.opensbooleanclicksboolean
signaturebooleanAn
htmlbody goes out exactly as written, so it carries a signature only when this istrue, while atext-only body carries one unless this isfalse. When it is added it is thefromaddress'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>- По умолчанию
{}
SubjectSuggestionobject
objectstringОбязательно- Одно из
"subject_suggestion" subjectstringОбязательно
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.
objectstringPresent when the report is the whole response body. Absent under an email's
trackingfield, which is part of that email rather than a resource in its own right.Одно из"tracking"idstringThe tracking record,
tmsg_+ 24 hex. Not the message id and not the send id.sendIdstringThe
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.Может быть nullthreadIdstring- Может быть null
messageIdstringRFC 5322 Message-ID. Not a correlation key. The header is rewritten on the way out. Correlate on
id.Может быть nullsubjectstring- Может быть null
fromstringsourcestring- Одно из
"api""oauth""composer""mcp""ai""form" sentAtstring- Может быть nullФормат
date-time opensbooleanWhat 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".
clicksbooleanAs
opens, for link rewriting. The two are independent switches.openedbooleanclickedbooleanattributablebooleanWhether 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.
recipientscarries the same fact one row at a time, and one row at a time is where it gets missed.openCountintegerOpens 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.
clickCountintegerCounted 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.
openCountRawintegerEvery open hit, the automated ones included.
openCountRaw - openCountis 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.clickCountRawintegerAs
openCountRaw, for clicks.firstOpenAtstring- Может быть nullФормат
date-time lastOpenAtstring- Может быть nullФормат
date-time firstClickAtstring- Может быть nullФормат
date-time lastClickAtstring- Может быть nullФормат
date-time recipientsobject[]One entry per tracked copy, which is not always one entry per person. Absent only from the trimmed form on a
GET /emailsrow; every/trackingresponse carries it, list included.emailstringNull 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.
Может быть nullkindstring- Может быть nullОдно из
"to""cc""bcc" attributedbooleanFalse on exactly the rows described above. Branch on this rather than on
emailbeing a string, and show nothing where it is false: attributing an unattributed open to a named recipient invents evidence about a specific person.openCountintegerclickCountintegerfirstOpenAtstring- Может быть nullФормат
date-time lastOpenAtstring- Может быть nullФормат
date-time firstClickAtstring- Может быть nullФормат
date-time lastClickAtstring- Может быть nullФормат
date-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 /emailsrow.idstringurlstringWhere it actually goes: the original href.
labelstringThe 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.
Может быть nullclickCountintegerclickCountRawinteger
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- Одно из
"translation" languageLanguagedetectedSourceLanguageLanguagesubjectstringNull when no subject was given. Safe to put straight into a header.
Может быть nullhtmlstringNull when no
htmlwas given. Carriesdir="rtl"when the target needs it, and already contains the original beneath the translation whenincludeOriginalis on.Может быть nulltextstringNull when no
textwas given.Может быть nullincludeOriginalbooleanEchoed because it changes what
htmlcontains: with it on, the original is already in there and appending your own copy would send it twice.