# Generate cited notices (10 document kinds)

PolicyGrain renders ten deterministic documents mapped to the DPDP Act 2023, DPDP Rules 2025, IT (SPDI) Rules 2011, Consumer Protection Act, and CERT-In directions.

## All 10 supported document kinds

Document types generated by modules/documents and modules/legal-corpus

| doc_type | Document | Primary statutory anchor |
| --- | --- | --- |
| privacy-notice | Privacy Notice | DPDP Act s.5(1), DPDP Rules r.3, SPDI r.4(1) |
| re-notice | Notice to Existing Users | DPDP Act s.5(2) |
| consent-notice | Consent Notice | DPDP Act s.5(1) & s.6(1) |
| short-notice | Just-in-Time Short Notice | DPDP Act s.5(1), SPDI r.5(3) |
| rights-grievance | Data Principal Rights & Grievance Page | DPDP Act ss.11–14, DPDP Rules r.9 & r.14 |
| cookie | Cookie & Tracker Notice | DPDP Act s.6(1) & s.6(4) |
| dpa | Data Processing Agreement | DPDP Act s.8(2) |
| terms | Terms of Service | IT (Intermediary Guidelines) Rules r.3(1) |
| aup | Acceptable Use Policy | IT Rules r.3(1)(b) |
| disclaimer | Legal & Platform Disclaimer | Consumer Protection (E-Commerce) Rules & CERT-In |

## Create a profile and submit answers

#### cURL

```bash
curl -X POST https://api.policygrain.com/v1/profiles \
  -H "Authorization: Bearer $POLICYGRAIN_API_KEY" \
  -H "Idempotency-Key: prof-init-1" \
  -H "Content-Type: application/json" \
  -d '{
    "answers": {
      "M-02": ["saas", "ai"],
      "M-04": "yes",
      "M-07": ["service_delivery", "account", "billing", "analytics"]
    },
    "fields": {
      "org.legal_name": "Example Private Limited",
      "org.website": "https://example.in",
      "officer.name": "Asha Menon",
      "officer.email": "grievance@example.in",
      "contact.privacy": "privacy@example.in"
    }
  }'
```

#### TypeScript SDK

```ts
const profile = await client.createProfile({
  answers: {
    "M-02": ["saas", "ai"],
    "M-04": "yes",
    "M-07": ["service_delivery", "account", "billing", "analytics"],
  },
  fields: {
    "org.legal_name": "Example Private Limited",
    "org.website": "https://example.in",
    "officer.name": "Asha Menon",
    "officer.email": "grievance@example.in",
    "contact.privacy": "privacy@example.in",
  },
});
```

## Start generation, check provenance and download

Call POST /v1/generations with your profile_id and poll GET /v1/generations/{id} until status is done. Fetch GET /v1/documents/{id}/versions/latest for JSON + full statutory provenance, or append ?format=html or ?format=md for standalone outputs.

Answer keys are question ids from GET /v1/questions (M-02, M-04, M-07, ...); field keys are the dotted legal-sources field ids (org.legal_name, officer.email, contact.privacy, ...). An answer can also be sent as {"value": ..., "source": "agent_inferred"}; the owner then confirms it before the document can be final.

> **Languages**: Generated documents are in English today. DPDP Act s.5(3) lets a Data Principal ask for a notice in English or any language in the Eighth Schedule to the Constitution; Hindi and the other Eighth Schedule languages are rolling out next. Each clause version records its pinned legal-sources commit hash.
