Delete Export Template
Delete an export template by (type, id). The response includes the full deleted object for local audit or to re-create on undo.
Endpoint
POST {BASE_URL}/api/open/v1/export-templates/deleteAuthentication 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"
}| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Template type: project_strings / task_strings |
id | string | Yes | ID of the template to delete |
Response
json
{
"success": true,
"code": 0,
"msg": "ok",
"trace_id": "...",
"data": {
"type": "project_strings",
"deleted": {
"id": "tpl-9d3f1a2c",
"name": "Default INI export",
"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
}
}
}deleted is the pre-deletion template object (same shape as Get Export Template).
Behavior
- Deletion does not auto-promote another template to default — having zero
is_default=truetemplates pertypeis allowed. - Two concurrent "delete same id" requests are safe: the second one gets a 404 (the first already removed it).
- Deletion is irreversible — to undo, take the
deletedobject from the response and call Create Export Template (note: the new template will get a newid).
Error Codes
| code | Description |
|---|---|
| 400 | Body is not valid JSON / type missing or invalid / id missing |
| 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"}'
TIMESTAMP=$(date +%s)
SIGN=$(printf '%s' "${TIMESTAMP}${BODY}${APP_SECRET}" | md5)
curl -s -X POST "${BASE_URL}/api/open/v1/export-templates/delete" \
-H "Content-Type: application/json" \
-H "X-Loxily-AppKey: ${APP_KEY}" \
-H "X-Loxily-Timestamp: ${TIMESTAMP}" \
-H "X-Loxily-Sign: ${SIGN}" \
--data "${BODY}"