This page documents the canonical HTTP contract for this endpoint.
Partial update — only include fields to change. Omitted fields are retained; nullable description, instructions, response_schema, and user_schema can be cleared with null. This updates template metadata and does not execute it. Unknown JSON fields are ignored; an empty or ignored-only body returns 400.
Authorization: you can update templates you created (scope user) or any team template in your organization (scope team).
Path parameters
template_idrequiredstring
The prompt template ID.
| Name | Type | Description |
|---|---|---|
| template_idrequired | string | The prompt template ID. |
Body parameters
name· optionalstring
Updated template name.
description· optionalstring
Updated description.
content· optionalstring
Updated prompt content.
instructions· optionalstring
Updated instructions.
response_schema· optionalobject
Updated validated Schema V2 root field map (not standard JSON Schema).
user_schema· optionalobject
Updated UI-facing Schema V2 root field map; validated and canonicalized.
use_auto_schema· optionalboolean
Updated automatic-schema setting.
structured_output· optionalboolean
Updated structured-output setting.
type· optionalstring
<code>simple</code> or <code>raw</code>.
mode· optionalstring
<code>basic</code>, <code>agent</code>, or <code>any</code>.
scope· optionalstring
<code>user</code> or <code>team</code>.
| Name | Type | Description |
|---|---|---|
| name | string | Updated template name. |
| description | string | Updated description. |
| content | string | Updated prompt content. |
| instructions | string | Updated instructions. |
| response_schema | object | Updated validated Schema V2 root field map (not standard JSON Schema). |
| user_schema | object | Updated UI-facing Schema V2 root field map; validated and canonicalized. |
| use_auto_schema | boolean | Updated automatic-schema setting. |
| structured_output | boolean | Updated structured-output setting. |
| type | string | <code>simple</code> or <code>raw</code>. |
| mode | string | <code>basic</code>, <code>agent</code>, or <code>any</code>. |
| scope | string | <code>user</code> or <code>team</code>. |
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid ObjectId, no updates, blank name/content, missing organization context for team scope, or invalid response_schema/user_schema. |
| 422 | Request validation failed for an unsupported literal value or body shape. |
| 401 | Invalid API key or missing auth. |
| 403 | Missing prompts:write scope or caller is not the owner of a user template / a member of its team organization. |
| 404 | Prompt template not found. |
