Launching soon. Sign-ups are not open yet. Join the waitlist and we will write to you when they are.

API reference

43 endpoints, 11 groups

The complete integrator-facing surface: the REST API under /v1, the principal portal under /portal, Consent-Manager interop under /cm/v1, and the system probes. Public, before signup.

This page is generated from the same OpenAPI document that generates the server and the typed client, so it cannot drift from the running API. Base URL https://app.cleardp.in, or your own host when self-hosted. The administrative surface is excluded by design.

Launching soon

The managed service is not open yet: https://app.cleardp.in does not accept requests and accounts cannot be created. These pages describe the API as it ships. Join the waitlist to hear when it opens.

Authentication

Four schemes appear on this surface. Each row below is the scheme as the API document defines it — the credential, where it goes, and what it may reach.

Authentication schemes on the integrator-facing API surface
SchemeCredentialScope and behaviour
apiKeyAuthorization: Bearer sk_live_... (or sk_test_...)securitySchemes.apiKey is type: http, scheme: bearer — a Property API key, described in the spec as 'sk_live_… / sk_test_…'. Publishable browser keys (pk_) are accepted only on the browser-safe routes: GET /v1/notice, GET /v1/notices/{noticeVersionId}/body, GET /v1/purposes, GET /v1/theme, GET /v1/principals/{ref}/consents (anon: refs only), POST /v1/impressions, and POST /v1/consents, POST /v1/consents/withdraw and POST /v1/principals/link (naming an externalId there needs a portalToken). Every other route refuses pk_ keys with 403, including POST /v1/portal-links.
portalSessionCookie: cleardp_portal_session=<JWT>securitySchemes.portalSession is type: apiKey, in: cookie, name: cleardp_portal_session. A 30-minute RS256 JWT (audience cleardp-portal-session) in an httpOnly cookie, issued by POST /portal/session (link exchange) or POST /portal/otp/verify. Enforced by the portal auth middleware.
cmTokenAuthorization: Bearer <accessToken from POST /cm/v1/token>securitySchemes.cmAuth is type: http, scheme: bearer. A /cm/v1 request authenticates by EITHER a pinned mutual-TLS client certificate OR an OAuth 2.0 client-credentials bearer token, resolved per CM registration; the bearer scheme documents the OAuth path. The /cm/v1 family is inert (404) when the CLEARDP_FF_CM_INTEROP feature flag is off.
noneNo credentialsUnauthenticated routes on this surface: GET /healthz, GET /readyz, GET /portal/theme, POST /portal/session, POST /portal/otp/request, POST /portal/otp/verify, POST /portal/logout, POST /cm/v1/token.

Every error response is application/problem+json under RFC 9457. Reads and writes are confined to the calling property: a resource belonging to another property is a 404, not a 403. New to the API? Start with the quickstart.

Capture and withdraw consent decisions as append-only, hash-chained artifacts, and read a principal's materialized consent state, and link an anonymous banner visitor to the account they sign in to.

4 endpoints

POST

/v1/consents

auth: property API key

Capture a batch of consent decisions (append-only, hash-chained)

Parameters

Parameters for POST /v1/consents
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoIdempotency key scoped to the property, TTL 24h. Same key + same body replays the stored response; same key + different body is a 409.

Request

# request body — application/json
{
  "principal": {
    "externalId": "user_98214",
    "email": "priya.sharma@example.in"
  },
  "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
  "language": "hi",
  "method": "BANNER",
  "decisions": [
    {
      "purposeKey": "marketing_email",
      "action": "GRANT"
    },
    {
      "purposeKey": "analytics_basic",
      "action": "DENY"
    }
  ]
}

Response

# 201 application/json
{
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "artifacts": [
    {
      "id": "art_01h455vb4pex5vsknk084sn02q",
      "purposeKey": "marketing_email",
      "action": "GRANT",
      "seq": "1042",
      "hash": "3f1c9a7d5e2b48c06a1f9d3b7c5e2a8049f6b1d3c7e5a2049f6b1d3c7e5a2049"
    },
    {
      "id": "art_01h455vb4pex5vsknk084sn02r",
      "purposeKey": "analytics_basic",
      "action": "DENY",
      "seq": "1043",
      "hash": "7c5e2a8049f6b1d3c7e5a2049f6b1d3c3f1c9a7d5e2b48c06a1f9d3b7c5e2a80"
    }
  ],
  "state": [
    {
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "status": "GRANTED",
      "stale": false,
      "grantedAt": "2026-07-30T09:15:04Z",
      "expiresAt": null,
      "updatedAt": "2026-07-30T09:15:04Z",
      "lastArtifactId": "art_01h455vb4pex5vsknk084sn02q"
    },
    {
      "purposeKey": "analytics_basic",
      "purposeVersion": 2,
      "status": "DENIED",
      "stale": false,
      "grantedAt": null,
      "expiresAt": null,
      "updatedAt": "2026-07-30T09:15:04Z",
      "lastArtifactId": "art_01h455vb4pex5vsknk084sn02r"
    }
  ]
}

Values

  • method — BANNER · PORTAL · API · IMPORT · SYSTEM · CM
  • decisions[].action — GRANT · DENY
  • state[].status — GRANTED · DENIED · WITHDRAWN · EXPIRED

Notes

Only BANNER, PORTAL and API are accepted for method — IMPORT, SYSTEM and CM are server-recorded provenance and are rejected with 400. A GRANT over a currently-EXPIRED state is recorded as RENEW. Every purpose must be ACTIVE, legalBasis CONSENT, and present in the notice version's frozen refs; language must be one the notice version was published in. principal requires at least one of externalId / anonymousId (server-enforced). principal.portalToken (max 4096 chars, from POST /v1/portal-links) is what lets a publishable pk_ key name a principal by externalId.

Status codes

  • 201 Consent captured.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Publishable-key principal binding refused (problem type portal_token_required when a pk_ key names an externalId without a portalToken; portal_token_invalid when the token is expired, malformed, or issued for a different principal or property).
  • 404 Resource not found (or not visible to the caller).
  • 409 Request conflicts with the current state of the resource (e.g. Idempotency-Key reuse with a different body).
  • 422 Well-formed but not permitted in the resource's current state: child-purpose-blocked (a child cannot grant a purpose not allowed for children; no guardian can change that) or guardian-verification-required (a child's GRANT before a verified guardian link). See /docs/children/.

Errors: application/problem+json · operationId postV1Consents

POST

/v1/consents/withdraw

auth: property API key

Withdraw consent for one or more purposes (action forced WITHDRAW)

Parameters

Parameters for POST /v1/consents/withdraw
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoIdempotency key scoped to the property, TTL 24h.

Request

# request body — application/json
{
  "principal": {
    "externalId": "user_98214"
  },
  "purposeKeys": [
    "marketing_email"
  ],
  "method": "API"
}

Response

# 201 application/json
{
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "artifacts": [
    {
      "id": "art_01h455vb4pex5vsknk084sn02s",
      "purposeKey": "marketing_email",
      "action": "WITHDRAW",
      "seq": "1051",
      "hash": "b1d3c7e5a2049f6b3f1c9a7d5e2b48c06a1f9d3b7c5e2a8049f6b1d3c7e5a204"
    }
  ],
  "state": [
    {
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "status": "WITHDRAWN",
      "stale": false,
      "grantedAt": null,
      "expiresAt": null,
      "updatedAt": "2026-07-30T10:02:41Z",
      "lastArtifactId": "art_01h455vb4pex5vsknk084sn02s"
    }
  ]
}

