Step 4: Prepare the Consent Request
A consent request tells IndiaConsent which consent notice to show and to whom. The notice itself (service, company details, languages, purposes, data categories and retention) is created and published once in the IndiaConsent dashboard; each request only refers to it.
1. Create and publish a consent notice
In the dashboard, open Consent Notices:
- Create a notice for your service (one notice per service or flow).
- Add your company details, the languages you offer, and the purposes you ask consent for, with their data categories and retention.
- Check the live preview, then Publish version.
Every publish creates a new, numbered version. A published version never changes, so a consent request that uses it always shows the Data Principal exactly what you published.
2. Download the example request
On the notice, click Download example request (or, in History, Example request for a particular version). You get a request like this:
{
"requestId": "3c14b629-ae66-48f1-b5d7-cafc2078c1a4",
"notice": {
"noticeId": "c6808a21-3e86-4d9a-9de5-a849b427f5c6",
"version": 3
},
"dataPrincipal": {
"dpHash": "68fb2ced2daaf430ebd5c9eb",
"subjectType": "ADULT"
}
}
Your backend fills in, per request:
requestId: your unique reference for this request. Sending the samerequestIdagain returns the request already created (idempotency).dataPrincipal.dpHash: the Data Principal's hash. Do not send any Data Principal PII.dataPrincipal.subjectType:ADULT(default if omitted) orMINOR.dataPrincipal.delegation: for a minor,{"required": true, "type": "PARENT"}routes the request to a verified parent or guardian.PARENTis the only supported type.
And keeps, from the example:
notice.noticeId: the notice to show.notice.version: optional. With a version, the request always uses that version (useful for a gradual rollout). Without it, IndiaConsent uses the notice's current published version at the moment the request is created. The response tells you which version was used.
The fiduciary is identified by your access token (Step 3); it is not part of the request.
📄 Consent Request JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://www.indiaconsent.com/schema/consent-request-v1.json",
"title": "ConsentRequest",
"description": "A Data Fiduciary asks the Consent Manager to collect consent for one Data Principal, using a consent notice published in the Consent Manager (Consent Notices screen). The notice version supplies everything the Data Principal sees: service, company details, languages, purposes, data categories and retention. The fiduciary is the caller of the API (its access token).",
"type": "object",
"additionalProperties": false,
"required": [
"requestId",
"notice",
"dataPrincipal"
],
"properties": {
"requestId": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "Unique ID for this consent request, generated by the Data Fiduciary (idempotency key)."
},
"notice": {
"type": "object",
"additionalProperties": false,
"required": [
"noticeId"
],
"properties": {
"noticeId": {
"type": "string",
"minLength": 1,
"maxLength": 36,
"description": "The notice's id, shown on the notice screen and in its example request."
},
"version": {
"type": "integer",
"minimum": 1,
"description": "Optional: a published version of the notice. Omitted = the notice's current published version when the request is created. The version used is returned in the response."
}
}
},
"dataPrincipal": {
"type": "object",
"additionalProperties": false,
"required": [
"dpHash"
],
"properties": {
"dpHash": {
"type": "string",
"minLength": 1,
"description": "DF-generated pseudonymous hash for the Data Principal."
},
"subjectType": {
"type": "string",
"enum": [
"ADULT",
"MINOR"
],
"default": "ADULT",
"description": "Whether the DF asserts this Data Principal is an adult or a minor. Optional; defaults to ADULT."
},
"delegation": {
"type": "object",
"additionalProperties": false,
"description": "For a minor: whether the request must go to a verified parent or guardian.",
"properties": {
"required": {
"type": "boolean",
"description": "Whether CM must route this request to a verified guardian before it can be viewed or actioned."
},
"type": {
"type": "string",
"enum": [
"PARENT"
],
"description": "Only PARENT is supported in this release."
}
}
}
}
}
}
}
⚠️ Validation
A request is rejected with 400 Bad Request when:
- it doesn't match the schema; fields the schema doesn't define are rejected too, including
content,service,fiduciary,versionandsupersedesPreviousfrom the earlier request format (the message lists every problem); - the notice doesn't exist for your account;
- the notice has never been published, or the requested version isn't published;
- the notice is archived.
🔒 Security Considerations
- Build and send the request from your backend, never from a frontend or mobile app.
- Do not put Data Principal PII anywhere in the request; send only the DP hash.
➡ Next Step
In the next step, you will attach your Access Token and call the Consent Creation API with this request.