Skip to main content
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.

Supported Formats

Entri supports the following file formats for both import and export:
FormatDescription
json-flatFlat key-value JSON ({"key": "value"})
json-nestedNested JSON with dot-notation keys
yamlYAML key-value files
android-xmlAndroid string resources (res/values/strings.xml)
ios-stringsiOS .strings files
ios-stringsdictiOS .stringsdict plurals files
xliffXLIFF 1.2 bilingual XML
xliff2XLIFF 2.0
arbApplication Resource Bundle (Flutter)
poGNU Gettext PO files
potGNU Gettext POT template files
moCompiled GNU Gettext MO binary files

Endpoints

POST   /api/projects/:projectId/import
GET    /api/projects/:projectId/export/:language
GET    /api/projects/:projectId/formats

List Supported 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:
FieldTypeRequiredDescription
languagestringYesLanguage code for the translations (e.g. fr, de).
formatstringYesFile format identifier (see Supported Formats above).
contentstringYesRaw file content as a UTF-8 string.
namespacestringNoNamespace prefix for grouping keys (JSON formats only).
overwritebooleanNoIf 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:
HeaderDescription
X-Total-KeysTotal number of keys exported.
X-Export-TruncatedSet 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.