Values

  • method — BANNER · PORTAL · API · IMPORT · SYSTEM · CM

Notes

There is deliberately NO noticeVersionId and NO language in this body: the server reuses the last-known notice version and language recorded for each purpose. purposeKeys is a flat array of strings (pattern ^[a-z][a-z0-9_]{2,49}$, 1-100 items), not a decisions array. Returns 201, not 200. Withdrawal must stay as easy as granting (DPDP R4).

Status codes

  • 201 Withdrawal captured.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Publishable-key principal binding refused (problem type portal_token_required or portal_token_invalid, as on POST /v1/consents).
  • 404 Resource not found (or not visible to the caller).
  • 409 Request conflicts with the current state of the resource.
  • 422 Well-formed but not permitted in the resource's current state.

Errors: application/problem+json · operationId postV1ConsentsWithdraw

GET

/v1/principals/{ref}/consents

auth: property API key

Read a principal's current consent state

Parameters

Parameters for GET /v1/principals/{ref}/consents
NameInTypeRequiredDescription
refpathstring (maxLength 320)yesPrincipal reference: `ext:<externalId>`, `anon:<anonymousId>`, or a `prn_<id>` principal id.

Response

# 200 application/json
{
  "principal": {
    "id": "prn_01h455vb4pex5vsknk084sn02q",
    "externalId": "user_98214",
    "anonymousId": null,
    "isChild": false,
    "guardianVerified": false,
    "guardianRef": null,
    "createdAt": "2026-05-11T06:22:19Z",
    "externalLinkedAt": null
  },
  "state": [
    {
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "status": "GRANTED",
      "stale": false,
      "grantedAt": "2026-07-30T09:15:04Z",
      "expiresAt": "2027-07-30T09:15:04Z",
      "updatedAt": "2026-07-30T09:15:04Z",
      "lastArtifactId": "art_01h455vb4pex5vsknk084sn02q"
    }
  ]
}

Notes

