Developers

Build consent into every channel

Record consent with signed receipts, check it before you process data, keep preferences in step and route rights requests — through one versioned REST API with signed webhooks.

Start here

Quick start

  1. 01

    Get a key

    Your organisation owner or developer creates an API key for your application in the console (Settings → API keys), or a sandbox for testing (Settings → Sandboxes). The secret is shown once.

  2. 02

    Get a token

    Exchange the key for an access token with the OAuth 2.0 client-credentials grant. Tokens are valid for 5 minutes; request a new one when it expires.

  3. 03

    Record and check consent

    Record the customer's choice against an approved notice version with an Idempotency-Key, keep the signed receipt, and ask for a decision before you process data for a purpose.

  4. 04

    Stay in step

    Register a webhook to receive signed events such as consent.withdrawn and confirm when your system has stopped the processing.

Token (server side only)
curl -s https://<auth host>/auth/realms/cmp/protocol/openid-connect/token \
  -d grant_type=client_credentials \
  -d client_id="$CMP_CLIENT_ID" \
  --data-urlencode client_secret="$CMP_CLIENT_SECRET"

Essentials

How the API behaves

  • REST endpoints

    Available

    Consent capture, history, receipts, decisions, rights requests, retention holds and customer access links.

  • Scopes per key

    Available

    Each key carries only the scopes it needs (for example consents:write, decisions:read). A key bound to an application records evidence for that application only.

  • Sandboxes

    Available

    Separate test organisations with their own keys. Receipts are marked as sandbox evidence and SMS are never sent. Synthetic data only.

  • Versioning

    Available

    Everything is under /v1 and changes there are additive. Deprecated endpoints send Deprecation and Sunset headers and keep working for at least 180 days.

  • Request IDs

    Available

    Every call made with your key is listed in the console (Settings → API usage) with its request ID, status and duration — quote it when you need help.

  • Generated reference

    Available

    The API reference and the OpenAPI document come from the running code, so they always match what the API accepts.

  • Signed webhooks

    Available

    CloudEvents 1.0 messages signed per the Standard Webhooks scheme, retried with back-off for up to 24 hours.

  • SSRF-safe delivery

    Available

    Webhook targets are checked at registration and at connection time to block internal addresses.

  • Withdrawal confirmations

    Available

    You can require connected systems to confirm, with a signed message and by a deadline, that they stopped processing after a withdrawal; systems that are late are listed and raise an alert.

Errors and retries. Errors are RFC 9457 problem details with a stable code. Consent writes need an Idempotency-Key, so a retry never records twice. 429 means slow down.

Widgets

SDKs and widgets

  • Cookie banner SDK

    Available

    One script tag for your websites: banner, prior blocking of tags, Global Privacy Control and Google Consent Mode v2.

  • Consent and preference widgets

    Available

    Embeddable widgets for your own web pages, shown only on your registered sites, in the customer's language.

  • React Native SDK

    Available

    Notices, consent choices with receipts, preferences and an offline queue for your own app, using a short-lived customer session and never an organisation key.

  • iOS, Android and Flutter SDKs

    In development

    Swift, Kotlin and Dart SDKs with the same calls and optional certificate pinning, built and unit-tested in the repository.

    What it needs: Packaging and publication. They are not in any package registry and have not been tested on devices.

  • Server-side SDKs

    Planned

    Generated client libraries for common server languages.

    What it needs: Not built. Use the REST API and the OpenAPI document.

Show customers their consent and message choices inside your signed-in website or customer portal with two lines of script. The widget runs from our host in a frame that only your registered web applications may embed; your server issues a single-use token for the signed-in customer, and the customer's session never reaches your page. Texts follow the customer's language (English and the 22 scheduled languages). See the widget example; for your own React Native app, use the React Native SDK.