Skip to content

Languages API

Languages (locales) define which translations your project supports. You can add system locales from Comvi’s built-in list, or create custom locales for non-standard language codes.

Retrieve all languages configured for a project, along with the project’s source locale.

GET /api/v1/projects/:id/locales/stats
ParameterTypeRequiredDescription
idintegerYesProject ID
Terminal window
curl -X GET \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/projects/1/locales/stats
[
{
"localeCode": "en",
"totalKeys": 250,
"translated": 250,
"notReviewed": 0,
"notTranslated": 0,
"translatedPct": 100,
"notReviewedPct": 0,
"notTranslatedPct": 0
},
{
"localeCode": "uk",
"totalKeys": 250,
"translated": 200,
"notReviewed": 30,
"notTranslated": 20,
"translatedPct": 80,
"notReviewedPct": 12,
"notTranslatedPct": 8
}
]
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to view this project

Add a language to a project. You can add a system locale by code, or create a custom locale with your own code, name, and native name.

POST /api/v1/projects/:id/locales
ParameterTypeRequiredDescription
idintegerYesProject ID
FieldTypeRequiredDescription
isCustombooleanYesSet to false
localeCodestringYesSystem locale code (e.g., uk, de, ja)
FieldTypeRequiredDescription
isCustombooleanYesSet to true
codestringYesCustom locale code (1-50 chars, alphanumeric with - and _)
namestringYesDisplay name (e.g., “Pirate English”)
nativeNamestringYesNative name
flagEmojistringNoFlag emoji (max 10 characters)
Terminal window
curl -X POST \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"isCustom": false,
"localeCode": "uk"
}' \
https://api.comvi.io/api/v1/projects/1/locales
Terminal window
curl -X POST \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"isCustom": true,
"code": "en-pirate",
"name": "Pirate English",
"nativeName": "Pirate English",
"flagEmoji": "\u{1f3f4}\u{200d}\u{2620}\u{fe0f}"
}' \
https://api.comvi.io/api/v1/projects/1/locales
{
"id": 42,
"code": "uk",
"name": "Ukrainian",
"nativeName": "Українська",
"isCustom": false,
"flagEmoji": "🇺🇦"
}
StatusErrorDescription
400LOCALE_NOT_FOUNDThe specified localeCode is not a valid system locale
400VALIDATION_ERRORMissing required fields for the chosen isCustom mode
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to edit this project
403LIMIT_EXCEEDEDLanguage limit reached for the current plan
409LOCALE_ALREADY_EXISTSThis locale is already added to the project

Remove a language from a project. This deletes all translation values for that locale.

DELETE /api/v1/projects/:id/locales/:localeCode
ParameterTypeRequiredDescription
idintegerYesProject ID
localeCodestringYesLocale code to remove (e.g., uk)
Terminal window
curl -X DELETE \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/projects/1/locales/uk

Returns 204 No Content with an empty body on success.

StatusErrorDescription
400LOCALE_NOT_FOUNDThe locale code is not valid or not in this project
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to edit this project
404PROJECT_NOT_FOUNDProject does not exist

Retrieve the full list of system locales supported by Comvi. This is a public endpoint that does not require authentication.

GET /api/v1/locales
Terminal window
curl -X GET \
https://api.comvi.io/api/v1/locales
[
{
"id": 1,
"code": "en",
"name": "English",
"nativeName": "English",
"isCustom": false,
"flagEmoji": "🇺🇸"
},
{
"id": 2,
"code": "uk",
"name": "Ukrainian",
"nativeName": "Українська",
"isCustom": false,
"flagEmoji": "🇺🇦"
},
{
"id": 3,
"code": "de",
"name": "German",
"nativeName": "Deutsch",
"isCustom": false,
"flagEmoji": "🇩🇪"
}
]

Retrieve details for a single locale by its code. This is a public endpoint.

GET /api/v1/locales/:code
ParameterTypeRequiredDescription
codestringYesLocale code (e.g., en, uk)
Terminal window
curl -X GET \
https://api.comvi.io/api/v1/locales/uk
{
"id": 2,
"code": "uk",
"name": "Ukrainian",
"nativeName": "Українська",
"isCustom": false,
"flagEmoji": "🇺🇦"
}
StatusErrorDescription
404LOCALE_NOT_FOUNDNo locale exists with the given code