Skip to main content

Create prompt template

Save a new prompt template to the library. Can be scoped to the user (private) or team (shared).

POST/api/enrichments/prompt-templates
HTTP referenceScope prompts:writeUpdated September 27, 2026

This page documents the canonical HTTP contract for this endpoint.

Create a reusable prompt template for LLM enrichment columns. Templates store prompt metadata only; they do not run or bill a provider request. Unknown JSON fields are ignored. name and content require at least one character by model length validation; create trims the stored name but does not reject whitespace-only names.

type: simple uses the instructions field; raw uses the full advanced prompt in content.

mode: basic for Quick LLM columns, agent for Deep Research, or any for both.

scope: user (only you can see it) or team (visible to all org members). Creating a template stores metadata only; it does not execute the prompt or start provider work.

Body parameters

  • namerequired

    string

    Required string with minimum length 1 before trimming; create trims the stored name but does not reject whitespace-only input.

  • contentrequired

    string

    Required string with minimum length 1. For <code>simple</code> type this is the user-facing instructions; for <code>raw</code> type this is the full advanced prompt.

  • description · optional

    string

    Optional description for the template.

  • instructions · optional

    string

    Optional instructions field (used by simple type prompts).

  • response_schema · optional

    object

    Validated Schema V2 root field map (not a standard JSON Schema document); nested object and array field values are supported.

  • user_schema · optional

    object

    Optional UI-facing Schema V2 root field map; validated and canonicalized like response_schema.

  • use_auto_schema · optional

    boolean

    Optional stored automatic-schema setting.

  • structured_output · optional

    boolean

    Optional stored structured-output setting.

  • typerequired

    string

    <code>simple</code> (instructions mode) or <code>raw</code> (full advanced prompt).

  • mode · optional

    string

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

  • scope · optional

    string

    <code>user</code> (private) or <code>team</code> (shared). Defaults to <code>user</code>.

Errors

StatusMeaning
400Missing organization context for team scope or invalid response_schema/user_schema.
422Request validation failed (for example, a required body field is missing or a literal value is unsupported).
401Invalid API key or missing auth.
403Missing prompts:write scope or access denied.

Docs