Translate text segments of an email
Translate text segments of an email with the Mailly email API for AI agents: POST /inbox/messages/{id}/translations. Parameters, request body, responses and code samples.
Used by the web inbox, which splits the rendered email into segments. Segments already translated are served from the cache for free; the rest are translated by the translation model and charged to the model usage balance. At most 60 segments and 12000 characters per request.
bearerAuthAuthorizationBearer <token>Mailly API key(Authorization: Bearer )
id*stringapplication/json- body
target*string"zh-CN""zh-TW""en""ja""ko""es""fr""de""pt""ru""it""vi"segmenter_version*integer-9007199254740991 <= value <= 9007199254740991subject?stringlength <= 1000segments*array<>items <= 60Translated text
application/json- response
success*booleantarget_language*stringsource_language*string|nullsubject*string|nullsegments*Translated text keyed by segment hash
[key: string]?unknowncurl -X POST 'https://api.mailly.site/inbox/messages/string/translations' \ -H 'Content-Type: application/json' \ -d '{ "target": "zh-CN", "segmenter_version": -9007199254740991, "segments": [ { "hash": "string", "text": "string" } ]}'{ "success": true, "target_language": "string", "source_language": "string", "subject": "string", "segments": { "property1": "string", "property2": "string" }, "property1": null, "property2": null}Set the read state of inbound emails in a thread PATCH
Set the read state of inbound emails in a thread with the Mailly email API for AI agents: PATCH /inbox/threads/{threadId}/read-state. Parameters, request body, responses and code samples.
Update a webhook endpoint PATCH
Update a webhook endpoint with the Mailly email API for AI agents: PATCH /inbox/webhook/endpoints/{endpointId}. Parameters, request body, responses and code samples.