API referenceObjectsprompt_template

The prompt template object

⚠️
Preview — this feature is being built; the design below is the spec.

The prompt_template object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.

Example

{
  "id": "ptpl_01JDB1C3E5G7J9L1N3Q5",
  "type": "prompt_template",
  "name": "support",
  "latest_version": 13,
  "labels": {
    "production": 12,
    "staging": 13
  },
  "model": "Amara S1.2",
  "variables": [
    "ticket",
    "customer_tier"
  ],
  "created_at": "2026-09-01T10:00:00Z",
  "updated_at": "2026-11-05T10:00:00Z",
  "version": {
    "number": 12,
    "messages": [
      {
        "role": "system",
        "content": "You answer billing questions for Acme."
      },
      {
        "role": "user",
        "content": "{{ticket}}"
      }
    ],
    "created_at": "2026-10-20T10:00:00Z",
    "created_by": "user_01J9Y0A2C4E6G8J0L2N4"
  }
}

Fields

FieldTypeDescription
idstringUnique id of this object.
typestringThe object type, always prompt_template.
namestringUnique in the workspace. Requests refer to name@label or name-v<version>.
latest_versionintegerSee the endpoint pages below.
labelsobjectLabel name to version number. production and staging are conventions, not special.
modelstringModel id.
variablesarrayVariables used by the latest version, found from its {{placeholders}}.
created_atstringWhen it was created, RFC 3339 UTC (some older objects use Unix seconds).
updated_atstringWhen it last changed.
versionobjectVersion number.

Returned by

Was this page helpful?