---
title: "Get prompt versions"
method: GET
path: "/v1/private/prompts/{id}/versions"
tags: ["Prompts"]
---

# Get prompt versions

`GET /v1/private/prompts/{id}/versions`

Get prompt versions

## Path parameters

- `id` string, uuid, required

## Query parameters

- `page` integer
- `size` integer
- `search` string
- `sorting` string
- `filters` string

## Response `200`

OK

- PromptVersionPagePublic
  - `page` integer
  - `size` integer
  - `total` integer
  - `content` PromptVersionPublic[]
    - `id` string, uuid — version unique identifier, generated if absent
    - `prompt_id` string, uuid
    - `commit` string — version short unique identifier, generated if absent. it must be 8 characters long
    - `version_number` string — sequential version number in the format v<N>; null for masks
    - `template` string, required
    - `metadata` JsonNodePublic
    - `type` 'mustache' | 'jinja2' | 'python'
    - `version_type` 'prompt_version' | 'mask' — version type discriminator; defaults to prompt_version
    - `environment` string — Deprecated: use 'environments' instead
    - `environments` string[]
    - `change_description` string
    - `tags` string[]
    - `template_structure` 'text' | 'chat'
    - `created_at` string, date-time
    - `created_by` string
  - `sortableBy` string[]

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/revisions/bcd13aadaaf8/schema)
