POST/v2/projects/{projectId}/languages/{languageId}/key/{keyId}/suggestion

Create a translation suggestion

Creates a translation suggestion for a key in a language within a project. Supply a non-empty translation value for the suggestion. The response includes the created suggestion and its state.

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

3 parameters · 1 body field
languageIdintegerrequired
The integer identifier of the language for the suggestion.
keyIdintegerrequired
The integer identifier of the key to suggest a translation for.
projectIdintegerrequired
The integer identifier of the project containing the language and key.

The translation text to submit as a suggestion.

translationstringrequired
The suggested translation. Must contain at least one character.

5 status codes
200Returns the created suggestion, including its identifier, translation, state, language and key identifiers, author, and timestamps.
authorobjectrequired
User who created the comment
createdAtstringrequired
idintegerrequired
isPluralbooleanrequired
keyIdintegerrequired
languageIdintegerrequired
statestringrequired
Allowed:ACTIVEACCEPTEDDECLINED
translationstringoptional
updatedAtstringrequired
400Returned when the request is invalid, including when `translation` is missing or empty.
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 authentication is missing or 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
403Returned when you do not have permission to create a suggestion.
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, language, or key 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 you lack permission, and a 404 when a referenced resource is not found. The languageId path parameter, keyId path parameter, and projectId path parameter must identify the requested resources; translation is required and must contain at least one character.