PUT/v2/projects/{projectId}/keys/{id}/complex-update

Update a localization key and related data

Updates a localization key and related data, including translations, tags, and screenshots. Supply name and any other fields you want to change; omitted fields are generally left unchanged. Changes to translations replace existing translations with the submitted values.

2 parameters · 16 body fields
idintegerrequired
The int64 identifier of the localization key to update.
projectIdintegerrequired
The int64 identifier of the project containing the key.

Localization key changes and related data. name is required; supply other fields only when you want to modify them.

branchstringoptional
Branch of the key. If not provided, default branch will be used
customobjectoptional
Custom values of the key. If not provided, custom values won't be modified
descriptionstringoptional
Description of the key. It's also used as a context for Tolgee AI translator
isPluralbooleanoptional
If key is pluralized. If it will be reflected in the editor. If null, value won't be modified.
maxCharLimitintegeroptional
Maximum character limit. Null = don't modify. 0 = remove limit.
namestringrequired
Name of the key
namespacestringoptional
The namespace of the key. (When empty or null default namespace will be used)
pluralArgNamestringoptional
The argument name for the plural. If null, value won't be modified. If isPlural is false, this value will be ignored.
relatedKeysInOrderarray<object>optional
Keys in the document used as a context for machine translation. Keys in the same order as they appear in the document. The order is important! We are using it for graph distance calculation.
screenshotIdsToDeletearray<integer>optional
IDs of screenshots to delete
screenshotUploadedImageIdsarray<integer>deprecatedoptional
Ids of screenshots uploaded with /v2/image-upload endpoint
screenshotsToAddarray<object>optional
Screenshots to add using uploaded image IDs. Each item must include `uploadedImageId` and can include `text` and `positions`; each position specifies integer `height`, `width`, `x`, and `y` values.
statesobjectoptional
Translation states to update, if not provided states won't be modified
tagsarray<string>optional
Tags of the key. If not provided tags won't be modified
translationsobjectoptional
Translations to update
warnOnDataLossbooleanoptional
If true, it will fail with 400 (with code plural_forms_data_loss) if plural is disabled and there are plural forms, which would be lost by the action. You can get rid of this warning by setting this value to false.

5 status codes
200Returns the updated key object, including its name, translations, tags, screenshots, and other key data.
branchstringoptional
Branch of the key
customobjectrequired
Custom values of the key
descriptionstringoptional
Description of key
idintegerrequired
Id of key record
isPluralbooleanrequired
If key is pluralized. If it will be reflected in the editor
maxCharLimitintegeroptional
Maximum character limit for translations of this key
namestringrequired
Name of key
namespacestringoptional
Namespace of key
pluralArgNamestringoptional
The argument name for the plural
screenshotsarray<object>required
Screenshots of the key
tagsarray<object>required
Tags of key
translationsobjectrequired
Translations object containing values updated in this request
400Returned when the request is invalid or a submitted value 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 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. 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 projectId path parameter and id path parameter must identify the project and key. name is required and must contain at least 1 character; description must not exceed 2000 characters, and translation states must be TRANSLATED or REVIEWED.