Decide a tool approval proposal
POST
/api/v3/organizations/{organisation}/ai/tool-proposals/{proposalId}/decision
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/example/ai/tool-proposals/example/decision';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"decision":"approve","reason":"example","scope":"once"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dashboard.quantcdn.io/api/v3/organizations/example/ai/tool-proposals/example/decision \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "decision": "approve", "reason": "example", "scope": "once" }'Approves or rejects a tool approval proposal. QuantGov AI-governance organisations only; any other organisation gets 404. Only the QuantCode PKCE token with the ai:approve scope may call this. Any other token gets 403 with This token cannot decide tool approvals. The upstream status and body are returned unchanged.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organisation
required
string
The organisation ID
proposalId
required
string
The proposal ID
Header Parameters
Section titled “Header Parameters”X-Quant-Approval-Nonce
string
One-time approval nonce from the approval prompt. It is forwarded to the platform and never logged.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
decision
required
string
reason
string
scope
string
Responses
Section titled “Responses”The decision result
This token cannot decide tool approvals.
Media typeapplication/json
object
error
string
Example
{ "error": "This token cannot decide tool approvals."}Proposal not found, or the organisation is not a QuantGov AI-governance organisation
The proposal is no longer pending
