---
title: "Get Prompt Template Version"
method: POST
path: "/prompt/template/version"
tags: ["Prompt Management"]
---

# Get Prompt Template Version

`POST /prompt/template/version`

## Endpoint to Get a Specific Version of a Prompt Template
This endpoint gets a specific version of a prompt template by name and version.

***
## Request Body

| Field               | Type   | Description                      |
|---------------------|--------|----------------------------------|
| name                | str    | The name of the prompt template. |
| vnum                | int    | The version of the prompt template. |

***

## Example Request Body
    
        ```json
    
        {
            "name": "CHATBOT_PROMPT",
            "vnum": 1
        }

        ```
***
## Response Body

| Field               | Type   | Description                      |
|---------------------|--------|----------------------------------|
| id                  | str    | The ID of the prompt template. |
| name                | str    | The name of the prompt template. |
| prompt_template     | str    | The prompt template.             |
| version             | int    | The version of the prompt template. |

***
#### Errors

- **404 Not Found**: If the prompt template version is not found.
- **500 Internal Server Error**: If there is an unexpected error during the retrieval of the prompt template version.

## Request body

- GetPromptTemplateRequestByVersion
  - `name` string, required
  - `vnum` integer, required

## Response `200`

Successful Response

- TemplateResponse
  - `id` string, required
  - `name` string, required
  - `prompt_template` string, required
  - `version` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/aws-samples/apis/generative-ai-foundational-platform-api.md) · [All operations](https://skmtc.net/aws-samples/apis/generative-ai-foundational-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws-samples/generative-ai-foundational-platform-api/revisions/8831d08902e9/schema)
