Update prompt template
PUT/ai/copilot/templates/{id}
Updates the body, category, active status, or variables of an existing prompt template. Use to refine prompts based on quality evaluation results.
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The numeric ID of the template to update. |
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable template name (must be unique within the tenant). Max length: 255 |
category | string | No | Optional category label. |
prompt_body | string | Yes | Prompt content with {{variable}} placeholders. |
variables | array of string | No | Declared variable names used in the prompt_body. |
is_active | boolean | No | Default: |
notes | string | No |
Example
{
"name": "Ticket Summary (v2)",
"prompt_body": "Summarise the last {{n}} support tickets for {{customer_name}}, identify the most common issue, and suggest a resolution path.",
"is_active": true
}
Responses
200 Prompt template updated
404 Template not found
Example request
curl -X PUT "https://{tenant}.faciotech.net/api/v1/ai/copilot/templates/{id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name": "Ticket Summary (v2)", "prompt_body": "Summarise the last {{n}} support tickets for {{customer_name}}, identify the most common issue, and suggest a resolution path.", "is_active": true}'