Update Export Template
Partially update an existing export template by (type, id). Only fields that appear in the request body are updated; everything else is left unchanged.
Endpoint
POST {BASE_URL}/api/open/v1/export-templates/updateAuthentication 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",
"id": "tpl-9d3f1a2c",
"name": "Default INI export (renamed)",
"is_default": true
}Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Template type, used to locate the template (not editable). See List Export Templates |
id | string | Yes | Template ID, used to locate the template (not editable) |
name | string | No | New name (non-empty) |
format | string | No | New format: csv / json / xlsx / ini / xliff / xml |
is_default | bool | No | When true, the server atomically flips every other template's is_default to false within the same type (concurrency-safe, single update) |
mode | string | No | New mode: single / separate |
fields | string[] | No | Replacement field list (full replace, not append) |
languages | string[] | No | Replacement language list (full replace) |
field_order | array | No | Replacement order (full replace); each element is { "type": "field" | "language", "value": "<name or language code>" } |
Array fields are full replace, not append — if you only want to add one language, fetch the current
languagesfirst, append, then submit the whole array.
created_at/updated_atare server-managed;updated_atis refreshed on every successful update.
Response
json
{
"success": true,
"code": 0,
"msg": "ok",
"trace_id": "...",
"data": {
"type": "project_strings",
"template": {
"id": "tpl-9d3f1a2c",
"name": "Default INI export (renamed)",
"is_default": true,
"format": "ini",
"mode": "single",
"languages": ["en", "ja", "ko"],
"field_order": [
{ "type": "language", "value": "en" },
{ "type": "language", "value": "ja" },
{ "type": "language", "value": "ko" }
],
"created_at": 1715520000000,
"updated_at": 1715606400000
}
}
}The returned template is the full post-update object (same shape as Get Export Template).
Error Codes
| code | Description |
|---|---|
| 400 | Body is not a JSON object / type missing or invalid / id missing / no updatable fields / field type wrong |
| 401 | Signature invalid / timestamp expired |
| 403 | App Secret not configured |
| 404 | No template found for the given id (a wrong type also yields 404) |
| 500 | Write failed or internal error |
Example
bash
APP_KEY="5685414646a54423c891d87194d87f3f"
APP_SECRET="<your App Secret>"
BASE_URL="https://api.loxily.com"
BODY='{"type":"project_strings","id":"tpl-9d3f1a2c","name":"Default INI export (renamed)","is_default":true}'
TIMESTAMP=$(date +%s)
SIGN=$(printf '%s' "${TIMESTAMP}${BODY}${APP_SECRET}" | md5)
curl -s -X POST "${BASE_URL}/api/open/v1/export-templates/update" \
-H "Content-Type: application/json" \
-H "X-Loxily-AppKey: ${APP_KEY}" \
-H "X-Loxily-Timestamp: ${TIMESTAMP}" \
-H "X-Loxily-Sign: ${SIGN}" \
--data "${BODY}"