Coming Soon
The Translations API is under active development. These endpoints are not yet available for production use.
Translations API
The Translations API manages multi-language content and locale configuration. All endpoints require JWT authentication.
List Translations
GET /api/translations
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | string | "1" | Page number |
limit | string | "50" | Items per page |
contentType | string | — | Filter by content type |
contentId | string | — | Filter by content item ID |
localeCode | string | — | Filter by locale code (e.g., es, fr) |
Response
{
"data": [
{
"id": "tr_abc123",
"tenantId": "t_789",
"localeId": "loc_1",
"contentType": "flow",
"contentId": "flow_abc",
"fieldName": "title",
"value": "Bienvenido",
"version": 1,
"locale": { "code": "es", "name": "Spanish" },
"createdAt": "2025-01-10T09:00:00Z",
"updatedAt": "2025-01-10T09:00:00Z"
}
],
"meta": { "total": 24, "page": 1, "limit": 50, "totalPages": 1 }
}
Create Translation
POST /api/translations
Request Body
{
"contentType": "flow",
"contentId": "flow_abc",
"fieldName": "title",
"localeCode": "es",
"value": "Bienvenido",
"version": 1
}
| Field | Type | Required | Description |
|---|---|---|---|
contentType | string | Yes | Type of content being translated |
contentId | string | Yes | ID of the content item |
fieldName | string | Yes | Field being translated (e.g., title, body) |
localeCode | string | Yes | Target locale code |
value | string | Yes | Translated text |
version | number | No | Version number for conflict detection |
Bulk Create Translations
POST /api/translations/bulk
Creates multiple translations in a single request.
Request Body
{
"translations": [
{
"contentType": "flow",
"contentId": "flow_abc",
"fieldName": "title",
"localeCode": "es",
"value": "Bienvenido"
},
{
"contentType": "flow",
"contentId": "flow_abc",
"fieldName": "body",
"localeCode": "es",
"value": "Haga clic para comenzar"
}
]
}
Response
{
"data": { "created": 2 }
}
Get Translation
GET /api/translations/:id
Update Translation
PUT /api/translations/:id
Translation Coverage
GET /api/translations/status
Returns translation coverage statistics per locale.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
contentType | string | No | Filter coverage by content type |
Response
{
"data": [
{
"localeCode": "es",
"localeName": "Spanish",
"isDefault": false,
"translated": 45,
"total": 60,
"percentage": 75
}
]
}
Locales
List Locales
GET /api/translations/locales
Response
{
"data": [
{
"id": "loc_1",
"code": "en",
"name": "English",
"isDefault": true,
"isRtl": false,
"tenantId": "t_789",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
},
{
"id": "loc_2",
"code": "ar",
"name": "Arabic",
"isDefault": false,
"isRtl": true,
"tenantId": "t_789",
"createdAt": "2025-01-05T00:00:00Z",
"updatedAt": "2025-01-05T00:00:00Z"
}
]
}
Create Locale
POST /api/translations/locales
Request Body
{
"code": "fr",
"name": "French",
"isDefault": false,
"isRtl": false
}
| Field | Type | Required | Description |
|---|---|---|---|
code | string (2-10) | Yes | ISO locale code |
name | string | Yes | Display name |
isDefault | boolean | Yes | Whether this is the default locale |
isRtl | boolean | Yes | Whether the locale uses right-to-left text |
Get Locale
GET /api/translations/locales/:id
Update Locale
PUT /api/translations/locales/:id