Confirmation lifecycle
- Send a normal Murph chat request.
- If the response includes
pendingConfirmation, show the proposed action and an approve/cancel control. - POST the user’s decision to the confirmation decision endpoint.
- If the user confirms, the response is a normal Murph chat response for the turn that executed the approved write.
- If the user cancels, the response only records the cancelled confirmation.
Chat response field
POST /api/v2/murph/chat and POST /api/v2/murph/chat/stream can return
pendingConfirmation on a turn where a protected write was proposed but did
not run.
| Field | Type | Notes |
|---|---|---|
confirmationUid | UUID | Pass this to the decision endpoint. |
toolName | string | Internal Murph tool that requested the write. |
toolKey | string | Stable key for the gated action. |
summary | string | Human-readable action summary for the confirmation UI. |
policy | "always" or "tainted" | Why the confirmation gate applied. |
resolvedParams | object | Parameters the user is approving. |
writeExecuted | false | The write did not run on this turn. |
plainAffirmativeAccepted | false | The user must use the confirmation control. |
expiresAt | datetime | Confirmation expiry time. |
Confirm or cancel
POST /api/v2/murph/confirmations/{confirmationUid}/decision
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
decision | "confirm" or "cancel" | Yes | Confirms or cancels the pending write. |
Confirm response
Whendecision is confirm, the endpoint returns the same shape as a Murph
chat response. The approved write may appear in toolsUsed, and fields such as
escalated or customerSwitch reflect the write that actually ran.
Cancel response
Whendecision is cancel, no write runs and the response only records the
cancelled confirmation.
Errors
400 VALIDATION_ERROR- the path or request body is malformed.404 NOT_FOUND- the confirmation is unknown, expired, cancelled, or already used.403 FORBIDDEN- the confirmation belongs to another actor or customer.503 SERVICE_UNAVAILABLE- Murph is not available to process a confirmed write.
Related
Ask Murph
Use Murph to operate and troubleshoot your storefront.
Authentication
Authenticate Murph API requests.