---
title: "Duplicate Prompt Version"
method: POST
path: "/v1/prompts/{id}/versions/{version}/duplicate"
tags: ["Prompt Versions"]
---

# Duplicate Prompt Version

`POST /v1/prompts/{id}/versions/{version}/duplicate`

Copies the specified prompt version's template to create a new prompt version in draft state.
This operation does not copy any associated payloads, only the prompt template and model configuration.

## Path parameters

- `id` string, uuid, required
- `version` string, required

## Response `201`

Prompt version duplicated and new draft version created successfully

- object
  - `version` PromptVersion, required
    - `id` string, uuid, required — Unique version identifier.
    - `prompt_id` string, uuid, required — Reference to parent Prompt ID.
    - `version` integer, required — Incrementing sequence number of the version.
    - `template` string, required — The template syntax code with Go template parameters.
    - `status` 'draft' | 'stable' | 'live' | 'archived', required — Active lifecycle status of this template version.
    - `model` string, nullable, required — Optional `provider/model` identifier intended to execute this prompt version.
    - `model_params` object, nullable, required — Optional provider-specific model parameters. Nested values are supported.
    - `created_at` string, date-time, required
    - `published_at` string, date-time, nullable, required — Timestamp when status was set to live. Null if draft.
    - `tags` string[], required — List of tag strings attached to this version.

## Other responses

- `400` — Bad parameters
- `401` — Unauthorized
- `404` — Version or prompt not found

## Changes

- **2026-07-14** `bed7a47c6f25` — 2 info
  - added the required property `version/model` to the response with the `201` status
  - added the required property `version/model_params` to the response with the `201` status
- **2026-07-02** `e500bc0895c5` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was removed from the API
- **2026-06-29** `162c1e986d3a` — 2 info
  - api tag `Prompt Versions` added
  - api tag `Prompts` removed
- **2026-06-29** `27457b167aec` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/px0-ai/apis/px0-api/changes/v1/prompts/:id/versions/:version/duplicate/post.md)

---

[API](https://skmtc.dev/px0-ai/apis/px0-api.md) · [All operations](https://skmtc.dev/px0-ai/apis/px0-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/px0-ai/px0-api/revisions/3ed72443989d/schema)