expiresAt is populated here (grantedAt + the purpose's retentionDays under DURATION retention); it is null for UNTIL_WITHDRAWN purposes and left null on capture/withdraw receipts. guardianVerified is true only while a VERIFIED, unexpired GuardianLink authorizes a child's consent — the SDK uses it to distinguish 'suspended' from permanently 'blocked' (allowedForChildren=false). externalLinkedAt is when an anonymous banner visitor was linked to this externalId (POST /v1/principals/link, or a consent write naming both); null when the principal was created with its externalId. With a publishable key only an anon: ref is allowed (any other ref is refused with 403), and an anonymous visitor nobody has recorded anything for answers 204, not 404.

Status codes

  • 200 The principal's consent state.
  • 204 Publishable key, anon: ref: nothing has been recorded for this anonymous visitor yet.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Publishable key with a ref other than anon:, or a key not allowed on this route.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getV1PrincipalConsents

POSTauth: property API key

Link an anonymous banner visitor to the account they signed in to

Request

# request body — application/json
{
  "anonymousId": "anon_3f1c9a7d5e2b48c06a1f9d3b7c5e2a80",
  "externalId": "user_98214",
  "portalToken": "eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJjbGVhcmRwLXBvcnRhbC1saW5rIn0.sig"
}

Response

# 200 application/json
{
  "outcome": "LINKED",
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "externalLinkedAt": "2026-07-30T09:20:11Z"
}

Values

  • outcome — LINKED · ALREADY_LINKED · NOTHING_TO_LINK

Notes

Call it once a visitor the banner knew only by anonymousId signs in; the browser SDK's identify() does. Consents given anonymously become readable under ext:<externalId> without asking again: no consent artifact is written, and externalLinkedAt records when. If POST /v1/portal-links already created a principal for the externalId and nothing has been recorded for it, it is folded into the anonymous one and tokens minted for it keep working. If both principals have history, or the anonymousId is already linked to another externalId, the answer is 409 principal-conflict and nothing changes. NOTHING_TO_LINK means nothing was ever recorded for the anonymousId. A publishable key must send a portalToken minted for the externalId; a secret key ignores it. Idempotent: a repeat answers ALREADY_LINKED. Returns 200.

Status codes

  • 200 The outcome of the link.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Publishable-key principal binding refused (problem type portal_token_required or portal_token_invalid, as on POST /v1/consents).
  • 409 principal-conflict: the anonymousId is linked to a different externalId, or both principals already have recorded history.

Errors: application/problem+json · operationId postV1PrincipalsLink

Notices & purposes

Everything the banner needs: the active published notice, its rendered HTML snapshot, the property's ACTIVE purpose catalogue, theme tokens, and impression beacons.

5 endpoints

GET

/v1/notice

auth: property API key

Fetch the property's active (default) published notice

Parameters

Parameters for GET /v1/notice
NameInTypeRequiredDescription
langquerystring (pattern ^[a-z]{2,3}$)noPreferred ISO 639 language code; falls back if unavailable.

Response

# 200 application/json
{
  "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
  "servedLanguage": "hi",
  "availableLanguages": [
    "en",
    "hi",
    "ta"
  ],
  "title": "गोपनीयता सूचना",
  "bodyHtmlUrl": "/v1/notices/ntv_01h455vb4pex5vsknk084sn02q/body?lang=hi",
  "sections": {
    "withdrawalHowTo": "आप किसी भी समय अपनी सहमति वापस ले सकते हैं — privacy@example.in पर लिखें या अपने खाते के गोपनीयता पृष्ठ पर जाएँ।",
    "rightsHowTo": "You may request access, correction, erasure or nominate another person from your privacy dashboard.",
    "grievanceContact": "Data Protection Officer, Example Retail Pvt Ltd, Bengaluru — dpo@example.in",
    "boardComplaintInfo": "If unsatisfied, you may complain to the Data Protection Board of India."
  },
  "purposes": [
    {
      "key": "marketing_email",
      "version": 3,
      "name": "Marketing emails",
      "text": "हम आपको ऑफ़र और नए उत्पादों के बारे में ईमेल भेजेंगे।",
      "legalBasis": "CONSENT",
      "allowedForChildren": false,
      "requiredToggle": false
    },
    {
      "key": "analytics_basic",
      "version": 2,
      "name": "Product analytics",
      "text": "हम यह समझने के लिए उपयोग डेटा एकत्र करते हैं कि ऐप का उपयोग कैसे किया जाता है।",
      "legalBasis": "CONSENT",
      "allowedForChildren": true,
      "requiredToggle": false
    }
  ]
}

Values

  • purposes[].legalBasis — CONSENT · LEGITIMATE_USE

Notes

Language resolution is requested lang → property default → en, and servedLanguage reports which was used. availableLanguages drives the SDK language switcher. requiredToggle is always false — DPDP consent is never a required toggle. Only CONSENT purposes render as banner toggles. bodyHtmlUrl is a first-party URL pointing at GET /v1/notices/{noticeVersionId}/body. The four sections keys are all optional on the wire (presence is enforced at publish).

Status codes

  • 200 The active notice payload.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getV1Notice

GET

/v1/notices/{noticeVersionId}/body

auth: property API key

Stream a notice version's rendered HTML snapshot (the bodyHtmlUrl target)

Parameters

Parameters for GET /v1/notices/{noticeVersionId}/body
NameInTypeRequiredDescription
noticeVersionIdpathstring (pattern ^ntv_[0-9a-hjkmnp-tv-z]{26}$)yesThe notice version; must belong to the calling property.
langquerystring (pattern ^[a-z]{2,3}$)noISO 639 language code; falls back like /v1/notice.

Response

# 200 text/html
<!doctype html><html lang="hi"><body><h1>गोपनीयता सूचना</h1>...</html>

Notes

Returns text/html, not JSON — the sanitized HTML snapshot streamed from the object store.

Status codes

  • 200 The rendered, sanitized notice HTML.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getV1NoticeBody

GET

/v1/purposes

auth: property API key

List the property's ACTIVE purposes (public shape)

Response

# 200 application/json
{
  "purposes": [
    {
      "key": "marketing_email",
      "version": 3,
      "name": "Marketing emails",
      "description": "Send offers and product news to your email address.",
      "legalBasis": "CONSENT",
      "dataCategories": [
        "contact",
        "behavioural"
      ],
      "allowedForChildren": false
    },
    {
      "key": "analytics_basic",
      "version": 2,
      "name": "Product analytics",
      "description": "Understand how the app is used so we can improve it.",
      "legalBasis": "CONSENT",
      "dataCategories": [
        "device",
        "usage"
      ],
      "allowedForChildren": true
    }
  ]
}

Values

  • purposes[].legalBasis — CONSENT · LEGITIMATE_USE

Notes

Intentionally unpaginated — no page/cursor parameters. Returns the ACTIVE version of every purpose key for the calling property; the Web SDK consumes the whole list to render the banner. Note the field is `description` here, while GET /v1/notice's purposes carry `text` (the per-language consent text).

Status codes

  • 200 The property's active purposes.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId getV1Purposes

GET

/v1/theme

auth: property API key

White-label theme tokens for the calling property

Response

# 200 application/json
{
  "propertyKey": "pk_live_01h455vb4pex5vsknk084sn02q",
  "theme": {
    "logoUrl": "https://cdn.example.in/logo.svg",
    "primaryColor": "#0F4C81",
    "primaryTextColor": "#FFFFFF",
    "backgroundColor": "#FFFFFF",
    "textColor": "#111827",
    "fontFamily": "Inter, sans-serif",
    "borderRadius": "8px",
    "bannerPosition": "bottom"
  }
}

Example abridged — the schema allows further optional fields on this response.

Values

  • theme.bannerPosition — bottom · top · center
  • theme.reopenButton — left · right · off

Notes

Browser-safe: callable with a publishable pk_ key. All theme fields are optional; the full Theme object also allows faviconUrl, mutedTextColor, borderColor, accentColor and fontUrl. Every token passes a closed-allowlist validator, so nothing here can carry script into a page. Unlike GET /portal/theme, this response has no cssVariables map. reopenButton places the "Privacy settings" button the banner leaves after a choice: left by default, off hides it.

Status codes

  • 200 Theme tokens.
  • 401 Missing or invalid credentials.
  • 403 Authenticated but not allowed (role matrix).
  • 429 Rate limited or temporarily locked out.

Errors: application/problem+json · operationId getV1Theme

POST

/v1/impressions

auth: property API key

Record a batch of notice-impression beacons (SDK; publishable-safe)

Request

# request body — application/json
{
  "impressions": [
    {
      "id": "8f2b1c40-6a3d-4c1e-9b77-2d4e5f6a7b8c",
      "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
      "language": "hi"
    }
  ]
}

Response

# 202 application/json
{
  "accepted": 1,
  "duplicates": 0
}

Notes

No Idempotency-Key header needed: each impression carries a client-generated opaque uuid `id` (1-64 chars) and dedup is server-side on (property, impressionId). 1-100 impressions per batch. Publishable pk_ keys are allowed and the request Origin is reflected. Optional per-item sessionId enables notice.time_to_decision_p50 when the same value is sent on the consent POST; it is not a principal identifier. Returns 202, not 200/201; the server stamps receive time and stores no principal identifier.

Status codes

  • 202 Impressions accepted.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Authenticated but not allowed (role matrix).

Errors: application/problem+json · operationId postV1Impressions

Artifacts & verification

Read an individual hash-chained consent artifact and verify a range of the property's chain.

2 endpoints

GET

/v1/artifacts/{artifactId}

auth: property API key

Fetch a single consent artifact and verify its chain link

Parameters

Parameters for GET /v1/artifacts/{artifactId}
NameInTypeRequiredDescription
artifactIdpathstring (pattern ^art_[0-9a-hjkmnp-tv-z]{26}$)yesThe consent artifact id.

Response

# 200 application/json
{
  "id": "art_01h455vb4pex5vsknk084sn02q",
  "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "purposeKey": "marketing_email",
  "purposeVersion": 3,
  "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
  "action": "GRANT",
  "method": "BANNER",
  "language": "hi",
  "occurredAt": "2026-07-30T09:15:04Z",
  "seq": "1042",
  "prevHash": "0a4f8e1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7",
  "hash": "3f1c9a7d5e2b48c06a1f9d3b7c5e2a8049f6b1d3c7e5a2049f6b1d3c7e5a2049",
  "chainOk": true,
  "sessionId": null
}

Values

  • action — GRANT · DENY · WITHDRAW · EXPIRE · RENEW
  • method — BANNER · PORTAL · API · IMPORT · SYSTEM · CM

Notes

seq is a bigint serialized as a STRING (e.g. "1042"), not a number. chainOk is computed per request: true when the stored hash matches the recomputed canonical hash AND prevHash matches the predecessor (or the genesis anchor at seq 1). Property-scoped — an artifact belonging to another property is a 404.

Status codes

  • 200 The artifact.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getV1Artifact

POST

/v1/chain/verify

auth: property API key

Verify a range of the property's consent artifact chain

Request

# request body — application/json
{
  "fromSeq": 1,
  "toSeq": 1042
}

Response

# 200 application/json
{
  "valid": true,
  "checked": 1042,
  "brokenAtSeq": null
}

Notes

Request seqs are int64 NUMBERS (minimum 1), but the response brokenAtSeq is a nullable STRING. toSeq must be >= fromSeq and <= fromSeq + 10000. checked is the number of artifacts examined in the range.

Status codes

  • 200 Verification result.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId postV1ChainVerify

Principal portal

The hosted data-principal portal: sign-in by one-time link or email OTP, then read consents/history, export data, withdraw, and file rights requests or grievances.

15 endpoints

GET

/portal/theme

auth: none

Presentational tokens for the hosted portal, before sign-in

Parameters

Parameters for GET /portal/theme
NameInTypeRequiredDescription
propertyKeyquerystringnoPublishable property key. Optional on a VERIFIED custom domain (the property is resolved from the Host header); still required on the canonical hostname.

Response

# 200 application/json
{
  "propertyKey": "pk_live_01h455vb4pex5vsknk084sn02q",
  "theme": {
    "logoUrl": "https://cdn.example.in/logo.svg",
    "primaryColor": "#0F4C81",
    "textColor": "#111827",
    "bannerPosition": "bottom"
  },
  "cssVariables": {
    "--cleardp-primary": "#0F4C81",
    "--cleardp-radius": "8px"
  }
}

Example abridged — the schema allows further optional fields on this response.

Notes

Public in the strong sense: returns only the publishable property key and theme tokens — never a sender address or a domain list. An unknown host with no propertyKey is 404; an unthemed property is 200 with ClearDP defaults. cssVariables is a free-form string→string map.

Status codes

  • 200 Theme tokens.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getPortalTheme

POST

/portal/session

auth: none

Exchange a single-use link token for a portal session

Request

# request body — application/json
{
  "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjbGVhcmRwLXBvcnRhbC1saW5rIn0.sig"
}

Response

# 200 application/json
{
  "principal": {
    "id": "prn_01h455vb4pex5vsknk084sn02q",
    "externalId": "user_98214",
    "isChild": false,
    "createdAt": "2026-05-11T06:22:19Z"
  }
}

Notes

The token is atomically consumed (single-use) and the httpOnly cleardp_portal_session cookie is set via Set-Cookie. Expired, unknown or already-used tokens are 401 (not 404).

Status codes

  • 200 Session established (Set-Cookie).
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId postPortalSession

POST

/portal/otp/request

auth: none

Request an email OTP to sign in to the portal

Request

# request body — application/json
{
  "propertyKey": "pk_live_01h455vb4pex5vsknk084sn02q",
  "email": "priya.sharma@example.in"
}

Response

# 200 application/json
{
  "status": "sent"
}

Notes

The response is identical whether or not the email exists (anti-enumeration); status is the fixed enum value "sent". A per-email send throttle applies.

Status codes

  • 200 Request accepted (identical whether or not the email exists).
  • 400 Request failed validation.
  • 404 Resource not found (or not visible to the caller) — e.g. unknown propertyKey.

Errors: application/problem+json · operationId postPortalOtpRequest

POST

/portal/otp/verify

auth: none

Verify an email OTP and establish a portal session

Request

# request body — application/json
{
  "propertyKey": "pk_live_01h455vb4pex5vsknk084sn02q",
  "email": "priya.sharma@example.in",
  "code": "418302"
}

Response

# 200 application/json
{
  "principal": {
    "id": "prn_01h455vb4pex5vsknk084sn02q",
    "externalId": "user_98214",
    "isChild": false,
    "createdAt": "2026-05-11T06:22:19Z"
  }
}

Notes

code is a 6-digit string (pattern ^[0-9]{6}$). Sets the httpOnly session cookie. A wrong code is 401; the 5th wrong attempt locks the email for 15 minutes and returns 429 while locked.

Status codes

  • 200 Session established (Set-Cookie).
  • 400 Request failed validation.
  • 401 Missing or invalid credentials (wrong code).
  • 404 Resource not found (or not visible to the caller).
  • 429 Rate limited or temporarily locked out.

Errors: application/problem+json · operationId postPortalOtpVerify

POST

/portal/logout

auth: none

Clear the portal session cookie

Response

Response: none (204 No Content).

Notes

Public and idempotent; no request body and no response body.

Status codes

  • 204 Session cleared.

Errors: application/problem+json · operationId postPortalLogout

GET

/portal/me

auth: portal session

The signed-in principal's identity

Response

# 200 application/json
{
  "id": "prn_01h455vb4pex5vsknk084sn02q",
  "externalId": "user_98214",
  "isChild": false,
  "createdAt": "2026-05-11T06:22:19Z"
}

Notes

Flat object (no `principal` wrapper), unlike POST /portal/session which nests the same shape under `principal`.

Status codes

  • 200 The principal.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId getPortalMe

GET

/portal/me/consents

auth: portal session

The principal's current consent state, with pinned notice text

Parameters

Parameters for GET /portal/me/consents
NameInTypeRequiredDescription
childquerystring (pattern ^prn_[0-9a-hjkmnp-tv-z]{26}$)noAct on this child principal instead of the session principal. Permitted only while a VERIFIED, unexpired GuardianLink authorizes the session principal over that child; re-read on every request, never cached in the session. Anyone else gets 404.

Response

# 200 application/json
{
  "principal": {
    "id": "prn_01h455vb4pex5vsknk084sn02q",
    "externalId": "user_98214",
    "isChild": false,
    "createdAt": "2026-05-11T06:22:19Z"
  },
  "consents": [
    {
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "purposeName": "Marketing emails",
      "purposeText": "हम आपको ऑफ़र और नए उत्पादों के बारे में ईमेल भेजेंगे।",
      "status": "GRANTED",
      "stale": false,
      "grantedAt": "2026-07-30T09:15:04Z",
      "expiresAt": "2027-07-30T09:15:04Z",
      "updatedAt": "2026-07-30T09:15:04Z",
      "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
      "language": "hi",
      "snapshotUrl": "/portal/notices/ntv_01h455vb4pex5vsknk084sn02q/body?lang=hi"
    }
  ]
}

Notes

purposeName / purposeText are frozen from the notice version the principal consented under; snapshotUrl points at GET /portal/notices/{noticeVersionId}/body.

Status codes

  • 200 The principal's consents.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getPortalMeConsents

GET

/portal/me/history

auth: portal session

The principal's consent artifact timeline

Response

# 200 application/json
{
  "items": [
    {
      "artifactId": "art_01h455vb4pex5vsknk084sn02q",
      "action": "GRANT",
      "method": "BANNER",
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "occurredAt": "2026-07-30T09:15:04Z",
      "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
      "language": "hi",
      "snapshotUrl": "/portal/notices/ntv_01h455vb4pex5vsknk084sn02q/body?lang=hi",
      "seq": "1042",
      "hash": "3f1c9a7d5e2b48c06a1f9d3b7c5e2a8049f6b1d3c7e5a2049f6b1d3c7e5a2049"
    }
  ]
}

Values

  • items[].action — GRANT · DENY · WITHDRAW · EXPIRE · RENEW
  • items[].method — BANNER · PORTAL · API · IMPORT · SYSTEM · CM

Notes

In chain order. The artifact id field is `artifactId` here, but `id` in ConsentReceipt.artifacts and in ArtifactDetail.

Status codes

  • 200 The principal's history.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId getPortalMeHistory

GET

/portal/me/export

auth: portal session

Download the principal's own data (JSON)

Response

# 200 application/json
{
  "principal": {
    "id": "prn_01h455vb4pex5vsknk084sn02q",
    "externalId": "user_98214",
    "anonymousId": null,
    "email": "priya.sharma@example.in",
    "phone": "+919812345678",
    "isChild": false,
    "guardianRef": null,
    "createdAt": "2026-05-11T06:22:19Z"
  },
  "consents": [
    {
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "status": "GRANTED",
      "stale": false,
      "updatedAt": "2026-07-30T09:15:04Z",
      "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
      "language": "hi",
      "snapshotUrl": "/portal/notices/ntv_01h455vb4pex5vsknk084sn02q/body?lang=hi"
    }
  ],
  "artifacts": [
    {
      "artifactId": "art_01h455vb4pex5vsknk084sn02q",
      "action": "GRANT",
      "method": "BANNER",
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "occurredAt": "2026-07-30T09:15:04Z",
      "noticeVersionId": "ntv_01h455vb4pex5vsknk084sn02q",
      "language": "hi",
      "snapshotUrl": "/portal/notices/ntv_01h455vb4pex5vsknk084sn02q/body?lang=hi",
      "seq": "1042",
      "hash": "3f1c9a7d5e2b48c06a1f9d3b7c5e2a8049f6b1d3c7e5a2049f6b1d3c7e5a2049"
    }
  ]
}

Example abridged — the schema allows further optional fields on this response.

Notes

Synchronous in the MVP. Unlike other portal responses, principal here includes the DECRYPTED email and phone (self-access) plus anonymousId and guardianRef.

Status codes

  • 200 The principal's data export.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId getPortalMeExport

POST

/portal/me/withdraw

auth: portal session

Withdraw consent for one or more purposes (from the portal)

Request

# request body — application/json
{
  "purposeKeys": [
    "marketing_email"
  ]
}

Response

# 201 application/json
{
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "artifacts": [
    {
      "id": "art_01h455vb4pex5vsknk084sn02s",
      "purposeKey": "marketing_email",
      "action": "WITHDRAW",
      "seq": "1051",
      "hash": "b1d3c7e5a2049f6b3f1c9a7d5e2b48c06a1f9d3b7c5e2a8049f6b1d3c7e5a204"
    }
  ],
  "state": [
    {
      "purposeKey": "marketing_email",
      "purposeVersion": 3,
      "status": "WITHDRAWN",
      "stale": false,
      "grantedAt": null,
      "expiresAt": null,
      "updatedAt": "2026-07-30T10:02:41Z",
      "lastArtifactId": "art_01h455vb4pex5vsknk084sn02s"
    }
  ]
}

Notes

No `principal` object — the principal comes from the session. Optional `childId` (^prn_...$) withdraws on behalf of a child the session principal is verified for. Artifacts are written with method PORTAL and emit the same webhook and confirmation email as an API withdrawal. Returns 201.

Status codes

  • 201 Withdrawal captured.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).
  • 422 Well-formed but not permitted in the resource's current state.

