The import and export endpoints let you move translation data between Entri and your codebase or third-party tools. Import is useful for onboarding an existing project — you can send your current translation file contents and Entri will parse them, create the corresponding keys, and populate translations. Export lets you download the finished translations in the exact file format your application expects.
Entri supports the following file formats for both import and export:
| Format | Description |
|---|
json-flat | Flat key-value JSON ({"key": "value"}) |
json-nested | Nested JSON with dot-notation keys |
yaml | YAML key-value files |
android-xml | Android string resources (res/values/strings.xml) |
ios-strings | iOS .strings files |
ios-stringsdict | iOS .stringsdict plurals files |
xliff | XLIFF 1.2 bilingual XML |
xliff2 | XLIFF 2.0 |
arb | Application Resource Bundle (Flutter) |
po | GNU Gettext PO files |
pot | GNU Gettext POT template files |
mo | Compiled GNU Gettext MO binary files |
Endpoints
POST /api/projects/:projectId/import
GET /api/projects/:projectId/export/:language
GET /api/projects/:projectId/formats
Returns the list of format identifiers supported by the API:
curl https://api.nt3.io/api/projects/proj_6abc123def456/formats \
-H "X-API-Key: entri_your_token_here"
Response:
The endpoint returns a plain JSON array of format strings:
["json-flat", "json-nested", "yaml", "android-xml", "ios-strings", "ios-stringsdict", "xliff", "xliff2", "arb", "po", "pot", "mo"]
Import Translations
Send translation file content as a JSON body. The language field identifies which language the content is for. The format field tells Entri how to parse it. The content field should contain the raw file content as a string.
curl -X POST https://api.nt3.io/api/projects/proj_6abc123def456/import \
-H "X-API-Key: entri_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"language": "fr",
"format": "json-nested",
"content": "{\"nav\":{\"home\":\"Accueil\",\"about\":\"À propos\"}}",
"namespace": "common",
"overwrite": false
}'
Request body:
| Field | Type | Required | Description |
|---|
language | string | Yes | Language code for the translations (e.g. fr, de). |
format | string | Yes | File format identifier (see Supported Formats above). |
content | string | Yes | Raw file content as a UTF-8 string. |
namespace | string | No | Namespace prefix for grouping keys (JSON formats only). |
overwrite | boolean | No | If true, existing translations are replaced. Default: false. |
Setting overwrite: false means existing translations will not be replaced — only new keys will be created and missing translations will be added.
Response:
{
"imported": 142,
"skipped": 8,
"errors": [],
"language": "fr",
"format": "json-nested"
}
Export Translations
Downloads translations for a single language as a file in the requested format:
curl "https://api.nt3.io/api/projects/proj_6abc123def456/export/fr?format=json-nested" \
-H "X-API-Key: entri_your_token_here" \
-o fr.json
The response body is the raw file content with Content-Type: application/octet-stream and a Content-Disposition header specifying the filename.
Additional response headers:
| Header | Description |
|---|
X-Total-Keys | Total number of keys exported. |
X-Export-Truncated | Set to "true" if the export was truncated due to size limits. |
Export does not support filtering by translation status. All translations for the specified language are included in the export.
Key Notes
- Import jobs are processed synchronously. The response is returned once processing is complete.
- Namespace support is available for JSON formats: keys can be grouped under a namespace prefix (for example
common.nav.home).
- The Entri CLI wraps these endpoints with
entri push (import) and entri pull (export), handling file pattern matching automatically.
For day-to-day CI/CD sync workflows, the CLI is usually more convenient than the raw import/export API. Use the API directly when you need fine-grained control over the import behavior or when integrating with a custom toolchain.