Skip to content

Decide Agent Approval

POST
/agent/approvals/{approval_id}/decide

Approve, reject, or edit-and-approve a pending approval.

Use {decision, edit_payload} for the existing decision mode, or exclusively {use_human_authorization: true} to relay a short-lived decision previously reviewed in the browser by the same personal-key owner. The relay accepts no caller-authored decision or edit fields. There is no client version to pass: double-decide is settled server-side by WHERE decided_at IS NULL, so exactly one caller wins and the loser gets 409 rather than overwriting the first decision.

DecideRequest does not forbid unknown keys, so a misspelled edit_payload is dropped in silence and an edit_and_approve decides as a plain approve. This docstring is the operation description in the published contract, so getting it wrong here ships the wrong shape to every integrator generating a client from the spec, which is exactly how the earlier expected_version / edited_payload error nearly shipped.

Authorizations

Parameters

Path Parameters

approval_id
required

Approval ID

string format: uuid

Approval ID

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

One of:

Decide directly, or relay a stored human authorization exclusively.

There is no client-supplied version to pass. Double-decide is settled server-side by WHERE decided_at IS NULL, so exactly one caller wins and the loser gets 409 rather than overwriting the first decision.

object
decision
required
Allowed values: approve reject edit_and_approve
use_human_authorization

Responses

200

Successful Response

object
data
required

One approval: the loop asking permission before a consequential step.

object
action_class
required
string
decided_at
Any of:
string
decided_by
Any of:
string
decision
Any of:
string
decision_payload
Any of:
object
key
additional properties
any
detail
Any of:
object
key
additional properties
any
expires_at
Any of:
string
id
required
string
is_expired
boolean
plan_digest
Any of:
string
requested_at
Any of:
string
risk_level
required
string
snapshot_digest
Any of:
string
step_id
required
string
summary
required
string
work_item_id
required
string
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string