---
title: "Undo / redo / revert the canvas to a target version"
method: POST
path: "/dashboards/{dashboard_id}/canvas/restore"
tags: ["Dashboard v3"]
---

# Undo / redo / revert the canvas to a target version

`POST /dashboards/{dashboard_id}/canvas/restore`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/{dashboard_id}/canvas/restore`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Repoint the draft canvas to an earlier (or later) version WITHOUT rewinding the chat — reverted turns stay visible and redoable (round-26). Returns a job_id; poll /jobs/{id} for {sequence, canvas, history_index, bake_ok}. `base_sequence` guards the head the client saw (a concurrent edit rejects the restore as a conflict so the client refetches). The FE's undo/redo/revert all call this with the target version + the new timeline pointer they computed.

## Path parameters

- `dashboard_id` integer, required

## Request body

- RestoreCanvasSpec: Undo/redo/revert the canvas to a target version
  - `params` RestoreCanvasParams, required
    - `target_sequence` integer, required: The canvas version to restore the canvas to
    - `base_sequence` integer, nullable: The head sequence the FE based this restore on (409 if moved)
    - `history_index` integer, nullable: The new timeline pointer to persist (FE-computed)
    - `activity` object, nullable: Optional {label, icon} audit row for the restore (changed:false)

## Response `201`

Document created, URL follows

- ObjectJobSchema
  - `status_code` integer, nullable
  - `job_id` integer, nullable: Created job id
  - `failure_reason` string, nullable: Failure reason if status is failure

## Other responses

- `202`: Successfully Submitted
- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/17af8131167d?raw)
