Skip to main content

Update prompt template

Partially update a prompt template. Only include the fields you want to change.

PATCH/api/enrichments/prompt-templates/{template_id}
HTTP referenceScope prompts:writeUpdated September 27, 2026

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_idrequired

    string

    The prompt template ID.

Body parameters

  • name · optional

    string

    Updated template name.

  • description · optional

    string

    Updated description.

  • content · optional

    string

    Updated prompt content.

  • instructions · optional

    string

    Updated instructions.

  • response_schema · optional

    object

    Updated validated Schema V2 root field map (not standard JSON Schema).

  • user_schema · optional

    object

    Updated UI-facing Schema V2 root field map; validated and canonicalized.

  • use_auto_schema · optional

    boolean

    Updated automatic-schema setting.

  • structured_output · optional

    boolean

    Updated structured-output setting.

  • type · optional

    string

    <code>simple</code> or <code>raw</code>.

  • mode · optional

    string

    <code>basic</code>, <code>agent</code>, or <code>any</code>.

  • scope · optional

    string

    <code>user</code> or <code>team</code>.

Errors

StatusMeaning
400Invalid ObjectId, no updates, blank name/content, missing organization context for team scope, or invalid response_schema/user_schema.
422Request validation failed for an unsupported literal value or body shape.
401Invalid API key or missing auth.
403Missing prompts:write scope or caller is not the owner of a user template / a member of its team organization.
404Prompt template not found.

Docs