Skip to content

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

NameTypeRequiredDescription
idintegerYes

The numeric ID of the template to update.

Request body

Content type application/json (required).

FieldTypeRequiredDescription
namestringYes

Human-readable template name (must be unique within the tenant).

Max length: 255

categorystringNo

Optional category label.

prompt_bodystringYes

Prompt content with {{variable}} placeholders.

variablesarray of stringNo

Declared variable names used in the prompt_body.

is_activebooleanNo

Default: true

notesstringNo

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}'
Loading