scribase
Agent governance

Require human approval before an agent touches production

An agent that runs at night or in CI has nobody to ask. Without an approval step, a destructive call against production from an admin token just runs; without the admin scope, it is refused and the work waits on a branch indefinitely. A production approver fixes both: one named person per project, an email, Approve or Deny, and the exact stored request runs — nothing more.

Last checked November 30, 2026.

Turn it on: one field, any of three places

It takes an owner or admin to set. In the console: Project > Settings > Policies > Production approver, type the email, save. Over the API, PUT the approver; GET reads it, DELETE removes it. Over MCP, prod_approver_set with an email (an admin token only — a token that could name its own approver would approve itself). The approver does not need a Scribase account; they get one short email the first time they are named.

bash
curl -X PUT https://api.scribase.com/v1/organizations/acme/projects/web/prod-approver \
  -H "Authorization: Bearer $SCRIBASE_TOKEN" -H "Content-Type: application/json" \
  -d '{"email":"lead@acme.com"}'

Sources: Scribase docs: Production approver

What the agent sees when it asks

A token with write access plus sql:write or migrations:write sends a destructive request against production — confirmed SQL (DROP, TRUNCATE, DELETE or UPDATE with no WHERE), a destructive migration, a point-in-time or backup restore. Without an approver the answer is still 403 insufficient_scope, same as before. With an approver, the answer is 202: nothing runs yet.

What each state means and what the agent does next
stateMeaningWhat the agent does
pendingWaiting for the approverKeep waiting with approvals_wait. Do not resend.
approvedApproved, the stored request is runningAsk again in a moment.
executedRan exactly as sent; result holds the real responseContinue.
deniedThe approver said no. Nothing ranStop. Work on a branch, or ask what to change.
expiredNo answer in 24 hours. Nothing ranSend the request again to ask again.
The 202 response — the real shape, from the docsjson
{
  "status": "approval_required",
  "approval_id": "apr_5f0c9d3a7b1e4c2a9d8e6f01",
  "state": "pending",
  "approver": "lead@acme.com",
  "expires_at": "2026-12-01T11:40:12Z",
  "operation": {
    "method": "POST",
    "path": "/v1/organizations/acme/projects/web/environments/production/database/execute",
    "summary": "Run SQL: drop table legacy_orders"
  },
  "status_url": "/v1/organizations/acme/projects/web/approvals/apr_5f0c9d3a7b1e4c2a9d8e6f01",
  "next": "Not run. Do not send the request again: on approve the stored request runs exactly as sent."
}

Sources: Scribase docs: Production approver

What clicking Approve actually runs

The approver gets an email from no-reply@scribase.com naming the project, the token, and exactly what would run — the SQL or the route — with Approve and Deny links. The link alone decides nothing (a mail scanner opening it cannot approve a change); the token in the link works once and dies at expiry. Approve runs the stored method, path, query and body only — nothing the approver typed, nothing the agent sends a second time — as the token that asked, with the admin role for that one request. Every step lands in the audit log: requested, approved, denied, expired, executed, each with who decided.

Sources: Scribase docs: Production approver, Scribase docs: Tokens and safety

FAQ

Questions people ask

Does the approver need a Scribase account?

No. The first time they are named as an approver they get a short email; from then on every approval request comes to that same address with Approve and Deny links. The links work without signing in to anything.

What exactly runs when the approver clicks Approve?

The stored request only: the exact method, path, query and body the agent originally sent, run as that agent token with the admin role for that one request. Nothing the approver typed, and nothing the agent sends a second time — a retried identical request while one is pending gets the same approval_id back with no second email.

Can a coding agent name its own approver to approve itself?

No. Setting or changing the production approver needs project:<id>:admin specifically, and that action is itself logged (prod_approver.set in the audit log) — a token scoped for everyday write access cannot grant itself an approver it controls.

What happens if the request sits unanswered?

It expires after 24 hours with nothing run, logged as approval.expired. The agent can send the same request again to ask once more; it never auto-runs just because time passed.