---
title: "Documentation — PageWeave"
---

> For the full documentation index, see [PageWeave Documentation](https://pageweave.dev/docs) or fetch [llms.txt](https://pageweave.dev/llms.txt).

# Approvals & Workflows

Some MCP writes stop and wait for a human. The tool returns a link to an approval page instead of doing the work, and nothing changes until you approve it.

## What is gated

A tool asks for confirmation when its effect is destructive, irreversible, or visible to visitors right away:

- **Content removal** — `discard_page`, `discard_snippet`, `discard_component`.
- **Live data** — `update_table_row` on a published or scheduled row, `delete_table_row`, `import_table_rows`, `update_table`.
- **Routing and infrastructure** — webhooks, hostnames, environments, DNS zones and records, domain settings.
- **Money and identity** — `purchase_domain`, `cancel_domain`, `delete_domain`, `create_release`, website invitations, email addresses, form and feedback subscriptions.
- **Serving settings** — `update_website`, `update_page_settings` (a title, a path, `indexable` or `language` change).

Draft edits, page bodies, snippets, components, themes, and assets apply directly, and creating a website is not gated: an empty site changes nothing for visitors.

## The review sheet

Every approval is built from one server-side descriptor, so the page, the inbox notification, the executions index, and the receipt never disagree:

- **Action** — what will run, with action-specific buttons ("Discard page" / "Keep page", never a bare "OK").
- **Reason** — why a human is needed, naming the trigger ("this sends mail to an address outside your account"), not just the operation.
- **Effects** — the blast radius: visitors, hosts, emails, bytes, money. Risk and reversibility are stamped; restorable actions state the window.
- **Target and changes** — the exact record (page path, row id, domain) and the values that will be written. Long values render as a diff with the full value behind a disclosure.
- **Expiry** — a pending approval expires after six hours.

Approving replays the original call with the arguments you reviewed. Rejecting closes it and applies nothing. Approving is always a human action in the dashboard: a tool cannot approve its own request.

## Stale approvals

An approval is a snapshot, not a lock. The values you reviewed are hashed when the approval is created and checked again before the replay. If the underlying record changed in between — a page edited, a row updated, a domain re-priced — the replay fails closed with a "data changed after review" message and applies nothing. Request the change again to get a fresh approval; never retry a stale one.

A pending approval is also reused only for the identical request. A different edit to the same row gets its own approval, so an approval can never describe a change you did not see.

## The MCP write lock

The [write lock](/docs/mcp-lock) stops new agent-initiated writes. It never blocks an approval you already requested: a confirmation created before the lock executes normally when you approve it.

## Workflows and the API

Approvals are MCP-only. A REST call with an `api`-surface key executes directly — it is trusted automation, not an agent — and is governed by the key's scope and the caller's permissions. Domain purchases keep their payment approval: the purchase returns a workflow, and payment is completed on the approval page in Stripe's checkout.

Executions stay readable afterwards: `GET /workflows` and `GET /workflows/{id}` return your own runs (`pending`, `executing`, `expired`, `completed`, `cancelled`, `failed`). Internal step names and step history are never returned.

## Related

- Publishing and scheduling table rows: [Data Tables](/docs/tables)
- Deleting and restoring content: [Deleting & Restoring Content](/docs/discarded-content)
- Locking a website against agent writes: [MCP Write Lock](/docs/mcp-lock)


