Skip to main content
POST
/
v1
/
prompts
/
{id}
/
versions
/
{version}
/
demote
Demote Prompt Version
curl --request POST \
  --url http://localhost:3000/v1/prompts/{id}/versions/{version}/demote \
  --header 'Authorization: Bearer <token>'
{
  "version": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version": 123,
    "template": "Hello {{.name}}!",
    "created_at": "2023-11-07T05:31:56Z",
    "published_at": "2023-11-07T05:31:56Z",
    "tags": [
      "<string>"
    ]
  }
}

Authorizations

Authorization
string
header
required

Use an access token retrieved from login (Bearer sess_...) or a programmatic API key (Bearer ak_...).

Path Parameters

id
string<uuid>
required

Unique prompt UUID.

version
string
required

Version sequence number (integer) or version tag (string) to demote.

Response

Version demoted successfully

version
object
required