Update a Forward template by ID.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
Yes |
|
|
|
No |
Optional idempotency key for unsafe requests. |
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Forward Template ID. |
Request body
|
Parameter |
Type |
Required |
Description |
|
|
string |
No |
New template name. |
|
|
string |
No |
New template description. |
|
|
string |
No |
New model identifier. |
|
|
string |
No |
New system prompt. |
|
|
array |
No |
Replaces the tool configuration list. |
|
|
array |
No |
Replaces the MCP server list. |
|
|
array |
No |
Replaces the Skill binding list. |
|
|
object |
No |
Replaces the Managed Agents configuration. |
|
|
string | null |
No |
Replaces the default Environment ID. |
|
|
array | null |
No |
Replaces default Vault IDs. |
|
|
object | null |
No |
Replaces default file resources. |
|
|
object | string | null |
No |
Replaces default session environment variables. |
|
|
object |
No |
Merges updates into custom metadata. |
Nested configuration objects
tools, mcp_servers, and skills are all array fields; when supplied in an update, each array replaces the previous one in full.
Files
files is a map keyed by File ID. Do not include file_id, id, or resource_id inside an entry. Forward injects mount_path automatically when a session is created.
|
Field |
Type |
Required |
Description |
|
|
boolean |
No |
Omitted is treated as |
tools[] items
Each tools[] entry chooses its shape via the type field.
|
Field |
Type |
Applies to |
Description |
|
|
string |
All |
Required. One of |
|
|
array |
|
Convenience allowlist; a non-empty array enables only the listed built-in tools. |
|
|
array |
|
Convenience denylist; compiled into disabled tool configs. |
|
|
array |
|
Per-tool enablement and permission policy. |
|
|
string |
|
Required. Must match a |
|
|
string |
|
Required. Custom tool name; must not collide with a built-in tool. |
|
|
string |
|
Required. Description of the custom tool. |
|
|
object |
|
Required JSON Schema. |
Built-in tool names include Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, and DeliverArtifacts.
Tool config
Each entry in tools[].configs[] uses the following shape.
|
Field |
Type |
Required |
Description |
|
|
string |
Yes |
Tool name; use the built-in tool name for built-ins and the MCP tool name for MCP toolsets. |
|
|
boolean |
No |
|
|
|
object |
No |
Runtime permission behavior. |
Permission policy
|
Field |
Type |
Required |
Description |
|
|
string |
Yes |
One of |
MCP servers
|
Field |
Type |
Required |
Description |
|
|
string |
No |
Only |
|
|
string |
Yes |
MCP server name that is unique within the Template and referenced by |
|
|
string |
Yes |
Streamable HTTP MCP endpoint URL. |
skills[] items
|
Field |
Type |
Required |
Description |
|
|
string |
Yes |
Either |
|
|
string |
Yes |
Skill ID. |
|
|
string |
No |
Skill version. Omit to use the latest version. |
|
|
boolean |
No |
Omitted is treated as |
Example request
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/templates/tmpl_support' \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "Support assistant v2",
"environment_id": "env_support_v2",
"vault_ids": ["vault_crm", "vault_billing"],
"environment_variables": {
"BASE_MODE": "support_v2"
}
}'
Example response
HTTP 200 OK
{
"type": "template",
"id": "tmpl_support",
"name": "Support assistant v2",
"description": "Handles pre-sales and after-sales support",
"status": "active",
"model": "ultimate",
"system": "You are a helpful support assistant.",
"tools": [],
"mcp_servers": [],
"skills": [],
"multiagent": null,
"environment_id": "env_support_v2",
"vault_ids": ["vault_crm", "vault_billing"],
"files": {},
"environment_variables": {
"BASE_MODE": "support_v2"
},
"metadata": {},
"created_at": "2026-06-18T10:00:00Z",
"updated_at": "2026-06-18T10:30:00Z"
}
Response fields
Returns the updated Template object.
Errors
|
HTTP |
Type |
Trigger |
|
400 |
|
Invalid request body or unsupported field value. |
|
401 |
|
PAT invalid or expired. |
|
404 |
|
Template or referenced resource does not exist. |
|
409 |
|
Template name already exists. |
Notes
-
Archived templates cannot be updated.
-
Updating session defaults does not mutate existing sessions.