Export INI
Synchronously generate an INI file from an export template (template_id), upload it to object storage, and return a 1-hour signed download URL.
Currently only
type="project_strings"is supported.task_stringsis not yet exposed via the Open Platform because its export filter is more involved (per source/target language pair) — it'll come in a later version.
Endpoint
POST {BASE_URL}/api/open/v1/export/iniAuthentication Headers
Same as Create Translation Task. The raw POST body participates in the signature: MD5(timestamp + raw_body + appSecret).
Request Body (JSON)
json
{
"type": "project_strings",
"template_id": "tpl-9d3f1a2c",
"target_languages": ["en", "ja"],
"download_mode": "single",
"escape_mode": "no-escape",
"filename": "v1.0_en_ja"
}Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Currently only project_strings (project-level / full text strings) is supported |
template_id | string | Yes | Template ID. The template must have format=ini (set when creating it) |
target_languages | string[] | No | Override the template's languages. If omitted, the template's own languages are used. If both are empty → 422 |
download_mode | string | No | Override the template's mode: single (one INI with all languages) / separate (one INI per language, zipped). Default = template's value, falling back to single |
escape_mode | string | No | Override the project's export_settings.ini_escape_mode: escape (escapes \n / \r / \t / \\) / no-escape (raw). Default = project setting, falling back to no-escape |
filename | string | No | Output filename prefix (.ini or .ini.zip is auto-appended). Defaults to {projectId}_{timestamp} |
Response
json
{
"success": true,
"code": 0,
"msg": "ok",
"trace_id": "...",
"data": {
"download_url": "https://storage.googleapis.com/loxily-export/...&Signature=...",
"expires_at": "2026-05-12T13:00:00.000Z",
"file_size": 12345,
"format": "ini",
"download_mode": "single",
"target_languages": ["en", "ja"],
"escape_mode": "no-escape"
}
}| Field | Type | Description |
|---|---|---|
download_url | string | GCS v4 signed URL; valid for 1 hour |
expires_at | string | Signature expiry (ISO 8601) |
file_size | int | File size in bytes |
format | string | Always ini |
download_mode | string | Effective mode (single / separate) |
target_languages | string[] | Languages actually exported |
escape_mode | string | Effective escape mode |
Behavior
- Scope: hard-coded
all(every string under the project). The Open Platform does not support the page-side "filtered view" export. - Empty values: a language with empty / null value for a row is omitted from that row's INI lines; rows with empty
string_idare skipped entirely. - Volume: a typical project (1k–10k strings, multi-language
separate) finishes in tens of milliseconds to a few seconds. The endpoint times out after 5 minutes. For very large exports, split by language subsets across multiple calls. - Download URL: download promptly (expires in 1 hour). Need to download again? Call the endpoint again; each call returns a fresh signed URL.
Error Codes
| code | Description |
|---|---|
| 400 | Body is not valid JSON / template_id missing / wrong type or value for download_mode / escape_mode / target_languages / filename |
| 401 | Signature invalid / timestamp expired |
| 403 | App Secret not configured |
| 404 | No template found for template_id |
| 422 | type is not project_strings / template's format is not ini / languages end up empty after overriding |
| 500 | Export failed / GCS upload failed |
Example
bash
APP_KEY="5685414646a54423c891d87194d87f3f"
APP_SECRET="<your App Secret>"
BASE_URL="https://api.loxily.com"
BODY='{"type":"project_strings","template_id":"tpl-9d3f1a2c","target_languages":["en","ja"],"download_mode":"single"}'
TIMESTAMP=$(date +%s)
SIGN=$(printf '%s' "${TIMESTAMP}${BODY}${APP_SECRET}" | md5)
# 1) Call the endpoint to get the signed URL
RESP=$(curl -s -X POST "${BASE_URL}/api/open/v1/export/ini" \
-H "Content-Type: application/json" \
-H "X-Loxily-AppKey: ${APP_KEY}" \
-H "X-Loxily-Timestamp: ${TIMESTAMP}" \
-H "X-Loxily-Sign: ${SIGN}" \
--data "${BODY}")
echo "$RESP"
# 2) Extract the URL with jq and download
URL=$(echo "$RESP" | jq -r '.data.download_url')
curl -L -o export.ini "$URL"