approveCopilotProposal
Requires permission catalog:copilot:chat.
Approves a change the copilot proposed in the caller's own chat, as the signed-in person. Approving does not write anything: applyProposal does that. An approval is refused when the proposal has been superseded, still has blockers, or is in a state that cannot be approved. A change that touches a role also needs the approver to hold every permission involved and to type the role's name as the confirmation. Limited to 30 requests a minute. Needs the catalog copilot feature on the plan and permission to chat with the copilot.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation ApproveCopilotProposal($proposalId: ID!, $sessionId: ID!) {
approveCopilotProposal(proposalId: $proposalId, sessionId: $sessionId) {
id
status
createdAt
batchId
creditEstimateCents
error
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ApproveCopilotProposal($proposalId: ID!, $sessionId: ID!) {\n approveCopilotProposal(proposalId: $proposalId, sessionId: $sessionId) {\n id\n status\n createdAt\n batchId\n creditEstimateCents\n error\n }\n}",
"variables": {
"proposalId": "id",
"sessionId": "id"
}
}
EOF
Variables:
{
"proposalId": "id",
"sessionId": "id"
}
Response:
{
"data": {
"approveCopilotProposal": {
"id": "id",
"status": "APPLIED",
"createdAt": 0,
"batchId": "string",
"creditEstimateCents": 0,
"error": "string"
}
}
}
approveCopilotProposal(
confirmation: String
proposalId: ID!
sessionId: ID!
): ProposalCardType!
Arguments
approveCopilotProposal.confirmation ● String scalar
The role's name, typed out. Needed only for a proposal that changes a role.
approveCopilotProposal.proposalId ● ID! non-null scalar
The ID of the proposal.
approveCopilotProposal.sessionId ● ID! non-null scalar
The ID of the copilot chat the proposal is in.
Type
ProposalCardType object
A change the copilot proposes, shown as a card for the user to approve.