---
title: "Undo a change"
description: "Undo a bundle by replaying its operations backwards through the standard write permission compiler; undoing a delete recreates the row only if you have permission to create it."
canonical: "https://grid82.com/docs/app-api/changesets/undo"
updated: "2026-11-13"
---

# Undo a change

`POST https://your-suite.grid82.app/your-app/v1/changesets/{changesetId}/revert`

Undo a bundle by replaying its operations backwards through the standard write permission compiler; undoing a delete recreates the row only if you have permission to create it.

> **Note: Generic contract**
>
> Your own version of this operation, with your tables and the fields you can read, is in
> your app's document: `https://{suite}.grid82.app/{app}/v1/openapi.json`, behind your credential.
> [Why each person gets their own](/docs/start/studio-and-runtime#why-an-app-has-an-api-of-its-own).

Restore only fields changed by an update, preserving colleagues' edits to other fields. If anyone changed a field being restored, refuse and identify who; send `confirm: true` to overwrite their changes. Only bundles of record creates, edits, and deletes are undoable; the changesets list marks each as `revertible`. Refuse other bundles (comments, saved views, pages, or app-shape changes) up front with the reason, without partially applying them. Undo all restorable rows in ONE transaction; list rows deleted since in `skipped` without failing the rest.

Requires the `records:write` scope. Operation `changesets.undo`. MCP tool `changesets_undo`. CLI: `grid82 changesets undo` (`npx grid82`).

## Path parameters

| Name          | Type   | Required | Description |
| ------------- | ------ | -------- | ----------- |
| `changesetId` | string | yes      |             |

## Headers

| Name              | Type   | Required | Description                                                                                                                                                                                                                                                        |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Idempotency-Key` | string | no       | Any unique string. Sending the same key with the same request again returns the first response (marked `Idempotency-Replayed: true`) instead of running it twice. Reusing it for a different request is refused with 409. Kept for 24 hours. Up to 255 characters. |

## Request body

| Field     | Type    | Required | Description |
| --------- | ------- | -------- | ----------- |
| `confirm` | boolean | no       |             |

**Authorizations**

- `Authorization` (bearer, in header, required)

## Response

**200**: Success

- `data` (`object`, required)
- `data.id` (`string`, required)
- `data.revertId` (`string`)
- `data.status` (`string`, required)
- `data.skipped` (`object[]`)
- `data.skipped.tableId` (`string`, required)
- `data.skipped.recordId` (`string`, required)
- `data.skipped.reason` (`string`, required)

```json
{
  "data": {
    "id": "<string>",
    "revertId": "<string>",
    "status": "<string>",
    "skipped": [
      {
        "tableId": "<string>",
        "recordId": "<string>",
        "reason": "<string>"
      }
    ]
  }
}
```

**4XX**: Refused

- `error` (`object`, required)
- `error.code` (`enum<string>`, required, one of: `not_found, forbidden, unauthenticated, validation_failed, conflict, rate_limited, payment_required, not_implemented, internal`)
- `error.message` (`string`, required)
- `error.details` (`Record<string, unknown>`)

```json
{
  "error": {
    "code": "not_found",
    "message": "<string>",
    "details": {}
  }
}
```

**Example request**

```bash
curl --request POST \
  --url 'https://your-suite.grid82.app/your-app/v1/changesets/<changesetId>/revert' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "confirm": true
}'
```
