ErasureDocs
Core Concepts

Consent (Accord)

Draft configuration, publish, versions, SDK, receipts, and withdraw.

Consent (Accord)

What it is

Accord is Erasure’s consent product for a project: categories, purposes, notice appearance, publish lifecycle, browser SDK, receipts, and optional project webhooks.

Why it exists

Regulators and customers ask what people agreed to and when. A banner alone is not enough if you cannot reconstruct the surface they saw or react in backend systems.

How it works

Draft configuration
  categories · purposes · notice appearance

        ▼ Publish
Immutable Consent Version (snapshot + content hash)

        ▼ SDK loads published config (publishable key)
Subject chooses → Receipt (choices + versionId + consentHash)

        ▼ Optional
Preference update / withdraw optional → new Receipt
Webhook consent.updated → your backend
PieceBehaviour
DraftEditable in console; not served to SDK
PublishSnapshot frozen; version number increments
ReceiptAppend-only; never updated in place
consentHashHash of published surface; receipt must match
WithdrawOptional purposes off (required stay on); new receipt
Allowed originsHost allowlist under Develop; on by default for new projects
WebhookOptional consent.updated (HMAC signed)

Console surfaces

Typical routes (HashRouter): project Consent, Versions, Receipts, Develop, Settings.

Integration summary

  1. Configure purposes (required + optional) and notice.
  2. Publish.
  3. Create a publishable key (pk_live_…, shown once).
  4. Add allowed origins for production hosts.
  5. Install @erasurehq/accord and call Accord.init in the browser only.

See SDK and Publish consent.

Withdrawal (v1)

Users can change or withdraw optional purposes on the same browser:

  • Banner → Manage preferences → withdraw optional
  • Hosted preference center (/preferences?key=pk_live_…)
  • SDK: client.withdrawOptional() / client.showPreferences()
  • Optional re-entry: Accord.init({ privacyControl: true, … })

Device/browser-scoped, not multi-device subject identity.