Errors: application/problem+json · operationId postPortalMeWithdraw

GET

/portal/me/requests

auth: portal session

The principal's rights requests and grievances

Response

# 200 application/json
{
  "items": [
    {
      "id": "rr_01h455vb4pex5vsknk084sn02q",
      "kind": "ACCESS",
      "status": "COMPLETED",
      "createdAt": "2026-07-28T11:40:00Z",
      "dueAt": "2026-08-27T11:40:00Z",
      "resolutionNote": "Your data export is attached.",
      "messages": [
        {
          "id": "cmt_01h455vb4pex5vsknk084sn02q",
          "from": "TEAM",
          "body": "We have attached a copy of the data we hold about you.",
          "createdAt": "2026-08-02T09:15:00Z"
        }
      ],
      "files": [
        {
          "key": "attachments/prop_01h455vb4pex5vsknk084sn02q/rr_01h455vb4pex5vsknk084sn02q/01h455vb4pex5vsknk084sn02t.zip",
          "filename": "export.zip",
          "contentType": "application/zip",
          "size": 20480,
          "uploadedAt": "2026-08-02T09:14:00Z"
        }
      ]
    }
  ]
}

Notes

The discriminator is `kind` (not `type` as on the create request) and its enum adds GRIEVANCE: ACCESS, CORRECTION, ERASURE, NOMINATION, GRIEVANCE. `status` is a free string here. Each item also carries `dueAt` (when the fiduciary committed to answer), `resolutionNote` (null until closed), `messages` (oldest first; `from` is TEAM or YOU; the team's internal notes are never included) and `files` (ZIP files the team shared on a rights request; always empty for a grievance). Download one with POST /portal/me/requests/{requestId}/files/download.

Status codes

  • 200 The principal's requests.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId getPortalMeRequests

POST

/portal/me/requests/{requestId}/files/download

auth: portal session

Get a short-lived link to download a file shared on one of the principal's own requests

Parameters

Parameters for POST /portal/me/requests/{requestId}/files/download
NameInTypeRequiredDescription
requestIdpathstringyesA rights request id (`rr_…`) belonging to the signed-in principal.

Request

# request body — application/json
{
  "key": "attachments/prop_01h455vb4pex5vsknk084sn02q/rr_01h455vb4pex5vsknk084sn02q/01h455vb4pex5vsknk084sn02t.zip"
}

Response

# 200 application/json
{
  "url": "https://<object-store-host>/attachments/prop_01h455vb4pex5vsknk084sn02q/rr_01h455vb4pex5vsknk084sn02q/01h455vb4pex5vsknk084sn02t.zip?X-Amz-Signature=…",
  "expiresAt": "2026-08-02T09:30:00Z"
}

Notes

`key` is the `key` of a file in the request's `files` list (GET /portal/me/requests). The request must be the signed-in principal's own and the file must have been shared with them; a grievance id, someone else's request, an unknown key and an unshared file all return the same 404, so the endpoint never confirms that another principal's request or an unshared file exists. The link is presigned and expires after 5 minutes: request it when the person clicks, do not store it.

Status codes

  • 200 A presigned download URL.
  • 400 Request failed validation (empty `key`).
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId postPortalMeRequestFileDownload

GET

/portal/notices/{noticeVersionId}/body

auth: portal session

The archived notice snapshot for a version, portal-scoped

Parameters

Parameters for GET /portal/notices/{noticeVersionId}/body
NameInTypeRequiredDescription
noticeVersionIdpathstring (pattern ^ntv_[0-9a-hjkmnp-tv-z]{26}$)yesNotice version belonging to the session's property (any status).
langquerystring (pattern ^[a-z]{2,3}$)noLanguage of the snapshot.

Response

# 200 text/html
<!doctype html><html lang="hi"><body><h1>गोपनीयता सूचना</h1>...</html>

Notes

text/html, not JSON. This is the target of the snapshotUrl links in /portal/me/consents and /portal/me/history.

Status codes

  • 200 The rendered notice snapshot.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getPortalNoticeBody

POST

/portal/rights

auth: portal session

File a rights request as the signed-in principal (ACCESS/CORRECTION/ERASURE/NOMINATION)

Parameters

Parameters for POST /portal/rights
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoScoped to the signed-in principal, so a double submit files one request. Same key + same body replays the stored response; same key + different body is a 409.

Request

# request body — application/json
{
  "type": "ACCESS"
}

Response

# 201 application/json
{
  "id": "rr_01h455vb4pex5vsknk084sn02q",
  "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "externalId": "cust_8841",
  "type": "ACCESS",
  "status": "NEW",
  "details": {},
  "assigneeId": null,
  "dueAt": "2026-08-29T11:40:00Z",
  "statutoryDueAt": "2026-08-29T11:40:00Z",
  "resolutionNote": null,
  "attachments": null,
  "overdue": false,
  "createdAt": "2026-07-30T11:40:00Z",
  "updatedAt": "2026-07-30T11:40:00Z"
}

Values

  • type — ACCESS · CORRECTION · ERASURE · NOMINATION
  • status — NEW · VERIFYING · IN_PROGRESS · COMPLETED · REJECTED

Notes

Only `type` is required. `details` is checked per type and every other key is dropped: CORRECTION needs `description` (max 2000); NOMINATION needs `nomineeName` (max 200) and `nomineeContact` (max 320), with optional `relationship` (max 100); ERASURE takes an optional `reason` (max 2000); ACCESS takes none. The server adds `source: "PORTAL"`. Optional `language` (e.g. `hi`) is the language the principal reads the portal in, for the acknowledgement email; it defaults to the property's default language. The response carries BOTH dueAt (from the org's configured SLA window) and statutoryDueAt, plus a computed `overdue` boolean, and `externalId` — your own id for the principal, null when the principal has none or has been erased. Sends an acknowledgement email and emits rights.created.

