POST/v2/projects/{projectId}/start-batch-job/set-translation-state

Set the translation state for project keys

Starts an asynchronous batch job that changes the translation state for selected keys and languages in a project. Supply keyIds, languageIds, and a state to specify which translations to update and their new state; the response contains the job record and its processing status.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
projectIdintegerrequired
The integer ID of the project whose translations to update.

Batch request to set the translation state for selected keys and languages.

keyIdsarray<integer>required
The IDs of the keys whose translations to update. Must contain at least one integer.
languageIdsarray<integer>required
The IDs of the target languages. Must contain at least one integer.
statestringrequired
The state to assign: UNTRANSLATED, TRANSLATED, REVIEWED, or DISABLED.
Allowed:UNTRANSLATEDTRANSLATEDREVIEWEDDISABLED

5 status codes
200Returns the batch job record, including its ID, status, progress, total item count, job type, and timestamps.
activityRevisionIdintegeroptional
The activity revision id, that stores the activity details of the job
authorobjectoptional
createdAtintegerrequired
The time when the job created
errorMessagestringoptional
If the job failed, this is the error message
idintegerrequired
Batch job id
progressintegerrequired
Total items, that have been processed so far
statusstringrequired
Status of the batch job
Allowed:PENDINGRUNNINGSUCCESSFAILEDCANCELLED
totalItemsintegerrequired
Total items
typestringrequired
Type of the batch job
Allowed:AI_PLAYGROUND_TRANSLATEPRE_TRANSLATE_BT_TMMACHINE_TRANSLATEAUTO_TRANSLATEDELETE_KEYSRESTORE_KEYSHARD_DELETE_KEYSSET_TRANSLATIONS_STATECLEAR_TRANSLATIONSCOPY_TRANSLATIONSTAG_KEYSUNTAG_KEYS
updatedAtintegerrequired
The time when the job was last updated (status change)
400Returned when the request is invalid or fails validation.
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 update translations in the project.
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 is not 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; a 401 when authentication is missing or invalid; a 403 when the authenticated user lacks permission; and a 404 when the project is not found. keyIds and languageIds must each contain at least one ID, and state must be one of UNTRANSLATED, TRANSLATED, REVIEWED, or DISABLED. The projectId path parameter must identify an existing project.