Developers
AdPriva has three surfaces a developer works with: the tag on your pages, a public API that anyone can use to verify evidence, and a signed-in API for your own organization’s data. There is no SDK package; everything is plain HTTP and JSON.
1) Install the tag
Add your domain in the console, then add this to your pages:
<script async src="https://cdn.adpriva.com/tag.js" data-consent-mode="tcf"></script>
There is no site key. The tag identifies your site by its hostname. Set data-consent-mode to tcf, manual or off; see Consent modes. See Tag installation.
2) Look up a proof (public, no credentials)
curl https://api.adpriva.com/public/proofs/<proof_id>
The response includes the proof’s type, status, validity score and verdict. Once the proof is batched, it also includes a Merkle inclusion receipt that lets you recompute the anchored root yourself. The same lookup is available in the browser at https://explorer.adpriva.com/verify/<proof_id>.
3) Read your own proofs (signed in)
TOKEN=$(curl -s -X POST https://api.adpriva.com/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"you@example.com","password":"…"}' | jq -r '.token')
curl -H "Authorization: Bearer $TOKEN" https://api.adpriva.com/explorer/proofs
This returns only your organization’s proofs. Every endpoint, with request and response shapes, is in the API Reference.
4) Witness consent on a form (optional)
Mark a consent form with data-adpriva-consent. On each submission the tag sends a hash of the consent wording, the checkbox state and the field labels (never their values). AdPriva seals this as a consent certificate that anyone can look up by its signature. See Consent Certificates — Quickstart, and for certificates that can be verified fully offline, Consent Evidence — Integration.
How a page view becomes a proof
- Capture. The tag sends one
viewevent per page load, about one second after the page loads. - Seal. The ingest server refuses a reused nonce and signs the event with an HMAC. The signature is the proof id.
- Score. The proof gets a validity score and a verdict. AdPriva runs in shadow mode, so verdicts do not block anything.
- Anchor. Every 5 minutes, new proofs are batched into a Merkle tree, and the root is anchored on Horizen.
- Verify. Anyone can recompute a proof’s batch root from its receipt and compare it with the on-chain event.
See Event Lifecycle for the detail.
Exports for audits
The console’s Explorer page exports a Portable Verification Certificate for a date range: a signed JSON file listing your scored proofs by id, type and verdict, with a SHA-256 digest and an HMAC over its content.