Status codes

  • 201 The created rights request.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 409 Request conflicts with the current state of the resource (an Idempotency-Key reused with a different body).
  • 422 Well-formed but not permitted in the resource's current state.

Errors: application/problem+json · operationId postPortalRights

POST

/portal/grievances

auth: portal session

Raise a grievance as the signed-in principal (DPDP R7)

Parameters

Parameters for POST /portal/grievances
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoScoped to the signed-in principal. Same key + same body replays the stored response; same key + different body is a 409.

Request

# request body — application/json
{
  "subject": "Marketing emails continued after I withdrew consent",
  "body": "I withdrew consent for marketing emails on 30 July but received two more offers from your Bengaluru store."
}

Response

# 201 application/json
{
  "id": "grv_01h455vb4pex5vsknk084sn02q",
  "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "externalId": "cust_8841",
  "subject": "Marketing emails continued after I withdrew consent",
  "body": "I withdrew consent for marketing emails on 30 July but received two more offers from your Bengaluru store.",
  "status": "OPEN",
  "assigneeId": null,
  "dueAt": "2026-08-29T12:05:00Z",
  "resolutionNote": null,
  "overdue": false,
  "createdAt": "2026-07-30T12:05:00Z",
  "updatedAt": "2026-07-30T12:05:00Z"
}

