---
title: "Undo, events, and webhooks"
description: "Revert changesets atomically, read record field history, restore deleted tables from the 30-day trash, and poll the events feed or catch inbound webhooks."
canonical: "https://grid82.com/docs/developers/rest/undo-and-events"
updated: "2026-11-20"
---

# Undo, events, and webhooks

Every mutation in Grid82 writes a changeset recording who performed the change, through which surface (`grid`, `api`, `cli`, `mcp`, `assistant`, or `workflow`), and the exact before/after field state.

## Reverting changesets (`changesets.undo`)

- **In Runtime.** List your own visible changesets via `GET /v1/changesets` (`changesets.mine`) and revert a changeset via `POST /v1/changesets/{changesetId}/revert` (`changesets.undo`).
- **In Studio.** Builders can list and revert any changeset in an app via `/v1/apps/{appId}/changesets` and `/v1/apps/{appId}/changesets/{changesetId}/revert`.

Important guarantees:

1. **Batch atomicity:** Creating 500 records or running one `sql.execute` writes a single changeset and reverts as one transaction.
2. **Whole record recovery:** Reverting a deletion restores the original `rec_...` ID, autonumber, existing links, and comment threads.
3. **Concurrent edit protection:** If another write touched the same field after the target changeset, the first revert call returns `409 conflict` naming the field unless you pass `confirm: true`.
4. **Undo creates a changeset:** Undoing an undo works identically.

## Trash recovery (tables, fields, and apps)

Deleted tables, fields, and apps are retained in trash for **30 days**. Builders can inspect and restore them intact (preserving original IDs, values, and permission references) via:

```http
GET  https://studio.grid82.app/v1/apps/{appId}/trash
POST https://studio.grid82.app/v1/apps/{appId}/trash/{trashId}/restore
```

Use `apps.restore` to recover an entire deleted app within 30 days.

## Polling the events feed (`events.list`)

To synchronize an external integration with record changes inside an app, poll the permission-filtered events feed oldest first:

```http
GET https://your-suite.grid82.app/your-app/v1/events?since=chg_01J...&limit=200
```

Follow `meta.nextCursor` as `cursor` while `meta.hasMore` is `true`, persisting the latest processed changeset ID for the next poll. Hidden records produce no events, hidden fields are scrubbed, and deleted records report only the deletion event without prior field values.

## Inbound vs outbound webhooks

- **Inbound workflow webhooks.** Supported in Studio workflows via `webhook({ input })` at `https://{suite}.grid82.app/hooks/{app}/{workflow}` using Standard Webhooks signatures or a bearer webhook secret (up to 64 KB JSON body, idempotent on `webhook-id`).
- **Outbound HTTP / alerts.** Grid82 does not yet emit subscription webhooks on arbitrary table events. To push changes outward when a record is created or updated, create a workflow with `record.created` / `record.updated` and call `http.post(label, "secret:WEBHOOK_URL", payload)`.
