---
title: "Restore an item's body to an earlier version"
method: POST
path: "/api/v1/items/{id}/versions/{versionId}/restore"
tags: ["Items"]
---

# Restore an item's body to an earlier version

`POST /api/v1/items/{id}/versions/{versionId}/restore`

## Request

- Base URL: `https://api.roma.app`
- URL: `https://api.roma.app/api/v1/items/{id}/versions/{versionId}/restore`
- Auth: HTTP bearer

Restore one item's or expert's body to an earlier version from list_versions (its cells too, where the snapshot kept them). The current body is snapshotted first, so a restore is itself undoable. When the person, or a collaborator, edited the body in Roma after that version, the call answers `needsConfirmation` and names those later edits instead of restoring; the same call with acceptLaterEdits: true, after the person agreed to lose them, restores. Writes made over this connection never ask: undoing them is what the tool is for.

## Path parameters

- `id` string, required
- `versionId` string, required

## Request body

- object
  - `acceptLaterEdits` boolean, nullable: true only after the person said yes to losing the edits made in Roma after that version, the ones the needsConfirmation answer named. Omit on the first call.

## Response `200`

The tool's result.

- object
  - `restored` boolean
  - `id` string
  - `title` string, nullable
  - `needsConfirmation` boolean
  - `laterEdits` object[]
    - `id` string, required
    - `createdAt` string, required
    - `actor` string, required: Who made the write this entry precedes: user, ai or system.
    - `actorName` string, nullable: The name the write was signed with, when it was.
    - `cause` string, required: Why: userEdit (in the app), mcpEdit (over this connection), operatorEdit, restore, and Roma's own passes.
    - `sizeChars` number
    - `preview` string, nullable
  - `hint` string

## Other responses

- `400`: The request was understood and refused; the error says what to change.
- `401`: No usable bearer token.
- `404`: No such item for this account.
- `405`: The path exists but not with this method; Allow lists the ones that work.
- `429`: Over the rate limit; wait for Retry-After.

---

[API](https://skmtc.dev/roma/apis/roma-api.md) - [All operations](https://skmtc.dev/roma/apis/roma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/roma/apis/roma-api/revisions/3dd91459b0fb?raw)