Values

  • status — OPEN · IN_PROGRESS · RESOLVED · REJECTED

Notes

Grievance status uses OPEN/IN_PROGRESS/RESOLVED/REJECTED — a different enum from RightsRequest status. There is no statutoryDueAt on a grievance, only dueAt. `externalId` is your own id for the principal, null when the principal has none or has been erased. Optional request field `language` is the language the principal reads the portal in, for the acknowledgement email. Sends an acknowledgement email and emits grievance.created.

Status codes

  • 201 The created grievance.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 409 Request conflicts with the current state of the resource (an Idempotency-Key reused with a different body).
  • 422 Well-formed but not permitted in the resource's current state.

Errors: application/problem+json · operationId postPortalGrievances

Consent Manager interop

DPDP Rule 4 interop: a registered Consent Manager takes an OAuth client-credentials token, then records and reads consent for principals it identifies by pairwise id.

3 endpoints

POST

/cm/v1/token

auth: none

OAuth 2.0 client-credentials token for a CM registration (no session)

Request

# request body — application/json
{
  "clientId": "cmreg_01h455vb4pex5vsknk084sn02q",
  "clientSecret": "cms_9f2c4a7d5e2b48c06a1f9d3b7c5e2a80"
}

Response

# 200 application/json
{
  "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjbGVhcmRwLWNtIn0.sig",
  "tokenType": "Bearer",
  "expiresIn": 900
}

Notes

Not a standard form-encoded OAuth token endpoint: the body is JSON with camelCase clientId / clientSecret, and the response uses camelCase accessToken / tokenType / expiresIn (not access_token / token_type / expires_in). Returns 404 when CLEARDP_FF_CM_INTEROP is off.

Status codes

  • 200 Access token.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller) — also returned when CM interop is disabled.

Errors: application/problem+json · operationId postCmToken

POST

/cm/v1/consents

auth: Consent-Manager token

Record a CM-originated consent action (grant/deny/withdraw)

Request

# request body — application/json
{
  "action": "granted",
  "pairwiseId": "cm-pw-8f2b1c406a3d4c1e9b77",
  "purposeIds": [
    "marketing_email@v3"
  ],
  "language": "hi"
}

Response

# 200 application/json
{
  "status": "applied",
  "affectedPurposes": [
    "marketing_email@v3"
  ]
}

Values

  • action — granted · denied · withdrawn
  • status — applied · noop

Notes

The CM surface uses LOWERCASE action values (granted/denied/withdrawn) — unlike the uppercase GRANT/DENY/WITHDRAW of /v1. purposeIds are BRD ids of the form "key@vN" or bare purpose keys, and pairwiseId is 16-128 chars. Artifacts are written with method=CM and CM provenance. Returns 200 (applied or an idempotent noop), not 201.

Status codes

  • 200 The action was applied (or was an idempotent no-op).
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).
  • 422 Well-formed but not permitted in the resource's current state.

Errors: application/problem+json · operationId postCmConsents

GET

/cm/v1/principals/{pairwiseId}/consents

auth: Consent-Manager token

Read back our consent state for a principal (by pairwise id)

Parameters

Parameters for GET /cm/v1/principals/{pairwiseId}/consents
NameInTypeRequiredDescription
pairwiseIdpathstring (minLength 16, maxLength 128)yesThe CM-scoped pairwise id of the principal.

Response

# 200 application/json
{
  "pairwiseId": "cm-pw-8f2b1c406a3d4c1e9b77",
  "purposes": {
    "marketing_email@v3": "granted",
    "analytics_basic@v2": "withdrawn"
  }
}

Notes

purposes is a MAP, not an array: purposeId ("key@vN") → status, where status is one of "granted" | "denied" | "withdrawn" | "expired" (lowercase, and note "expired" appears here only).

Status codes

  • 200 Our current consent view for this principal.
  • 401 Missing or invalid credentials.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getCmPrincipalConsents

Guardian & children

Verifiable parental consent for child principals: start a guardian verification, poll its status, complete a COLLECT-style method, and list the children a portal guardian may act for.

4 endpoints

POSTauth: property API key

Start a guardian verification for a child principal

Parameters

Parameters for POST /v1/guardian-links
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoIdempotency key scoped to the property, TTL 24h.

Request

# request body — application/json
{
  "child": {
    "externalId": "child_44117",
    "isChild": true
  },
  "guardianContact": {
    "email": "rakesh.iyer@example.in",
    "phone": "+919845012345"
  },
  "verificationMethod": "DIGILOCKER"
}

Response

# 201 application/json
{
  "id": "gvl_01h455vb4pex5vsknk084sn02q",
  "childPrincipalId": "prn_01h455vb4pex5vsknk084sn02q",
  "verificationMethod": "DIGILOCKER",
  "status": "PENDING",
  "start": {
    "action": "REDIRECT",
    "redirectUrl": "https://api.cleardp.dev/guardian/redirect/gvl_01h455vb4pex5vsknk084sn02q"
  }
}

Values

  • verificationMethod — DIGILOCKER · VIRTUAL_TOKEN · MANUAL_DECLARATION
  • status — PENDING · VERIFIED · FAILED · EXPIRED
  • start.action — REDIRECT · COLLECT

Notes

Both child and guardianContact are required objects but their inner fields are all individually optional; child takes the same identity shape as a consent principal (externalId / anonymousId / email / phone / isChild / guardianRef). Until a child's link reaches VERIFIED, a GRANT for that child is refused 422 guardian-verification-required — DENY and WITHDRAW are never gated. A method not configured on the deployment is refused 422 guardian-method-unavailable. Returns 201.

Status codes

  • 201 The PENDING link plus what the guardian must do next.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Authenticated but not allowed (role matrix).
  • 404 Resource not found (or not visible to the caller).
  • 422 Well-formed but not permitted in the resource's current state (guardian-verification-required / guardian-method-unavailable).

Errors: application/problem+json · operationId postV1GuardianLinks

GETauth: property API key

Read a guardian link's verification status

Parameters

Parameters for GET /v1/guardian-links/{guardianLinkId}
NameInTypeRequiredDescription
guardianLinkIdpathstring (pattern ^gvl_[0-9a-hjkmnp-tv-z]{26}$)yesThe guardian link id.

Response

# 200 application/json
{
  "id": "gvl_01h455vb4pex5vsknk084sn02q",
  "childPrincipalId": "prn_01h455vb4pex5vsknk084sn02q",
  "verificationMethod": "DIGILOCKER",
  "status": "VERIFIED",
  "verifiedAt": "2026-07-30T13:11:52Z",
  "expiresAt": "2027-07-30T13:11:52Z"
}

Values

  • status — PENDING · VERIFIED · FAILED · EXPIRED
  • verificationMethod — DIGILOCKER · VIRTUAL_TOKEN · MANUAL_DECLARATION

Notes

Deliberately omits the guardian contact and the verificationRef (a third-party correlation handle) — a status poller needs neither.

Status codes

  • 200 The link's current status.
  • 401 Missing or invalid credentials.
  • 403 Authenticated but not allowed (role matrix).
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId getV1GuardianLink

POST

