GET
/
v1
/
templates
/
{id}
curl --request GET \
  --url https://api.lunary.ai/v1/templates/{id}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Customer Support Chat",
  "slug": "customer-support-chat",
  "mode": "openai",
  "createdAt": "2023-01-01T00:00:00Z",
  "projectId": "987e6543-e21b-12d3-a456-426614174000",
  "versions": [
    {
      "id": "abcd1234-e56f-78g9-h012-ijklmnopqrst",
      "templateId": "123e4567-e89b-12d3-a456-426614174000",
      "content": [
        {
          "role": "system",
          "content": "You are a helpful customer support agent."
        },
        {
          "role": "user",
          "content": "Hello, I have a question about my order."
        },
        {
          "role": "assistant",
          "content": "Of course! I'd be happy to help you with your order. Could you please provide me with your order number?"
        }
      ],
      "extra": {
        "temperature": 0.7,
        "maxTokens": 150
      },
      "testValues": {
        "orderNumber": "ORD-12345"
      },
      "isDraft": false,
      "notes": "Updated to improve response clarity",
      "createdAt": "2023-01-02T12:00:00Z",
      "version": 1
    }
  ]
}

Path Parameters

id
string
required

Response

200
application/json
Successful response
id
string
name
string
slug
string
mode
enum<string>
Available options:
text,
openai
createdAt
string
group
string
projectId
string
versions
object[]