POST/v2/projects/{projectId}/languages

Create a project language

Creates a language for a project. Supply name, originalName, and tag; the tag follows the BCP 47 language-tag definition. You can also provide a flag emoji in flagEmoji.

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

1 parameter · 4 body fields
projectIdintegerrequired
The unique integer identifier of the project to add the language to.

The language to create. Include name, originalName, and tag; flagEmoji is optional.

flagEmojistringoptional
Language flag emoji as UTF-8 emoji
namestringrequired
Language name in english
originalNamestringrequired
Language name in this language
tagstringrequired
Language tag according to BCP 47 definition

5 status codes
200Returns the created language with its identifier, names, tag, base-language status, and optional flag emoji.
basebooleanrequired
Whether is base language of project
flagEmojistringoptional
Language flag emoji as UTF-8 emoji
idintegerrequired
namestringrequired
Language name in english
originalNamestringoptional
Language name in this language
tagstringrequired
Language tag according to BCP 47 definition
400Returned when required fields are missing or a field 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 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 language for 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 body is invalid, a 401 when authentication is missing or invalid, a 403 when you lack permission, and a 404 when the project is not found. The projectId path parameter must identify an existing project. The body must include name, originalName, and tag; the names can contain at most 100 characters, and tag can contain at most 20 characters and must not contain a comma.