Approve or reject a proposed decision (a lead or admin who is not the proposer)
const url = 'http://127.0.0.1:8080/v1/decisions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/review';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"verdict":"approved","comment":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/v1/decisions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/review \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "verdict": "approved", "comment": "example" }'The proposer is the user who owns the proposing session. No session
token may review, so an agent never approves a proposal (T2). One
decision takes one review, which is audited and never changed. An
approval of a decision that supersedes an accepted or proposed one
marks the older one superseded. A rejected one stays rejected. The proposing session and the proposer get a
decision_decided notice. A decision that is no longer proposed
gets 409.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”The decided decision.
object
object
Why the server raised the risk. Absent when it kept the stated one.
object
object
Search only: the cosine or trigram similarity to q.
Example
{ "risk": "low", "risk_stated": "low", "status": "proposed", "review": { "verdict": "approved" }}The request is malformed.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}No valid bearer token.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The token may not do this.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}No such resource in the caller’s org.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The request clashes with current state.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The request is well formed but breaks a rule or a limit.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}A rate limit or quota stopped the request. Retry-After gives seconds to wait.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}