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

Children and guardian consent

A child's consent needs a verified guardian

Under the DPDP Act, consent for a child's data comes from a parent or lawful guardian, and you must be able to show it was verifiable. This page covers what ClearDP enforces, what you turn on, and what your site has to show the guardian.

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.

The rules

  • You decide who is a child. Under the Act a child is anyone under 18 (s.2(f)). The banner never asks a visitor's age; tell it with data-is-child="true" or setChild() (see the SDK guide), or send principal.isChild: true from your server. Once set, it cannot be unset through the API. To send a child to the page where a guardian verifies, set data-guardian-url on the script tag: the banner shows that link to a child whose consent is waiting (see SDK: Children).
  • Some purposes are never for children. A consent purpose with allowedForChildren: false is shown to a child but cannot be granted, and no guardian can change that (the Act bars tracking, behavioural monitoring and targeted advertising aimed at children: DPDP Act s.9(3)). A GRANT is refused with child-purpose-blocked.
  • Everything else waits for a guardian. A child's GRANT is refused with guardian-verification-required until a guardian link for them is VERIFIED and unexpired (24 months by default).
  • Refusing is never gated. DENY and WITHDRAW always work for a child.

Setting it up

In the console's setup guide, the purposes step ends with an optional Children block. Answer Yes, they can to see the consent purposes no guardian can unlock, which verification methods your deployment offers, and (as an Admin) switch manual declaration on. To offer a purpose to children, give it a new version with Allowed for children ticked.

Verification methods

Guardian verification methods
MethodWhat the guardian doesHow it is turned on
DIGILOCKERIs redirected to DigiLocker and signs in; the result comes back to ClearDP on its own.Configured by whoever runs the deployment (CLEARDP_GUARDIAN_DIGILOCKER_ENDPOINT, _CLIENT_ID, _CLIENT_SECRET). On the managed service, ask support.
VIRTUAL_TOKENEnters a token issued to them by a token provider; your server submits it.Configured by the deployment (CLEARDP_GUARDIAN_VT_ENDPOINT).
MANUAL_DECLARATIONReads a declaration that they are the child's parent or lawful guardian, ticks it, and types their name.Off by default. An Admin turns it on with Allow manual declaration in the setup guide's Children block, or Allow manual guardian declaration in Settings. Every use is written to the audit log.

Your organization's settings report which of the first two are available as guardianMethodsAvailable. Asking for one that is not gets guardian-method-unavailable.

Verifying a guardian

  1. Start a guardian link from your server

    With a secret key, name the child and how to reach the guardian, and pick a method. The answer says what happens next.

    // Your server, once you know the user is a child (a date of birth at sign-up, say).
    const r = await fetch('https://api.cleardp.in/v1/guardian-links', {
      method: 'POST',
      headers: {
        Authorization: 'Bearer ' + process.env.CLEARDP_SECRET_KEY,
        'Content-Type': 'application/json',
        'Idempotency-Key': crypto.randomUUID(),
      },
      body: JSON.stringify({
        child: { externalId: child.id, isChild: true },
        guardianContact: { email: guardian.email },
        verificationMethod: 'DIGILOCKER', // or 'VIRTUAL_TOKEN', 'MANUAL_DECLARATION'
      }),
    });
    const link = await r.json();
    // link.start.action === 'REDIRECT': send the guardian to link.start.redirectUrl
    // link.start.action === 'COLLECT':  collect the answer from the guardian (below)
  2. Let the guardian verify

    REDIRECT (DigiLocker): send the guardian to start.redirectUrl; the link completes when they come back. COLLECT (virtual token, manual declaration): show the guardian a page of your own, then submit what they entered. The guardian completes this page, never the child, and the method comes from the link: the request cannot switch to a weaker one.

    // The GUARDIAN fills this in, on a page you show them (not the child).
    await fetch('https://api.cleardp.in/v1/guardian-links/' + link.id + '/verify', {
      method: 'POST',
      headers: {
        Authorization: 'Bearer ' + process.env.CLEARDP_SECRET_KEY,
        'Content-Type': 'application/json',
      },
      // VIRTUAL_TOKEN: the token your token issuer gave the guardian
      //   body: JSON.stringify({ token })
      // MANUAL_DECLARATION: the guardian's own declaration and typed name
      body: JSON.stringify({ declaration: { accepted: true, guardianName: typedName } }),
    });
  3. Check the status

    GET /v1/guardian-links/{id} answers PENDING, VERIFIED, FAILED or EXPIRED. The banner reads guardianVerified on the child and lets them grant once it is true. A verified guardian also sees the child in their privacy portal and can manage the child's consent there.

Errors

Child-consent errors
Problem typeMeansWhat to do
child-purpose-blockedA child tried to grant a purpose not allowed for children.Nothing a guardian can fix. Do not offer it, or allow it for children in a new purpose version.
guardian-verification-requiredA child's GRANT before any verified, unexpired guardian link.Start or renew a guardian link, then ask again.
guardian-method-unavailableThe method is not configured on this deployment, or manual declaration is off.Pick an available method (see guardianMethodsAvailable).
guardian-contact-requiredPOST /v1/guardian-links without a guardian email or phone.Send the guardian's email or phone.
guardian-callback-required/verify was called on a DigiLocker link, which completes through its redirect, not this call.Send the guardian through the redirectUrl instead.

All are 422 application/problem+json. Calling /verify on a link that is already verified, failed or expired returns 409 conflict. The full request and response shapes are in the API reference.

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.