Browse API

Guarded API actions

Wait for human confirmation and observe an exact server-owned action.

Some sensitive API-originated actions cannot complete on the authority of a bearer token alone. Their first request returns 428 JSON with error, guarded_action_id, kind, context_url, expires_at, and live_sessions. The action is held for a human to inspect and approve or deny in an authenticated browser session; an agent or API client must not approve its own action. The browser session is not API authorization. Read API credentials for token acquisition and task turns for the human–agent boundary.

The server stores the exact proposed action and starts its execution after human approval. Poll GET /api/v0/guarded-actions/<id> with the same account's bearer token to observe id, kind, status, terminal, outcome, and expires_at. A completed outcome contains http_status and body of the action. An invalid id returns 400, missing id 404, and a different account 403; unauthorized access returns 401. Do not blindly resend a destructive request after a timeout or a 428: observe the action and inspect the resource first. A confirmation can expire, be denied, fail, or be rejected when pinned state changes. Where preflight, branch heads, blockers or permissions have changed, obtain fresh state and start a new action rather than reusing a stale plan.

The context_url is a browser destination for the human; never treat it as an API endpoint or a way to auto-confirm. The server-owned executor uses a separate, short-lived execution authority; clients must not synthesize x-repopack-guarded-action or x-repopack-guarded-execution headers. See project deletion for one documented action using this protocol.