Skip to content

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/delete

Authentication 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"
}
FieldTypeRequiredDescription
typestringYesTemplate type: project_strings / task_strings
idstringYesID 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=true templates per type is 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 deleted object from the response and call Create Export Template (note: the new template will get a new id).

Error Codes

codeDescription
400Body is not valid JSON / type missing or invalid / id missing
401Signature invalid / timestamp expired
403App Secret not configured
404No template found for the given id (a wrong type also yields 404)
500Write 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}"