v18

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2112360218.7 KB
Prompts

Rollback a Prompt

Instantly demotes the active live version and promotes a target historical version in a single atomic transaction.

post/v1/prompts/{id}/rollback

Path parameters

idstring uuid required

Request body

target_versioninteger required

The historical version number to promote to live.

rollback_reasonstring required

The reason for rolling back.

Response

Prompt successfully rolled back

Example response

{
  "version": {
    "template": "Hello {{.name}}!",
    "model": "anthropic/claude-opus-4-6",
    "model_params": {
      "temperature": 0.7,
      "max_tokens": 1024,
      "thinking": {
        "type": "enabled",
        "budget_tokens": 512
      }
    }
  }
}