Get a prompt template
⚠️
Preview — this feature is being built; the design below is the spec.
GET https://app.syntic.ai/v1/prompts/templates/{template}Return a template with its labels. Add ?version= or ?label= to include that version’s messages.
For how this fits into a full workflow, see Prompt templates.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
syntic-beta | Yes, while in preview | prompt-tools-2026-12-01. Without it the call fails with 400 beta_required. See Versioning. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
template | string | The template name or id. |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
version | integer | ||
label | string |
Response
200 OK, Content-Type: application/json
{
"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"
}
}| Field | Type | Description |
|---|---|---|
name | string | Unique in the workspace. Requests refer to name@label or name-v<version>. |
labels | object | Label name to version number. production and staging are conventions, not special. |
variables | array | Variables used by the latest version, found from its {{placeholders}}. |
Examples
curl -sS "https://app.syntic.ai/v1/prompts/templates/template?label=production" \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "syntic-beta: prompt-tools-2026-12-01"Errors
Errors use the error envelope and carry a request_id. Codes specific to this operation:
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request_error | beta_required | The syntic-beta header is missing. |
| 404 | not_found_error | prompt_template_not_found | No template with this name or id. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Was this page helpful?