Skip to main content
Templates

Archive a template

Archive a Forward template.

POST /api/v1/forward/templates/{template_id}/archive Archives a template without deleting historical records.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>
Idempotency-KeyNoOptional idempotency key for unsafe requests.

Path parameters

ParameterTypeRequiredDescription
template_idstringYesForward Template ID.

Example request

curl -s -X POST 'https://api.qoder.com/api/v1/forward/templates/tmpl_support/archive' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

HTTP 200 OK
{
  "type": "template",
  "id": "tmpl_support",
  "name": "Support assistant",
  "description": "Handles customer support requests",
  "status": "archived",
  "model": "ultimate",
  "system": "You are a helpful support assistant.",
  "tools": [],
  "mcp_servers": [],
  "skills": [],
  "environment_id": "env_support",
  "vaults": {
    "vault_019f18f2761b": {
      "enabled": true
    }
  },
  "files": {},
  "environment_variables": {
    "BASE_MODE": "support"
  },
  "metadata": {},
  "created_at": "2026-06-18T10:00:00Z",
  "updated_at": "2026-06-18T10:30:00Z"
}

Response fields

Returns the archived Template object with status set to archived.

Errors

HTTPTypeTrigger
401authentication_errorPAT or SAT invalid or expired.
404not_found_errorTemplate does not exist or is not visible to the caller.
409conflict_errorTemplate state does not allow archive.
401authentication_errorauthentication_required

Notes

  • Archive is a soft lifecycle state.
  • Archived templates are excluded from list results unless requested by status.