reference

Portal

3 endpoints

POST/api/v3/portal/translate

Translate (Context Sensitive)

Translates the content synchronously. originalContent (the text to translate), sourceLocale and targetLocale (for example en_us, fr_fr) are required; orgUnitUuid (the org unit whose translation settings apply) is optional.

Request body

PortalTranslateRequest

contextPrioritization string
Which context wins when glossaries and translation memories disagree. Defaults to the account's setting.
instructions AIInstructions
orgUnitUuid string
The org unit whose translation settings (glossaries, translation memories) apply. Defaults to your account's.
originalContentrequired string
The text to translate.
sourceLocalerequired string
Locale of originalContent.
targetLocalerequired string
Locale to translate into.

Responses

200 OK

map<string, object>

Request

curl -X POST 'https://app.wxrks.com/api/v3/portal/translate' \
  -H "X-AUTH-TOKEN: $WXRKS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "originalContent": "Our support team reviews the release notes before Friday.",
  "sourceLocale": "en_us",
  "targetLocale": "pt_br",
  "orgUnitUuid": "6b1f0c2e-8d4a-4f3b-9c5e-2a7d9e1b4c60"
}'

POST/api/v3/portal/translations

Translate (Context Sensitive) - Async

Starts a translation and answers 202 with the request; poll getTranslationResult (the Location header) for the result. originalContent (the text to translate), sourceLocale and targetLocale (for example en_us, fr_fr) are required; orgUnitUuid (the org unit whose translation settings apply) is optional.

Request body

PortalTranslateRequest

contextPrioritization string
Which context wins when glossaries and translation memories disagree. Defaults to the account's setting.
instructions AIInstructions
orgUnitUuid string
The org unit whose translation settings (glossaries, translation memories) apply. Defaults to your account's.
originalContentrequired string
The text to translate.
sourceLocalerequired string
Locale of originalContent.
targetLocalerequired string
Locale to translate into.

Responses

202 Accepted

PortalTranslationRequestDto

createdAt integer (int64)
error string
finishedAt integer (int64)
requestUuid string (uuid)
status stringSTARTED FINISHED FAILED
translation string

Request

curl -X POST 'https://app.wxrks.com/api/v3/portal/translations' \
  -H "X-AUTH-TOKEN: $WXRKS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "originalContent": "Our support team reviews the release notes before Friday.",
  "sourceLocale": "en_us",
  "targetLocale": "pt_br",
  "orgUnitUuid": "6b1f0c2e-8d4a-4f3b-9c5e-2a7d9e1b4c60"
}'

Response 202

{
  "createdAt": 0,
  "error": "string",
  "finishedAt": 0,
  "requestUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "STARTED",
  "translation": "string"
}

GET/api/v3/portal/translations/{requestUuid}

Get Translation Result

path parameters

requestUuidrequired string (uuid)

Responses

200 OK

PortalTranslationRequestDto

createdAt integer (int64)
error string
finishedAt integer (int64)
requestUuid string (uuid)
status stringSTARTED FINISHED FAILED
translation string

Request

curl -X GET 'https://app.wxrks.com/api/v3/portal/translations/{requestUuid}' \
  -H "X-AUTH-TOKEN: $WXRKS_TOKEN"

Response 200

{
  "createdAt": 0,
  "error": "string",
  "finishedAt": 0,
  "requestUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "STARTED",
  "translation": "string"
}