言語
このグループのすべてのオペレーションの、受け付ける内容、返す内容、返しうるエラー。
オペレーション
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.
戻り値
The whole table, in picker order.
エラー
どのオペレーションも返しうるエラー400401403404422500エラー一覧
ほかの提供先
オブジェクト
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.
LanguageListobject
objectstring- 次のいずれか
"list" dataLanguage[]