Skip to content

Translations API

Translation keys are the core data in Comvi. Each key belongs to a project and namespace, and holds translation values for each locale. This API lets you list, create, update, and delete keys and their values.

Retrieve translation keys for a project with cursor-based pagination and filtering.

GET /api/v1/projects/:projectId/keys
ParameterTypeRequiredDescription
projectIdintegerYesProject ID
ParameterTypeRequiredDescription
cursorstringNoCursor from the previous response’s nextCursor
limitintegerNoItems per page (1-100, default: 50)
searchstringNoSearch by key name
namespaceIdsinteger[]NoFilter by namespace IDs
statusesstring[]NoFilter by translation status: translated, not_reviewed, not_translated
localeCodesstring[]NoFilter by locale codes
sortBystringNoSort field: key, updatedAt, createdAt
sortOrderstringNoSort direction: asc, desc
Terminal window
curl -X GET \
-H "X-API-Key: tlk_your_api_key" \
"https://api.comvi.io/api/v1/projects/1/keys?limit=20&search=welcome&sortBy=key&sortOrder=asc"
{
"data": [
{
"id": 42,
"key": "welcome.message",
"namespace": "default",
"namespaceId": 1,
"description": "Main welcome message on the homepage",
"isPlural": false,
"characterLimit": null,
"translations": {
"en": {
"id": 101,
"value": "Welcome to our app!",
"status": "translated",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"createdBy": 1
},
"uk": {
"id": 102,
"value": "Ласкаво просимо!",
"status": "translated",
"createdAt": "2025-01-15T11:00:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z",
"createdBy": 1
}
},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z"
}
],
"pagination": {
"nextCursor": "eyJpZCI6NDN9",
"hasMore": true,
"totalItems": 250
}
}
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to view translations in this project

Retrieve a single translation key with all its locale values.

GET /api/v1/projects/:projectId/keys/:keyId
ParameterTypeRequiredDescription
projectIdintegerYesProject ID
keyIdintegerYesTranslation key ID
Terminal window
curl -X GET \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/projects/1/keys/42
{
"id": 42,
"key": "welcome.message",
"namespace": "default",
"namespaceId": 1,
"description": "Main welcome message on the homepage",
"isPlural": false,
"characterLimit": null,
"translations": {
"en": {
"id": 101,
"value": "Welcome to our app!",
"status": "translated",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"createdBy": 1
}
},
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to view this translation
404KEY_NOT_FOUNDTranslation key does not exist

Create a new translation key in a project. You can optionally include initial translation values for one or more locales.

POST /api/v1/projects/:projectId/keys
ParameterTypeRequiredDescription
projectIdintegerYesProject ID
FieldTypeRequiredDescription
keystringYesTranslation key name (1-255 characters)
namespacestringNoNamespace name (uses default if omitted)
namespaceIdintegerNoNamespace ID (alternative to namespace name)
descriptionstringNoDescription or context for translators (max 1000 characters)
isPluralbooleanNoWhether this key uses ICU plural forms
characterLimitintegerNoMaximum character count for translations
translationsobjectNoInitial values keyed by locale code

Each entry is keyed by locale code and contains:

FieldTypeRequiredDescription
valuestringYesTranslation text
statusstringYesStatus: translated, not_reviewed, not_translated
Terminal window
curl -X POST \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"key": "welcome.message",
"namespace": "default",
"description": "Main welcome message on the homepage",
"translations": {
"en": {
"value": "Welcome to our app!",
"status": "translated"
},
"uk": {
"value": "Ласкаво просимо!",
"status": "translated"
}
}
}' \
https://api.comvi.io/api/v1/projects/1/keys

Returns 201 Created with the full translation key object (same shape as Get translation key).

StatusErrorDescription
400VALIDATION_ERRORInvalid request body
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to create translations
403LIMIT_EXCEEDEDTranslation key limit reached for the current plan
409KEY_ALREADY_EXISTSA key with this name already exists in the namespace

Update a translation key’s metadata. To update translation values, use the upsert translation value endpoint.

PATCH /api/v1/projects/:projectId/keys/:keyId
ParameterTypeRequiredDescription
projectIdintegerYesProject ID
keyIdintegerYesTranslation key ID
FieldTypeRequiredDescription
keystringNoUpdated key name (1-255 characters)
namespaceIdintegerNoMove key to a different namespace
descriptionstring|nullNoUpdated description
isPluralbooleanNoWhether this key uses ICU plural forms
characterLimitinteger|nullNoUpdated character limit
Terminal window
curl -X PATCH \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"description": "Updated welcome message for the new homepage design",
"characterLimit": 100
}' \
https://api.comvi.io/api/v1/projects/1/keys/42

