POST
/v2/projects/{projectId}/languagesCreate 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.
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
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
paramsarray<object>optional
401Returned when the request is unauthenticated.
codestringrequired
paramsarray<object>optional
403Returned when you do not have permission to create a language for the project.
codestringrequired
paramsarray<object>optional
404Returned when the project is not found.
codestringrequired
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.