> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.lumenia.net/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.lumenia.net/_mcp/server.

# Get template version

GET https://app.lumenia.net/api/v1/prompt-template-versions/{versionId}

Return a prompt template version by ID.

Reference: https://docs.lumenia.net/api-reference/prompt-template-versions/get-template-version

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <API_KEY>`, where `API_KEY` is your API key.

## Request

### Path parameters

- `versionId` (string, required) — Version to retrieve.

## Response

### 200

The requested template version.

- `version` (V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersion, required) — The version.

## Errors

### 403 Forbidden Error

The API key is missing or invalid.

- `message` (string, optional)

### 404 Not Found Error

Version not found for this partner

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersion

The version.

- `id` (string, optional) — The sole identifier for the version.
- `templateId` (string, optional) — The owning template id.
- `version` (integer, optional) — The version number.
- `status` (enum, optional) — Lifecycle state: draft (editable), published (assignable), or archived (no new assignments).
  - Allowed values: `draft`, `published`, `archived`
- `publishedAt` (string, optional, nullable) — When the version was published, null while a draft.
- `archivedAt` (string, optional, nullable) — When the version was archived, null before that.
- `createdAt` (string, optional) — ISO 8601 timestamp of when the version was created.
- `prompt` (string, optional) — The system prompt, with its \{\{placeholder}} variables unrendered.
- `firstMessage` (string, optional, nullable) — The call greeting (voice templates only, null otherwise).
- `variables` (list of V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionVariablesItems, optional) — The variable definitions of this version.
- `tools` (list of V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionToolsItems, optional) — The partner tools this version references.

### V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionVariablesItems

- `key` (string, optional) — The placeholder name as it appears in the prompt.
- `description` (string, optional, nullable) — What the variable holds.
- `type` (string, optional) — The value type: string, number, or boolean.
- `required` (boolean, optional) — Whether a value must be supplied at assignment time.
- `defaultValue` (V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionVariablesItemsDefaultValue, optional, nullable) — The value used when none is supplied.
- `validation` (V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionVariablesItemsValidation, optional, nullable) — Validation rules for supplied values (enum, pattern, min, max), or null.

### V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionToolsItems

- `id` (string, optional) — The tool id.
- `name` (string, optional) — The tool name.

### V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionVariablesItemsDefaultValue

The value used when none is supplied.

### V1PromptTemplateVersionsVersionIdGetResponsesContentApplicationJsonSchemaVersionVariablesItemsValidation

Validation rules for supplied values (enum, pattern, min, max), or null.

## Examples

**Response**

```json
{
  "version": {
    "id": "d4e5f6a7-8091-4c3d-ae4f-5a6b7c8d9e0f",
    "templateId": "a1b2c3d4-5e6f-4a0b-8c1d-2e3f4a5b6c7d",
    "version": 2,
    "status": "published",
    "publishedAt": "2026-07-05T09:00:00.000Z",
    "archivedAt": null,
    "createdAt": "2026-07-04T09:00:00.000Z",
    "prompt": "You are the receptionist of {{company}}. Keep answers short and {{tone}}.",
    "firstMessage": "Thank you for calling {{company}}!",
    "variables": [
      {
        "key": "company",
        "description": "The clinic name",
        "type": "string",
        "required": true,
        "defaultValue": null,
        "validation": null
      },
      {
        "key": "tone",
        "description": null,
        "type": "string",
        "required": false,
        "defaultValue": "friendly",
        "validation": {
          "enum": [
            "friendly",
            "formal"
          ]
        }
      }
    ],
    "tools": [
      {
        "id": "b2c3d4e5-6f70-4a1b-8c2d-3e4f5a6b7c8d",
        "name": "get_order_status"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.lumenia.net/api/v1/prompt-template-versions/versionId"

headers = {"Authorization": "Bearer <API_KEY>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.lumenia.net/api/v1/prompt-template-versions/versionId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <API_KEY>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/prompt-template-versions/versionId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <API_KEY>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/prompt-template-versions/versionId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <API_KEY>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.lumenia.net/api/v1/prompt-template-versions/versionId")
  .header("Authorization", "Bearer <API_KEY>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.lumenia.net/api/v1/prompt-template-versions/versionId', [
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/prompt-template-versions/versionId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API_KEY>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <API_KEY>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/prompt-template-versions/versionId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```