Cancel a consent
Cancel a pending consent request before it's completed. Consents can be canceled by you or your user as long as the consent has a non-final status.
Prerequisites
- You need a project or user access token.
- The consent must have one of these non-final statuses:
Created: Consent request created but URL not opened.Started: URL opened but consent not yet provided.OperationCommitting: For multi-consents, when execution is in progress.
Guide
- Call the
cancelConsentmutation. - Add your consent ID.
- Add the success payload and rejections.
Mutation
🔎 Open the mutation in API Explorer
Mutation
mutation CancelConsent {
cancelConsent(input: { consentId: "$YOUR_CONSENT_ID" }) {
... on CancelConsentSuccessPayload {
__typename
consent {
id
status
}
}
... on ConsentNotFoundRejection {
__typename
consentId
message
}
... on NotReachableConsentStatusRejection {
__typename
currentStatus
unreachableStatus
message
}
}
}
Payload
Payload
{
"data": {
"cancelConsent": {
"__typename": "CancelConsentSuccessPayload",
"consent": {
"id": "$YOUR_CONSENT_ID",
"status": "Canceled"
}
}
}
}