Add a template version

⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/prompts/templates/{template}/versions

Save new text as the next version. Versions are immutable; labels do not move automatically, so production keeps its version until you move the label.

For how this fits into a full workflow, see Prompt templates.

Headers

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.
syntic-betaYes, while in previewprompt-tools-2026-12-01. Without it the call fails with 400 beta_required. See Versioning.
Content-TypeYesapplication/json
Idempotency-KeyNoUp to 255 characters. Retrying with the same key within 24 hours returns the first result instead of acting twice. See Idempotency.

Path parameters

ParameterTypeDescription
templatestringThe template name or id.

Body parameters

ParameterTypeRequiredNotes
messagesarrayYes
modelstringNo
notestringNoWhy it changed, up to 500 characters.

Response

201 Created, Content-Type: application/json

{
  "template": "support",
  "number": 13,
  "note": "Stop promising refunds on sale items",
  "variables": [
    "ticket"
  ],
  "created_at": "2026-11-05T10:00:00Z"
}

Examples

curl -sS "https://app.syntic.ai/v1/prompts/templates/template/versions" \
  -H "Authorization: Bearer $SYNTIC_API_KEY" \
  -H "syntic-beta: prompt-tools-2026-12-01" \
  -H "Idempotency-Key: 8d6f0c1e-4b2a-4a57-9f0e-2f1d3c4b5a69" \
  -H "Content-Type: application/json" \
  -d '{
      "messages": [
        {
          "role": "system",
          "content": "You answer billing questions for Acme. Under 120 words. Only state policies in <policies>."
        },
        {
          "role": "user",
          "content": "{{ticket}}"
        }
      ],
      "note": "Stop promising refunds on sale items"
    }'

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
404not_found_errorprompt_template_not_foundNo template with this name or id.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?