Skip to main content
Templates

Clone a template

Clone an existing Forward template.

POST /api/v1/forward/templates/{template_id}/clone Creates a new template by copying the source template's agent configuration and session defaults.

Headers

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

Path parameters

ParameterTypeRequiredDescription
template_idstringYesSource Forward Template ID.

Body parameters

ParameterTypeRequiredDescription
namestringNoNew template name. If omitted, uses <source-name> Copy <random-short-ID>.
descriptionstringNoNew template description. If omitted, the source description is used.

Example request

curl -s -X POST 'https://api.qoder.com/api/v1/forward/templates/tmpl_support/clone' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Support assistant copy",
  "description": "Cloned from Support assistant"
}'

Example response

HTTP 200 OK
{
  "type": "template",
  "id": "tmpl_019eYYYY",
  "name": "Support assistant copy",
  "description": "Cloned from Support assistant",
  "status": "active",
  "model": "ultimate",
  "system": "You are a helpful support assistant.",
  "tools": [],
  "managed_tool_config": {
    "enabled_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:31:00Z",
  "updated_at": "2026-06-18T10:31:00Z"
}

Response fields

Returns the newly created Template object, including the Forward managed-capability baseline copied from the source Template in managed_tool_config. See Get a template for field descriptions.

Errors

HTTPTypeCodeTrigger
400invalid_request_error-Invalid clone request.
404not_found_error-Source template does not exist.
409conflict_error-New template name already exists.
401authentication_errorauthentication_requiredThe PAT or SAT is invalid or expired.

Notes

  • Clone generates a new Template ID.
  • Cloning copies the Template's managed_tool_config.
  • Cloning does not copy Identity Config records.