Skip to main content
GET
/
api
/
v1
/
prompts
/
{slug}
curl -X GET https://app.tracia.io/api/v1/prompts/welcome-email \
  -H "Authorization: Bearer tr_your_api_key"
{
  "id": "clx1abc123",
  "slug": "welcome-email",
  "name": "Welcome Email",
  "description": "A welcome email template",
  "model": "gpt-4",
  "modelConfigurationId": "clx0xyz789",
  "currentVersion": 3,
  "content": [
    {
      "id": "msg_1",
      "role": "system",
      "content": "You are a helpful assistant that writes professional emails."
    },
    {
      "id": "msg_2",
      "role": "user",
      "content": "Write a welcome email for {{name}} who just signed up for {{product}}."
    }
  ],
  "variables": ["name", "product"],
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-20T14:22:00.000Z"
}

Request

Authorization
string
required
Bearer token with your API key: Bearer tr_your_api_key
slug
string
required
The prompt slug

Response

id
string
Unique identifier for the prompt
slug
string
URL-friendly identifier
name
string
Display name of the prompt
description
string | null
Description of the prompt
model
string | null
Default model for this prompt
modelConfigurationId
string | null
ID of the model configuration
currentVersion
number
Current version number
content
array
Array of prompt messages
variables
string[]
List of template variables extracted from content
createdAt
string
ISO 8601 timestamp of creation
updatedAt
string
ISO 8601 timestamp of last update
curl -X GET https://app.tracia.io/api/v1/prompts/welcome-email \
  -H "Authorization: Bearer tr_your_api_key"
{
  "id": "clx1abc123",
  "slug": "welcome-email",
  "name": "Welcome Email",
  "description": "A welcome email template",
  "model": "gpt-4",
  "modelConfigurationId": "clx0xyz789",
  "currentVersion": 3,
  "content": [
    {
      "id": "msg_1",
      "role": "system",
      "content": "You are a helpful assistant that writes professional emails."
    },
    {
      "id": "msg_2",
      "role": "user",
      "content": "Write a welcome email for {{name}} who just signed up for {{product}}."
    }
  ],
  "variables": ["name", "product"],
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-20T14:22:00.000Z"
}