/v1/guardian-links/{guardianLinkId}/verify

auth: property API key

Submit a verification answer for a COLLECT-style method

Parameters

Parameters for POST /v1/guardian-links/{guardianLinkId}/verify
NameInTypeRequiredDescription
guardianLinkIdpathstring (pattern ^gvl_[0-9a-hjkmnp-tv-z]{26}$)yesThe guardian link id.

Request

# request body — application/json
{
  "declaration": {
    "accepted": true,
    "guardianName": "Rakesh Iyer"
  }
}

Response

# 200 application/json
{
  "id": "gvl_01h455vb4pex5vsknk084sn02q",
  "childPrincipalId": "prn_01h455vb4pex5vsknk084sn02q",
  "verificationMethod": "MANUAL_DECLARATION",
  "status": "VERIFIED",
  "verifiedAt": "2026-07-30T13:11:52Z",
  "expiresAt": "2027-07-30T13:11:52Z"
}

Notes

The body has no required fields and carries NO verificationMethod: the method is read from the stored link, never from the body, so a caller cannot downgrade to the weakest verifier. Send `token` (string) for VIRTUAL_TOKEN or `declaration` {accepted, guardianName — both required within the object} for MANUAL_DECLARATION. DIGILOCKER links complete at GET /guardian/callback instead (outside this surface).

Status codes

  • 200 The link's terminal status.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Authenticated but not allowed (role matrix).
  • 404 Resource not found (or not visible to the caller).
  • 409 Request conflicts with the current state of the resource.
  • 422 Well-formed but not permitted in the resource's current state.

Errors: application/problem+json · operationId postV1GuardianLinkVerify

GET

/portal/me/children

auth: portal session

Children this guardian is verified for

Response

# 200 application/json
{
  "items": [
    {
      "id": "prn_01h455vb4pex5vsknk084sn02q",
      "externalId": "child_44117",
      "guardianLinkId": "gvl_01h455vb4pex5vsknk084sn02q",
      "status": "VERIFIED",
      "verificationMethod": "DIGILOCKER",
      "verifiedAt": "2026-07-30T13:11:52Z",
      "expiresAt": "2027-07-30T13:11:52Z"
    }
  ]
}

Values

  • items[].status — PENDING · VERIFIED · FAILED · EXPIRED
  • items[].verificationMethod — DIGILOCKER · VIRTUAL_TOKEN · MANUAL_DECLARATION

Notes

Empty for an ordinary data principal. EXPIRED links are still listed (with a re-verify prompt) but do not grant access — acting on a child needs a live VERIFIED link, re-checked on every request.

Status codes

  • 200 The guardian's children.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId getPortalMeChildren

Erasure

Delegate callback for webhook connectors reporting the async result of an erasure task item.

1 endpoints

POST

/v1/erasure-callbacks/{taskItemId}

auth: property API key

Delegate callback — a webhook connector's async erase result (property API key)

Parameters

Parameters for POST /v1/erasure-callbacks/{taskItemId}
NameInTypeRequiredDescription
taskItemIdpathstring (pattern ^eti_[0-9a-hjkmnp-tv-z]{26}$)yesThe erasure task item this callback finalizes.

Request

# request body — application/json
{
  "status": "completed",
  "erasedCount": 42
}

Response

Response: none (202 has no response body).

Values

  • status — completed · failed

Notes

status is lowercase ("completed" | "failed"); send `error` (string) on failure and `erasedCount` (integer) on success. The 202 response has no body at all. Authenticated with the ordinary property API key, not a separate connector credential.

Status codes

  • 202 Callback accepted; the item is finalized and the task advances.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Authenticated but not allowed (role matrix).
  • 404 Resource not found (or not visible to the caller).
  • 409 Request conflicts with the current state of the resource.

Errors: application/problem+json · operationId postV1ErasureCallback

Mint the one-time signed link (and portal token) that a fiduciary backend hands to a Data Principal or to the browser SDK.

1 endpoints

POSTauth: property API key

Mint a single-use portal session link for a principal

Parameters

Parameters for POST /v1/portal-links
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoIdempotency key scoped to the property, TTL 24h.

Request

# request body — application/json
{
  "externalId": "user_98214"
}

Response

# 200 application/json
{
  "url": "https://privacy.example.in/#/session?token=eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJjbGVhcmRwLXBvcnRhbC1saW5rIn0.sig",
  "token": "eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJjbGVhcmRwLXBvcnRhbC1saW5rIn0.sig",
  "expiresAt": "2026-07-30T14:20:00Z"
}

Notes

SECRET keys only — a publishable pk_ key is refused with 403. The link opens the portal at /#/session?token=… (the token sits in the URL fragment, which the portal page exchanges once for a session). The schema marks nothing required, but you must supply exactly one of externalId (1-200 chars) OR principalId (^prn_...$). ttlSec is 30-900, default 900. Returns 200 (not 201). The returned `token` doubles as the principal.portalToken for browser-side consent capture: it is single-use for opening the portal, but is NOT consumed by consent calls, so it may accompany every consent POST within its TTL.

Status codes

  • 200 A one-time portal link.
  • 400 Request failed validation.
  • 401 Missing or invalid credentials.
  • 403 Authenticated but not allowed (role matrix) — includes publishable-key callers.
  • 404 Resource not found (or not visible to the caller).

Errors: application/problem+json · operationId postV1PortalLinks

System

Unauthenticated liveness and readiness probes, plus an API-key smoke test that echoes the authenticated property.

3 endpoints

GET

/healthz

auth: none

Liveness probe

Response

# 200 application/json
{
  "status": "ok",
  "version": "0.2.0"
}

Values

  • status — ok · ready

Notes

Only `status` is required; `version` is optional.

Status codes

  • 200 Process is alive.

Errors: application/problem+json · operationId getHealthz

GET

/readyz

auth: none

Readiness probe (Postgres reachable, job queue tables present)

Response

# 200 application/json
{
  "status": "ready",
  "version": "0.2.0"
}

Values

  • status — ok · ready

Notes

503 is the only failure code and is returned as application/problem+json.

Status codes

  • 200 Ready to serve traffic.
  • 503 Not ready.

Errors: application/problem+json · operationId getReadyz

GET

/v1/ping

auth: property API key

API-key smoke test — echoes the authenticated property

Response

# 200 application/json
{
  "ok": true,
  "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
  "mode": "LIVE"
}

Values

  • mode — LIVE · TEST

Notes

The cheapest way to confirm a key works and which property/mode (LIVE or TEST) it resolves to.

Status codes

  • 200 Key is valid.
  • 401 Missing or invalid credentials.

Errors: application/problem+json · operationId getV1Ping

Rights requests

Log a rights request a person made through another channel, and read where requests stand.

4 endpoints

POST

/v1/rights-requests

auth: property API key

Log a rights request received through another channel (secret key)

Parameters

Parameters for POST /v1/rights-requests
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoIdempotency key scoped to the property, TTL 24h.

Request

# request body — application/json
{
  "externalId": "user_98214",
  "type": "CORRECTION",
  "channel": "EMAIL",
  "details": {
    "description": "My surname is spelt Sharma, not Sarma."
  }
}

Response

# 201 application/json
{
  "id": "rr_01h455vb4pex5vsknk084sn02q",
  "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "externalId": "user_98214",
  "type": "CORRECTION",
  "status": "NEW",
  "details": {
    "source": "API",
    "channel": "EMAIL",
    "description": "My surname is spelt Sharma, not Sarma."
  },
  "dueAt": "2026-08-29T11:40:00Z",
  "statutoryDueAt": "2026-10-28T11:40:00Z",
  "resolutionNote": null,
  "overdue": false,
  "createdAt": "2026-07-30T11:40:00Z",
  "updatedAt": "2026-07-30T11:40:00Z"
}

