API referencePrompt toolsTemplatesCreate a template

Create a prompt template

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

Save a prompt as a named template. The first save is version 1; saving under an existing name with Add a version creates the next version.

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.

Body parameters

ParameterTypeRequiredNotes
namestringYes1 to 64 lowercase letters, digits and -.
messagesarrayYesMessages with {{variable}} placeholders. A default value goes after a vertical bar inside the braces, as in the example.
modelstringNoDefault model for requests that use the template.
descriptionstringNo

Response

201 Created, Content-Type: application/json

{
  "id": "ptpl_01JDB1C3E5G7J9L1N3Q5",
  "type": "prompt_template",
  "name": "support",
  "latest_version": 1,
  "labels": {},
  "model": "Amara S1.2",
  "variables": [
    "ticket",
    "customer_tier"
  ],
  "created_at": "2026-09-01T10:00:00Z",
  "updated_at": "2026-11-05T10:00:00Z"
}
FieldTypeDescription
namestringUnique in the workspace. Requests refer to name@label or name-v<version>.
labelsobjectLabel name to version number. production and staging are conventions, not special.
variablesarrayVariables used by the latest version, found from its {{placeholders}}.

Examples

curl -sS "https://app.syntic.ai/v1/prompts/templates" \
  -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 '{
      "name": "support",
      "model": "Amara S1.2",
      "messages": [
        {
          "role": "system",
          "content": "You answer billing questions for Acme. Under 120 words."
        },
        {
          "role": "user",
          "content": "Customer tier: {{customer_tier|standard}}\n\n{{ticket}}"
        }
      ]
    }'

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.
409conflict_errorname_takenA template with this name exists; add a version instead.
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?