cURL
curl --request POST \ --url https://test.api.cxconnect.ai/language/translate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "document": { "value": "<string>", "mime_type": "<string>", "language": "<string>", "meta": {} }, "source": "<string>", "targets": [ "<string>" ], "meta": { "foo": "bar" }, "options": {}, "substitutions": [ { "source": "<string>", "text": "<string>", "target": "<string>", "substitution": "<string>" } ] } '
{ "results": { "en": { "language": "en", "value": "Hello" } }, "original": { "document": { "value": "<string>", "mime_type": "<string>", "language": "<string>", "meta": {} }, "source": "<string>", "targets": [ "<string>" ], "meta": { "foo": "bar" }, "options": {}, "substitutions": [ { "source": "<string>", "text": "<string>", "target": "<string>", "substitution": "<string>" } ] }, "extra": {} }
The translation endpoint allows submission of a source text, with or without a specified language, to translate to an array of destination languages.
The access token received from the authorization server in the OAuth 2.0 flow.
Show child attributes
Request metadata
{ "foo": "bar" }
Successful translation result
The results object contains the translated documents keyed by language
{ "en": { "language": "en", "value": "Hello" }}
Result metadata
Items associated with additional request options
Was this page helpful?