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

# Demote Prompt Version

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

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/v1/prompts/{id}/versions/{version}/demote`
- Auth: HTTP bearer

Demotes a live prompt version to stable (making it inactive but remaining read-only).

## Path parameters

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

## Response `200`

Version demoted 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 not found
- `422`: Demotion error

## Changes

- **2026-07-14** `bed7a47c6f25`: 2 info
  - added the required property `version/model` to the response with the `200` status
  - added the required property `version/model_params` to the response with the `200` 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

[Operation history](https://skmtc.dev/px0-ai/apis/px0-api/changes/v1/prompts/:id/versions/:version/demote/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.dev/px0-ai/apis/px0-api/revisions/3ed72443989d?raw)
