Customer documentation · Integration overview · Questions: contactus@diimeai.com

DIMEAI Consent Manager Integration Guide

For free-trial and paying customers of the DIMEAI Consent Manager, the Consent Manager for Data Fiduciaries. Your trial runs for 7 days from the day we send you your trial access. Use test notices and test data only during the trial. Everything below talks to https://api.diimeai.com.

What you get

Every consent and every withdrawal is an append-only, hash-chained record, signed with ECDSA P-256 and ML-DSA-65. Consent is asked purpose by purpose and nothing is pre-ticked. A withdrawal is its own record. SMS and OTP are never treated as consent.

What you need from us

ItemUsed in
Two admin logins (Admin 1 and Admin 2) for the dashboardDashboard
API keyBusiness API
Web key, and your registered website origin(s)Browser widget

Your trial kit email carries these, with the tenant name to sign in with. Either admin password works with it. Keep the API key on your server only. Never put it in a web page or an app.

The flow in five steps

  1. In the dashboard, create your notice and its purposes. A second person approves it (maker-checker) before it goes live. Each change is a new version.
  2. Your server creates a consent session with POST /api/v1/consent/sessions, using your API key.
  3. Your page or app shows the notice for that session. The person chooses purpose by purpose.
  4. The choice is stored as a signed record in the chain, and the person gets a receipt.
  5. Your server can check a record at any time with POST /api/v1/consent/verify, and the person can withdraw later.

Business API (your server)

All calls use your API key and the base URL https://api.diimeai.com/api/v1.

MethodRoutePurpose
PUT/consent/applications/{application_id}Create or update an application
PUT/consent/notices/{notice_key}Create or update a notice
POST/consent/sessionsCreate a consent session
GET/consent/sessions/{session_id}Read a session
POST/consent/recordsRecord a consent
POST/consent/withdrawRecord a withdrawal
POST/consent/acknowledgeRecord an acknowledgement
POST/consent/verifyVerify a consent record
GET/consent/consentsList consents
GET/consent/receipts/{artefact_id}Read a receipt by record id
GET/consent/receipts/by-hash/{event_hash}Read a receipt by event hash
GET/consent/changesList changes
GET/consent/exportExport the ledger
POST/consent/importImport legacy records
POST/consent/legacy/applicantRecord a legacy applicant

Request and response bodies are in the OpenAPI reference, which your NonaShield contact sends you. The public signing keys are at GET https://api.diimeai.com/.well-known/consent-ledger-keys.json?tenant=<slug>.

Browser widget

Load consent-widget.js from your trial kit on your own page, then mount the widget with the session your server created. The browser never holds a long-lived credential: your server creates the session, and the page receives only the session id and its short-lived token.

NonaShieldConsent.mount({
  baseUrl: 'https://api.diimeai.com',
  sessionId,                 // from your server's session call
  token,                     // from your server's session call
  publishableKey: WEB_KEY,   // the web key from your kit
  mode: 'inline',
  container: el,
  onDone: (r) => r.artefactIds
});

The widget works only from the website origin you registered. If you add a site later, ask us to register its origin. A live example is at the consent demo.

Options for the widget:

The consent panels are part of the paid NonaShield SDK (Android: com.payshield.sdk.consent, inside the SDK you already add; there is no second SDK and no second initialize). The trial does not include the SDK or the panels: during the trial use the business API, the browser widget and the tenant dashboard.

Your server creates the session first (POST /api/v1/consent/sessions, with your API key) and hands the session id to the app (type CONSENT for present, type DASHBOARD for withdraw and list). The panel shows the notice text exactly as published, in one language, with accept and decline of equal size and nothing pre-selected, and asks for the biometric on submit. A cancelled prompt records nothing.

The Android calls are:

Set the SDK up as in the SDK Integration Guide (initialize, enroll, onUserLogin), then:

val result = PayShieldConsent.present(activity, sessionId, language = null)   // shows the panel; returns ConsentResult
PayShieldConsent.withdraw(dashboardSessionId, purposeCode)                   // one signed call; returns ConsentResult
PayShieldConsent.list(dashboardSessionId)                                    // the person's consents: List<ConsentItem>

present, withdraw and list are suspend functions and throw ConsentException(code); CANCELLED means the person closed the panel or the biometric prompt and nothing was recorded.

The device routes are signed with the standard X-PayShield-* headers. list is a POST (POST /api/v1/consent/device/list) because device routes accept only signed JSON bodies. Ask your NonaShield contact about the SDK and the iOS equivalent for your paid plan.

Assisted counter and call-centre sessions

For a person who is not at their own device, an operator records the person's choice from an attested operator device, and the operator reference is stored with the record. These records carry the ASSISTED label below.

What each proof label proves

The server sets the label from what it verified. Nothing in a request can choose or raise it.

LabelChannelWhat it provesWhat it does not prove
HW_ATTESTEDAppA hardware-backed device key, vouched for at enrolment, signed this exact decision.That the right person held the phone.
DEVICE_KEYAppAn enrolled device key without hardware attestation signed this decision.Hardware protection of the key.
ASSISTEDCounter or call centreAn attested operator device recorded the person's own gesture.Anything about the person beyond the operator's device.
PASSKEYWebA passkey ceremony completed on your site's origin for this session.Who the person is.
WEB_FINGERPRINTWebA clean web-SDK verdict from this origin inside this session's time window.Identity.
SESSION_BOUNDWebThe decision came from the browser the session was bound to.That the device signed it.
SERVER_ASSERTEDYour serverYour server told us the person agreed.Anything about the person's device.

User presence in the app is asserted by the device, not proven by the server.

Tenant dashboard

Sign in with the tenant name and either admin password from your kit. The two admins are equal: either one can write and publish a notice, and either can approve a notice the other submitted. Only you and your own admins use this dashboard. The dashboard has:

The overview, person view and records list share the same columns:

ColumnWhat it shows
PurposeThe purpose the person decided on.
Data typesThe kinds of data the purpose covers, such as KYC, mobile number or location, as listed in your notice. The data itself is never stored here.
IndustryThe industry you gave at signup.
ProofThe proof label, for example PASSKEY.
Browser fingerprintA short reference to the browser check and its trust tier, when one was sent. It does not identify the person. "Not sent" means none came with that consent.
EvidenceA short hash of the signed ledger event, with the two signature algorithms (ES256 and ML-DSA-65).

Verify offline

You do not need to trust our server to check the ledger. Export it from the dashboard or the business API, then run the verifier on your own machine:

python consent_verify.py EXPORT.json --keys KEYS.json

Get the tenant's public keys from https://api.diimeai.com/.well-known/consent-ledger-keys.json?tenant=<slug>, where <slug> is your tenant name. Fetch them over a channel you trust and keep your own copy, so that the check proves the chain was signed by keys you hold. The verifier needs no database or server and exits with 0 for a valid ledger, 1 for an invalid one and 2 if the file cannot be read. It also takes optional --anchors (receipt anchors, to detect a truncated tail), --device-keys and --sealed arguments.

Limits to know

Rules

When the trial ends

We email you before it ends. To go on, write to contactus@diimeai.com.