---
title: "Rollback Route"
method: POST
path: "/api/v1/voice-agents/{voice_agent_id}/rollback"
tags: ["flywheel"]
---

# Rollback Route

`POST /api/v1/voice-agents/{voice_agent_id}/rollback`

Restore a voice agent to any prior version.

Creates a new ``VoiceAgentVersion(source=ROLLBACK)`` whose
``metadata_json`` matches the target version and re-materializes
runtime tool tables. The response is the new version row.

Restore reverts prompt, settings, and integration tools/scenarios.
KB attachments are re-derived from current live state (not
snapshot-restored) because KBs are shared live resources.

## Path parameters

- `voice_agent_id` string, uuid, required

## Request body

- RollbackRequest — Request body for the rollback endpoint.
  - `target_version_id` string, uuid, required

## Response `200`

Successful Response

- VoiceAgentVersionRead
  - `id` string, uuid, required
  - `voice_agent_id` string, uuid, required
  - `version_number` integer, required
  - `metadata_json` object, required
  - `source` 'seed' | 'manual' | 'ai_suggestion' | 'promotion' | 'rollback' | 'rebase_from_prod', required — What produced a VoiceAgentVersion snapshot. - SEED: system-created bootstrap row (migration backfill, brand-new agent, brand-new agent). No prior human edit exists. - MANUAL: human-driven edit of an existing agent (admin UI, FDE tools). The remaining values are reserved for future Flywheel PRs so later writers don't require an enum migration: - AI_SUGGESTION: V0.6 aggregator-produced candidate version. - PROMOTION: V0.8 promotes a candidate version. - ROLLBACK: V0.8 reverts prod to a prior version. - REBASE_FROM_PROD: V1 drift-auto-rebase onto the current prod version.
  - `source_ref` string, uuid, nullable
  - `base_version_id` string, uuid, nullable
  - `flywheel_run_id` string, uuid, nullable
  - `created_by` string, uuid, nullable
  - `tenant_id` string, uuid, required
  - `created_at` string, date-time, required

## Other responses

- `400` — Rollback request blocked: target version not found for this agent, target is already the active version, agent is staging, or agent has no active version
- `422` — Validation Error

## Changes

- **2026-09-03** `d65b8fefae34` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/getanana/apis/cleon-api/changes/api/v1/voice-agents/:voice_agent_id/rollback/post.md)

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getanana/cleon-api/revisions/38166468bfc5/schema)
