Languages
Every operation in this group: what it accepts, what it returns and the errors it can answer with.
Operations
Write in your own language and have it arrive in the recipient's.
Put translate on a send and the body (and the subject, unless you say otherwise) is translated at the moment the request is accepted, before any record of it exists. That timing is the feature: a scheduled message carries the words that were approved rather than whatever a model produces on Tuesday, and a translation that could not be produced refuses the send instead of quietly delivering the original. A message is never sent in a language its sender did not pick.
includeOriginal puts what you actually wrote below the translation, behind a separator and captioned in the recipient's language. Leave it on: it is the only thing that lets the person reading check a sentence that lands strangely, and without it they are being asked to trust a model neither of you can see the output of.
POST /emails/translate returns exactly what a send would produce, for showing somebody before they commit.
GET/languages
Every language a message can be sent in
Behind a key like everything else, and needing no scope: it names no data belonging to anybody.
Fetch it once and keep it. The whole table comes back in one response with no cursor. It is a couple of hundred rows that change a handful of times a year, and a client that hardcodes the list or scrapes it out of this document goes stale the day a row is added.
The ORDER is meaningful: the languages people are most likely to be emailed in come first, then regional variants, then the rest by region. A picker should render it as it arrives until somebody types. Search over native, label and code together, and show native first, because it is the word someone looking for their own language is actually looking for.
Returns
The whole table, in picker order.
Errors
The errors every operation can return400401403404422500Error catalog
Also available in
Objects
Languageobject
codestringRequiredBCP-47. What every endpoint here accepts and returns.
labelstringRequiredThe English name: "Brazilian Portuguese".
nativestringRequiredThe endonym, in its own script. Show this first.
flagstringRequiredTwo regional-indicator codepoints. A scanning aid beside the native name, never an identifier. Never show it on its own.
rtlbooleanRequiredRight-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.
LanguageListobject
objectstring- One of
"list" dataLanguage[]