Returns the full updated translation key object.

StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to edit translations
404KEY_NOT_FOUNDTranslation key does not exist
409KEY_ALREADY_EXISTSA key with the new name already exists in the target namespace

Create or update a translation value for a specific key and locale. If a value already exists for the given locale, it is overwritten.

PUT /api/v1/projects/:projectId/keys/:key?namespace={namespace}
ParameterTypeRequiredDescription
projectIdintegerYesProject ID
keystringYesTranslation key name (URL-encoded if it contains special characters)
ParameterTypeRequiredDescription
namespacestringNoNamespace name (uses default if omitted)
FieldTypeRequiredDescription
localestringYesLocale code (e.g., en, uk)
valuestringYesTranslation text
statusstringNoStatus: translated, not_reviewed, not_translated
Terminal window
curl -X PUT \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"locale": "uk",
"value": "Ласкаво просимо до нашого додатку!",
"status": "translated"
}' \
"https://api.comvi.io/api/v1/projects/1/keys/welcome.message?namespace=default"
{
"id": 102,
"value": "Ласкаво просимо до нашого додатку!",
"status": "translated",
"createdAt": "2025-01-15T11:00:00.000Z",
"updatedAt": "2025-01-16T09:15:00.000Z",
"createdBy": 1
}
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to edit translations
404KEY_NOT_FOUNDTranslation key does not exist

Soft-delete a translation key and all its values.

DELETE /api/v1/projects/:projectId/keys/:keyId
ParameterTypeRequiredDescription
projectIdintegerYesProject ID
keyIdintegerYesTranslation key ID
Terminal window
curl -X DELETE \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/projects/1/keys/42

Returns 204 No Content with an empty body on success.

StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to delete translations
404KEY_NOT_FOUNDTranslation key does not exist

Change the review status of a specific translation value.

PUT /api/v1/projects/:projectId/translation/:translationId/status
ParameterTypeRequiredDescription
projectIdintegerYesProject ID
translationIdintegerYesTranslation value ID
FieldTypeRequiredDescription
statusstringYesNew status: translated, not_reviewed, not_translated
Terminal window
curl -X PUT \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"status": "translated"}' \
https://api.comvi.io/api/v1/projects/1/translation/102/status
{
"id": 102,
"value": "Ласкаво просимо!",
"status": "translated",
"createdAt": "2025-01-15T11:00:00.000Z",
"updatedAt": "2025-01-16T14:20:00.000Z",
"createdBy": 1,
"reviewedBy": 3,
"reviewedAt": "2025-01-16T14:20:00.000Z"
}

Perform operations on multiple translation keys at once. All batch endpoints are under the /keys/batch prefix.

Delete multiple translation keys in a single request.

POST /api/v1/projects/:projectId/keys/batch/delete
FieldTypeRequiredDescription
keyIdsinteger[]YesArray of key IDs to delete (at least 1)
Terminal window
curl -X POST \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"keyIds": [42, 43, 44]}' \
https://api.comvi.io/api/v1/projects/1/keys/batch/delete
{
"success": true,
"processed": 3,
"failed": 0,
"errors": []
}

Update the translation status for multiple keys at once for a specific locale.

POST /api/v1/projects/:projectId/keys/batch/status
FieldTypeRequiredDescription
keyIdsinteger[]YesArray of key IDs
localeCodestringYesLocale code to update
statusstringYesNew status: translated, not_reviewed, not_translated

Move multiple keys to a different namespace.

POST /api/v1/projects/:projectId/keys/batch/namespace
FieldTypeRequiredDescription
keyIdsinteger[]YesArray of key IDs
targetNamespaceIdintegerYesDestination namespace ID

Copy translation values from one locale to another for multiple keys.

POST /api/v1/projects/:projectId/keys/batch/copy
FieldTypeRequiredDescription
keyIdsinteger[]YesArray of key IDs
fromLocaleCodestringYesSource locale code
toLocaleCodestringYesTarget locale code
overwriteExistingbooleanNoOverwrite existing translations (default: false)

Clear (remove) translation values for multiple keys and locales.

POST /api/v1/projects/:projectId/keys/batch/clear
FieldTypeRequiredDescription
keyIdsinteger[]YesArray of key IDs
localeCodesstring[]YesLocale codes to clear