---
title: "CreatePromptVersion"
method: POST
path: "/v2/prompts/{prompt_id}/versions"
tags: ["beta.prompts"]
---

# CreatePromptVersion

`POST /v2/prompts/{prompt_id}/versions`

## Request

- Base URL: `https://api.mistral.ai`
- URL: `https://api.mistral.ai/v2/prompts/{prompt_id}/versions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/mistral/apis/mistral-ai-api/docs/v2/prompts/:prompt_id/versions/post.ts> (a function with typed inputs; its response is checked against the schema)

CreatePromptVersion

## Path parameters

- `prompt_id` string, required

## Request body

- object
  - `definition` PromptDefinition, required: Versioned prompt content.
    - `content` string, required: Prompt template content.
    - `variables` PromptVariable[]: Variables used by the prompt.
      - `name` string: Stable object name.
  - `notes` string, nullable: Notes for this version.
  - `aliases` string[]: Aliases pointing to this version.

## Response `200`

Success

- CreatePromptVersionResponse
  - `version` integer
  - `deduplicated` boolean

## Changes

- **2026-07-13** `5a5c361558bb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mistral/apis/mistral-ai-api/changes/v2/prompts/:prompt_id/versions/post.md)

---

[API](https://skmtc.dev/mistral/apis/mistral-ai-api.md) - [All operations](https://skmtc.dev/mistral/apis/mistral-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mistral/apis/mistral-ai-api/revisions/08a585fb75bc?raw)
