PUT/v2/projects/{projectId}/keys/{keyId}/auto-translate

Trigger automatic translation for a localization key

Triggers automatic translation for a localization key using enabled machine-translation or translation-memory methods. Set at least one of useMachineTranslation or useTranslationMemory to true; when languages is omitted, only untranslated languages are processed. Existing translations for the selected languages are replaced with the generated results.

5 parameters
keyIdintegerrequired
The int64 identifier of the localization key to translate.
projectIdintegerrequired
The int64 identifier of the project containing the key.
languagesarray<string>optional
Language tags to translate. Defaults to untranslated languages when omitted.
useMachineTranslationbooleanoptional
Whether to use machine translation. Set this or `useTranslationMemory` to true to trigger translation.
useTranslationMemorybooleanoptional
Whether to use translation memory. Set this or `useMachineTranslation` to true to trigger translation.

5 status codes
200Confirms that the automatic translation request completed.
400Returned when the request is invalid, including when neither machine translation nor translation memory is enabled.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request has no valid authentication.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user does not have permission to translate the key.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the project or key cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the request is invalid, including when neither translation method is enabled. A 401 is returned when authentication is missing or invalid. A 403 is returned when the authenticated user lacks access. A 404 is returned when the project or key cannot be found. The keyId path parameter and projectId path parameter must identify the key and its project.