approveCopilotAskFromLink
Requires permission catalog:copilot:chat.
Approve one card of the open approval request from a push deep-link, on the caller's own session. Refused for a closed or stale request, a changed card, or a critical card (approve those in the chat).
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 ApproveCopilotAskFromLink($askId: String!, $proposalId: ID!, $sessionId: ID!) {
approveCopilotAskFromLink(
askId: $askId
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 ApproveCopilotAskFromLink($askId: String!, $proposalId: ID!, $sessionId: ID!) {\n approveCopilotAskFromLink(\n askId: $askId\n proposalId: $proposalId\n sessionId: $sessionId\n ) {\n id\n status\n createdAt\n batchId\n creditEstimateCents\n error\n }\n}",
"variables": {
"askId": "string",
"proposalId": "id",
"sessionId": "id"
}
}
EOF
Variables:
{
"askId": "string",
"proposalId": "id",
"sessionId": "id"
}
Response:
{
"data": {
"approveCopilotAskFromLink": {
"id": "id",
"status": "APPLIED",
"createdAt": 0,
"batchId": "string",
"creditEstimateCents": 0,
"error": "string"
}
}
}
approveCopilotAskFromLink(
askId: String!
proposalId: ID!
sessionId: ID!
): ProposalCardType!
Arguments
approveCopilotAskFromLink.askId ● String! non-null scalar
The ID of the approval request.
approveCopilotAskFromLink.proposalId ● ID! non-null scalar
The ID of the proposal.
approveCopilotAskFromLink.sessionId ● ID! non-null scalar
The ID of the Copilot session.
Type
ProposalCardType object
A change the copilot proposes, shown as a card for the user to approve.