PUT/v2/projects/{projectId}/keys/trash/{keyId}/restore

Restore a trashed localization key

Restores a localization key from the project's trash. Use this operation to return a deleted key to the project instead of permanently removing it; the response contains the restored key's identifying and configuration details.

2 parameters
keyIdintegerrequired
The integer ID of the trashed key to restore.
projectIdintegerrequired
The integer ID of the project containing the trashed key.

5 status codes
200Returns the restored key object, including its ID and name, and available branch, custom values, description, character limit, and namespace.
branchstringoptional
Branch of key
customobjectoptional
Custom values of the key
descriptionstringoptional
Description of key
idintegerrequired
Id of key record
maxCharLimitintegeroptional
Maximum character limit for translations of this key
namestringrequired
Name of key
namespacestringoptional
Namespace of key
400Returned when a path parameter is invalid.
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 is unauthenticated.
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 restore 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 trashed key does not exist.
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 a path value is invalid. A 401 is returned when the request is unauthenticated, a 403 when the authenticated user lacks permission, and a 404 when the project or trashed key cannot be found. The keyId and projectId path parameters must identify the trashed key and its project.