---
title: "List Versions"
method: GET
path: "/v1/prompts/{alias}/versions"
tags: ["Prompt"]
---

# List Versions

`GET /v1/prompts/{alias}/versions`

## Request

- Base URL: `https://api.confident-ai.com`
- URL: `https://api.confident-ai.com/v1/prompts/{alias}/versions`
- Auth: none declared
- TypeScript: <https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/docs/v1/prompts/:alias/versions/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a list of all versions associated with a given prompt `alias`.

## Response `200`

- PromptVersionsResponse
  - `success` boolean, required: This is true if the prompt versions were successfully retrieved.
  - `data` object, required
    - `textVersions` PromptVersion[]: This is the list of versions associated with the text prompt, which is null if the prompt is a messages prompt.
      - `id` string, required: This is the id of the prompt version generated by Confident AI, not to be confused with the version.
      - `version` string, required: This is the version number of a prompt version.
    - `messagesVersions` PromptVersion[]: This is the list of versions associated with the messages prompt, which is null if the prompt is a text prompt.
      - `id` string, required: This is the id of the prompt version generated by Confident AI, not to be confused with the version.
      - `version` string, required: This is the version number of a prompt version.
  - `deprecated` boolean, required: This is true if this endpoint is deprecated.

---

[API](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api.md) - [All operations](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/revisions/95cdde71b65e?raw)
