---
title: "Create Version"
method: POST
path: "/v1/prompts/{alias}/versions"
tags: ["Prompt"]
---

# Create Version

`POST /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/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new version of the specified or latest commit on your Confident AI project.

## Request body

- CreatePromptVersionRequest
  - `hash` string: The hash of the commit you wanna release a new version of. Only commits above the last versioned commit can be released as new versions. If ommited, the most recent commit will be versioned.

## Response `200`

- CreatePromptVersionResponse
  - `success` boolean, required: This is true prompt version was successfully created
  - `data` object, required
    - `version` string, required: The version id generated by Confident AI of the new version you just released, it is always incremental.
    - `hash` string, required: The hash code of the commit that was just versioned. This is the same hash you pass in request or the hash of the most recent commit on the Confident AI platform.
  - `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)
