POST/v2/projects/{projectId}/translations/create-comment

Create a comment on a translation

Creates a comment on a translation identified by its key and language. Supply keyId, languageId, state, and non-empty text; if the translation does not exist, the request creates an empty translation. The response includes both the created comment and the translation.

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

1 parameter · 4 body fields
projectIdintegerrequired
The unique identifier of the project containing the translation.

The translation comment to create. All fields are required.

keyIdintegerrequired
The unique identifier of the localization key to comment on.
languageIdintegerrequired
The unique identifier of the language for the translation.
statestringrequired
The comment state: RESOLUTION_NOT_NEEDED, NEEDS_RESOLUTION, or RESOLVED.
Allowed:RESOLUTION_NOT_NEEDEDNEEDS_RESOLUTIONRESOLVED
textstringrequired
The comment text. Must contain at least one character.

5 status codes
201Returns the created comment and its translation, including comment author, timestamps, state, and text.
commentobjectrequired
translationobjectrequired
400Returned when the request body is invalid or a field 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 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 you do not have permission to create a comment on the translation.
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, key, or language 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 body is invalid. A 401 is returned when authentication is missing or invalid, a 403 when you lack permission, and a 404 when the referenced resource cannot be found. The projectId path parameter must identify the project, and keyId, languageId, state, and text are required; state must be one of RESOLUTION_NOT_NEEDED, NEEDS_RESOLUTION, or RESOLVED, and text must contain at least one character.