---
title: "Roll back to an earlier spec version"
method: POST
path: "/v1/automations/{automationId}/versions/{version}/rollback"
tags: ["Automations"]
---

# Roll back to an earlier spec version

`POST /v1/automations/{automationId}/versions/{version}/rollback`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/automations/{automationId}/versions/{version}/rollback`
- Auth: HTTP bearer

Publishes the chosen version's spec as a new version and makes it current.
Human-only. A rollback that widens what the automation can do relative to the
live spec goes through the `automation.widen` control-plane consensus gate,
like an edit would.

## Path parameters

- `automationId` string, uuid, required
- `version` integer, required

## Request body

- RollbackAutomationRequest
  - `note` string
  - `approval_id` string, uuid: Control-plane approval when rolling back to a wider spec.

## Response `200`

The automation with the rolled-back spec current

- AutomationResponse
  - `id` string, uuid, required
  - `agent_id` string, uuid, required
  - `name` string, required
  - `trigger_type` 'cron' | 'event' | 'webhook' | 'manual', required
  - `cron_expr` string, nullable
  - `timezone` string, required
  - `event_filter` object, nullable
  - `workflow_spec` union, required
    - object[]
    - object
  - `is_active` boolean, required
  - `last_run_at` string, date-time, nullable
  - `next_run_at` string, date-time, nullable
  - `last_run_status` string, nullable: Status of the most recent run (enriched list field)
  - `total_runs` integer, nullable: Total runs in the last 30 days (enriched list field)
  - `success_rate` number, nullable: Success rate percentage (enriched list field)
  - `agent_name` string, nullable: Resolved agent display name (enriched list field)
  - `created_by_type` 'user' | 'agent': Whether the automation was created by a human or agent (chat-native create)
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `spec_version` integer: Current `automation_versions` version.
  - `webhook_signature_scheme` string, nullable: Inbound signature scheme name, never the secret.

## Other responses

- `401`: Authentication required or invalid
- `403`: Insufficient permissions
- `404`: Resource not found

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/5fa0918f3b41?raw)