Values

  • type — ACCESS · CORRECTION · ERASURE · NOMINATION
  • channel — EMAIL · PHONE · SUPPORT · IN_APP · POST · OTHER

Notes

For a request a person made by email, phone, support, in-app or post. The person must already exist on this property (they have a consent record under that externalId); an unknown one is refused with 422 and nobody is created. Recorded exactly as if filed in the privacy portal: same SLA clocks, acknowledgement email to the person and rights.created webhook, with the channel shown in the console. details takes the same keys as the portal (a CORRECTION's description, a NOMINATION's nomineeName / nomineeContact / relationship). Your team still verifies the person in the console before acting. The response omits your team's internal fields (assignee, files). Secret keys only; returns 201.

Status codes

  • 201 The created rights request.
  • 400 Request failed validation (including a missing required details field).
  • 401 Missing or invalid credentials.
  • 403 Publishable keys are refused.
  • 409 Idempotency-Key reuse with a different body.
  • 422 No principal with that externalId on this property.

Errors: application/problem+json · operationId postV1RightsRequests

GET

/v1/rights-requests

auth: property API key

List this property's rights requests, with filters (secret key)

Parameters

Parameters for GET /v1/rights-requests
NameInTypeRequiredDescription
statusquerystringnoNEW, VERIFYING, IN_PROGRESS, COMPLETED or REJECTED.
typequerystringnoACCESS, CORRECTION, ERASURE or NOMINATION.
externalIdquerystring (1-255)noOnly requests from the person with this external id (exact match).
limitqueryintegernoPage size.
cursorquerystringnoThe previous page's nextCursor.

Response

# 200 application/json
{
  "items": [
    {
      "id": "rr_01h455vb4pex5vsknk084sn02q",
      "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
      "principalId": "prn_01h455vb4pex5vsknk084sn02q",
      "externalId": "user_98214",
      "type": "CORRECTION",
      "status": "NEW",
      "details": {
        "source": "API",
        "channel": "EMAIL",
        "description": "My surname is spelt Sharma, not Sarma."
      },
      "dueAt": "2026-08-29T11:40:00Z",
      "statutoryDueAt": "2026-10-28T11:40:00Z",
      "resolutionNote": null,
      "overdue": false,
      "createdAt": "2026-07-30T11:40:00Z",
      "updatedAt": "2026-07-30T11:40:00Z"
    }
  ],
  "nextCursor": null
}

Notes

Newest first, cursor-paged, on the key's own property only. Another property's or organization's requests are never listed. Secret keys only.

Status codes

  • 200 One page of rights requests.
  • 400 Invalid status, type, limit or cursor.
  • 401 Missing or invalid credentials.
  • 403 Publishable keys are refused.

Errors: application/problem+json · operationId getV1RightsRequests

GET

/v1/rights-requests/{rightsId}

auth: property API key

Read one rights request and its status (secret key)

Parameters

Parameters for GET /v1/rights-requests/{rightsId}
NameInTypeRequiredDescription
rightsIdpathstringyesThe request id (rr_…).

Response

# 200 application/json
{
  "id": "rr_01h455vb4pex5vsknk084sn02q",
  "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
  "principalId": "prn_01h455vb4pex5vsknk084sn02q",
  "externalId": "user_98214",
  "type": "CORRECTION",
  "status": "NEW",
  "details": {
    "source": "API",
    "channel": "EMAIL",
    "description": "My surname is spelt Sharma, not Sarma."
  },
  "dueAt": "2026-08-29T11:40:00Z",
  "statutoryDueAt": "2026-10-28T11:40:00Z",
  "resolutionNote": null,
  "overdue": false,
  "createdAt": "2026-07-30T11:40:00Z",
  "updatedAt": "2026-07-30T11:40:00Z"
}

Notes

A request that is not on the key's property is a 404 whether it exists or not. Secret keys only.

Status codes

  • 200 The rights request.
  • 400 Malformed request id.
  • 401 Missing or invalid credentials.
  • 403 Publishable keys are refused.
  • 404 No such request on this property.

Errors: application/problem+json · operationId getV1RightsRequest

GET

/v1/principals/{ref}/rights-requests

auth: property API key

List a principal's rights requests and their status (secret key)

Parameters

Parameters for GET /v1/principals/{ref}/rights-requests
NameInTypeRequiredDescription
refpathstring (maxLength 320)yes`ext:<externalId>` or a `prn_<id>` principal id.
limitqueryintegernoPage size.
cursorquerystringnoThe previous page's nextCursor.

Response

# 200 application/json
{
  "items": [
    {
      "id": "rr_01h455vb4pex5vsknk084sn02q",
      "propertyId": "prop_01h455vb4pex5vsknk084sn02q",
      "principalId": "prn_01h455vb4pex5vsknk084sn02q",
      "externalId": "user_98214",
      "type": "CORRECTION",
      "status": "NEW",
      "details": {
        "source": "API",
        "channel": "EMAIL",
        "description": "My surname is spelt Sharma, not Sarma."
      },
      "dueAt": "2026-08-29T11:40:00Z",
      "statutoryDueAt": "2026-10-28T11:40:00Z",
      "resolutionNote": null,
      "overdue": false,
      "createdAt": "2026-07-30T11:40:00Z",
      "updatedAt": "2026-07-30T11:40:00Z"
    }
  ],
  "nextCursor": null
}

Notes

Newest first, cursor-paged: pass the previous page's nextCursor as cursor; nextCursor is null on the last page. Use it to show a person where their requests stand in your own account pages. Secret keys only.

Status codes

  • 200 The principal's rights requests.
  • 400 Malformed ref.
  • 401 Missing or invalid credentials.
  • 403 Publishable keys are refused.
  • 404 No such principal on this property.

Errors: application/problem+json · operationId getV1PrincipalRightsRequests

Breach incidents

The people a breach affects, so you can notify them through your own channels.

1 endpoints

GET

/v1/incidents/{incidentId}/affected-principals

auth: property API key

The people a breach affects on this property (secret key)

Parameters

Parameters for GET /v1/incidents/{incidentId}/affected-principals
NameInTypeRequiredDescription
incidentIdpathstring (pattern ^inc_…)yesThe incident, from incident.notify.
afterquerystringnoThe previous page's nextCursor.
limitqueryinteger (1-1000)noPage size; default 500.

Response

# 200 application/json
{
  "items": [
    {
      "principalId": "prn_01h455vb4pex5vsknk084sn02q",
      "externalId": "user_98214"
    }
  ],
  "nextCursor": "prn_01h455vb4pex5vsknk084sn02q"
}

Notes

incident.notify carries this path as affectedPrincipalsPath. Lists the affected principals on the calling key's property, keyset-paged by principal id; nextCursor is null on the last page. Erased principals are left out. An incident that does not touch the key's property, or a drill, is a 404. Secret keys only.

Status codes

  • 200 One page of affected principals.
  • 400 Malformed incidentId, cursor or limit.
  • 401 Missing or invalid credentials.
  • 403 Publishable keys are refused.
  • 404 Unknown incident, not on this property, or a drill.

Errors: application/problem+json · operationId getV1IncidentAffectedPrincipals

Start with proof, not promises

Accounts open soon: join the waitlist and we will write to you when yours can be created. The trial is 21 days, no card, starting on Growth. Or answer 8 questions and see your top-3 DPDP risks in 2 minutes.