API reference

Webhook event: consent.granted

The consent.granted webhook fires when a consent flag is set. Its data.object is a consent. A typical handler will unlock the permitted communication channel once the signature is verified. Because delivery is <a href="/reference/webhook-delivery-and-retries/">at-least-once</a>, process it <a href="/glossary/idempotency-explained/">idempotently</a> on the event id.

2 min read

consentdata.object type
at-least-onceDelivery
evt_…Dedup on event id

When it fires

consent.granted is emitted when a consent flag is set. It fires once per occurrence; a redelivery of the same occurrence carries the same event id.

If your endpoint does not return a 2xx within the timeout, delivery is retried on an exponential backoff schedule — see Webhook delivery and retries. Design your handler to be idempotent so a redelivered event is safe to process twice.

Example delivery

{
  "id": "evt_CONS7X",
  "type": "consent.granted",
  "created": "2026-07-04T10:00:00Z",
  "livemode": true,
  "api_version": "2026-07-01",
  "data": {
    "object": {
      "id": "con_1A5C9",
      "subject": "enq_9F3K2P",
      "purpose": "marketing",
      "granted": true
    }
  }
}

Handling it

A common handler will unlock the permitted communication channel. Verify the signature first, acknowledge with 200 within 10 seconds, then do the work asynchronously. The underlying resource is the same shape the post consent endpoint returns, so you can re-fetch current state if you need it.

Frequently asked questions

Can consent.granted arrive more than once?

Yes. At-least-once delivery means a redelivery is possible after a slow acknowledgement or a retry. Deduplicate on the event id — see idempotency.

Is data.object the live consent?

It is a snapshot taken when the event fired. If the consent may have changed since, re-fetch it from the API for the authoritative current state.

Funding for UK limited companies

Credicorp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.