Technical Guide

DPDP for AI Developers

India's Digital Personal Data Protection Act comes into full enforcement in 2027. Every Section mapped to what your AI system must actually do — in code.

Last updated June 2026·20 min read·DPDP Act 2023 + Rules 2025

What is DPDP?

The Digital Personal Data Protection Act, 2023 (DPDP) is India's comprehensive data privacy law. It governs how "Data Fiduciaries" — any entity that determines the purpose and means of processing personal data — may collect, use, and protect personal data of Indian citizens.

The DPDP Rules, 2025 operationalise the Act. The Data Protection Board of India (DPBI) will begin enforcement on May 13, 2027 — but BFSI companies are already subject to the RBI FREE AI Framework, which has immediate obligations.

DPDP ≠ GDPR. India's law has significant differences: no "legitimate interest" basis, no right to data portability, no DPO requirement for most entities, and consent must be "free, specific, informed, unconditional, and unambiguous" — not implied or bundled.

Who is affected?

If your AI system processes any personal data of Indian residents — names, Aadhaar numbers, PAN, mobile numbers, financial data, health records, biometrics — you are a Data Fiduciary under DPDP, regardless of where your servers are.

AI systems are particularly exposed because they process personal data at every step: in the prompt (user input), in tool calls (database queries, API calls), in the LLM inference layer, and in the response. Most LLM frameworks today have no guardrails for any of these.

The 5 core obligations for AI systems

1
Consent before processing
§6
2
Purpose limitation
§8(1)
3
Data minimisation + redaction
§8(3)
4
Audit trail of every data touch
§8(6)
5
DPIA for high-risk AI
§33

Consent under DPDP must be free, specific, informed, unconditional, and unambiguous. It cannot be bundled with terms of service or implied from silence. Consent notices must specify the exact personal data being collected, the purpose, and how to exercise rights.

What this means for AI systems

Before your AI agent processes a customer's Aadhaar, PAN, financial records, or any other personal data, you must have a recorded consent for that specific purpose. Consent for "loan processing" does not cover using the same data for "marketing."

python
from svitch_tracer import SvitchTracer

# WRONG — no consent check before processing
def process_loan(customer_id, aadhaar, pan):
    return llm.chat(f"Assess loan for {aadhaar}, PAN {pan}")

# CORRECT — verify consent first
from consent_ledger import ledger as L

def process_loan(customer_id, aadhaar, pan):
    valid, reason, _ = L.verify(consent_id)
    if not valid:
        raise PermissionError(f"Cannot process: {reason}")

    # Now safe to proceed — consent is verified
    tracer = SvitchTracer(agent_id="loan-processor")
    with tracer.run() as run:
        run.data_access(
            source="customer_profile",
            fields_accessed=["aadhaar", "pan"],
            purpose="loan_processing",
            data_principal_id=customer_id,
        )
        # ... rest of processing

§6(5) — Withdrawal must be as easy as granting

Data principals can withdraw consent at any time. Your system must honour withdrawal immediately and stop all processing for that purpose. The withdrawal itself must be recorded — but the original grant record must also be preserved as proof it existed.

Svitch's Consent Ledger uses an append-only, hash-chained record design: withdrawals are new records linked to the original — so you can prove both that consent existed and that it was withdrawn, without either record being mutable. Try it →

§8 — Data Fiduciary obligations

§8(1) — Purpose limitation

Personal data collected for one purpose cannot be used for another without fresh consent. An AI agent that collects Aadhaar for KYC cannot then use it for credit scoring unless the user consented to both purposes explicitly.

§8(3) — Data minimisation

Collect only what is necessary. For AI systems, this means your prompts and context windows should contain only the personal data fields required for the current task. Passing an entire customer record to an LLM when only the credit score is needed violates §8(3).

python
# WRONG — entire record including Aadhaar, DOB, address in prompt
prompt = f"Review application: {json.dumps(full_customer_record)}"

# CORRECT — only the fields this step needs
prompt = f"""
Review loan application.
Credit score: {credit_score}
Income band: {income_band}
Employment type: {employment_type}
Requested amount: {loan_amount}
"""
# Aadhaar, PAN, address never enter the prompt

§8(6) — Accuracy and completeness

Data used for AI decisions must be accurate. If your agent makes a credit decision on stale data, you are liable for the inaccuracy. Build periodic data freshness checks into any agent that makes automated decisions about individuals.

§8(7) — Grievance redressal

You must publish contact details for a Data Protection Officer (or equivalent contact) and respond to grievances within a defined period. For AI-driven decisions, this means a human must be reachable to explain any automated outcome to the affected person.

§12–14 — Data Principal rights

§12
Right to access
What data you hold, how it is processed, who it was shared with
§13
Right to correction
Correct inaccurate or incomplete personal data
§14
Right to erasure
Delete data when purpose is fulfilled or consent withdrawn
§12
Right to grievance
Human escalation path for any AI-driven decision

For AI systems, rights fulfilment requires knowing exactly what data you processed, when, and for what purpose — which is exactly what a structured audit trail provides. Without it, a §12 access request becomes an engineering emergency.

§33 — Data Protection Impact Assessment

A DPIA is mandatory before deploying any processing activity likely to result in "high risk" to data principals. The DPDP Rules 2025 identify the following AI use cases as requiring a DPIA:

Automated credit scoring or loan decisions
AI-driven fraud detection systems
Health risk assessment using personal data
Profiling for targeted advertising
Any biometric processing
Large-scale processing of sensitive personal data

A DPIA must cover: description of processing activities, necessity and proportionality, risks to data principals, and mitigating measures. It must be reviewed and updated whenever the processing changes significantly.

Svitch's Compliance Engine auto-generates a DPDP DPIA by pulling your actual processing activities from the Agent Tracer — no manual questionnaire filling. A compliant report in under 10 minutes. Generate a DPIA →

Implementation: PII Detection and Redaction

Indian personal data includes entity types that no global PII library covers correctly. Aadhaar numbers appear in masked (XXXX-XXXX-1234) and unmasked (1234-5678-9012) forms. UPI IDs follow a handle@provider format. IFSC codes are 11-character bank identifiers. Indian mobile numbers range from 6xxx to 9xxx with regional variance.

python
# Install: pip install svitch
from svitch import Svitch
from openai import OpenAI

# One line — wraps any LLM provider
client = Svitch.wrap(OpenAI())

# PII is automatically detected and redacted before
# the prompt reaches OpenAI's servers
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{
        "role": "user",
        # Aadhaar and PAN are redacted before this leaves your network
        "content": "Assess loan for Aadhaar 9876 5432 1098, PAN ABCDE1234F"
    }]
)

# response.choices[0].message.content contains:
# "Assess loan for [AADHAAR_IN], [PAN_IN]"
# Original values never reached the LLM API
python
# Direct detection (without wrapping a client)
import requests

res = requests.post("https://service-sage-mu.vercel.app/detect", json={
    "text": "Customer UPI: ravi@okhdfc, mobile 9876543210",
    "mode": "redact"
})

# {
#   "redacted": "Customer UPI: [UPI_IN], mobile [MOBILE_IN]",
#   "entities": [
#     {"type": "UPI_IN",    "value": "ravi@okhdfc",  "start": 14, "end": 25},
#     {"type": "MOBILE_IN", "value": "9876543210",   "start": 34, "end": 44}
#   ],
#   "pii_found": true,
#   "processing_ms": 38
# }

Supported Indian PII types

AADHAAR_IN
Masked + unmasked
PAN_IN
ABCDE1234F format
UPI_IN
handle@provider
MOBILE_IN
6xxx–9xxx prefixes
IFSC_IN
11-char bank codes
BANK_ACCOUNT_IN
9–18 digit accounts
GST_IN
22AAAAA0000A1Z5
EMAIL
RFC 5322 compliant
IPV4
IPv4 addresses

A DPDP-compliant consent record needs: the data principal's (hashed) identity, the exact purpose, which data categories are covered, the consent version they agreed to, the channel (web/app/branch), and a timestamp. Every record must be independently verifiable — a regulator should be able to verify consent without trusting your word.

python
import requests

LEDGER = "https://consent-ledger-kappa.vercel.app"

# Grant consent (e.g. before starting KYC)
res = requests.post(f"{LEDGER}/consent/grant", json={
    "data_principal_id": "CUST-5821",     # hashed before storage
    "purpose": "kyc_verification",
    "data_categories": ["AADHAAR_IN", "PAN_IN", "MOBILE_IN"],
    "legal_basis": "explicit_consent",
    "version": "2.1",                     # consent notice version
    "channel": "mobile_app",
    "ip_address": "103.21.45.67",         # hashed before storage
})

consent = res.json()
consent_id = consent["consent_id"]       # store this

# Verify before each data access
verify = requests.get(f"{LEDGER}/consent/{consent_id}/verify").json()
if not verify["valid"]:
    raise PermissionError(verify["reason"])

# Withdraw (e.g. user taps "withdraw consent" in app)
requests.post(f"{LEDGER}/consent/{consent_id}/withdraw")
# Original grant record is preserved — only a new withdrawal record is added

The consent ledger uses SHA-256 Merkle chaining — each record hashes the previous record's hash. This means tampering with any record breaks the chain, giving regulators independent verifiability without accessing your database.

Implementation: Agent Audit Trail

DPDP §8(6) requires you to maintain records of processing activities. For AI agents, this means every LLM call, every tool call, every decision, and every data access must be logged in a tamper-evident, queryable audit trail.

This is harder than it sounds with LLM agents — they can touch personal data at any step, across multiple tools, without the developer being explicitly aware. The audit trail must be automatic, not opt-in.

python
from svitch_tracer import SvitchTracer

tracer = SvitchTracer(agent_id="fraud-detector-v2")

with tracer.run() as run:
    # Every call is hash-chained and tamper-evident

    run.data_access(
        source="transactions_db",
        fields_accessed=["amount", "counterparty_upi", "timestamp"],
        purpose="fraud_detection",
        data_principal_id="CUST-9921",
    )

    run.llm_call(
        provider="openai",
        model="gpt-4o",
        prompt=prompt_with_redacted_data,
        response=llm_response,
        redact_pii=True,          # PII redacted before logging
    )

    run.decision(
        reason="Transaction velocity exceeded threshold",
        outcome="flag_for_review",
        confidence=0.91,
    )

    # Human-in-the-loop checkpoint (RBI FREE Framework requirement)
    run.human_checkpoint(
        question="Confirm fraud flag for transaction TXN-9921?",
        approved=True,
        reviewer_id="anand.k",
    )

# Verify the chain is intact at any time
valid, err = run.verify()
assert valid, f"Audit chain compromised: {err}"

The audit trail can be queried to answer any regulator question: "What did your agent do with customer X's data between date A and date B?" — answered in seconds, not weeks.

Implementation: Automated DPIA Generation

A manual DPIA typically takes 6–10 weeks of legal and compliance work. Svitch generates a compliant DPDP DPIA in under 10 minutes by reading your actual processing telemetry and populating the required 7 sections automatically.

python
import requests

COMPLIANCE = "https://compliance-engine-18cdqy9ud-koushik-narendars-projects.vercel.app"

report = requests.post(f"{COMPLIANCE}/report/dpdp-dpia", json={
    "org_id": "acme-fintech",
    "period_start": "2026-04-01",
    "period_end": "2026-06-30",
    "telemetry": {
        "agent_runs": 2840,
        "pii_detections": 4120,
        "consents_collected": 8950,
        "consents_withdrawn": 142,
        "human_reviews": 310,
        "purpose_list": ["loan_processing", "kyc_verification", "fraud_detection"],
        "data_categories": ["AADHAAR_IN", "PAN_IN", "MOBILE_IN", "BANK_ACCOUNT_IN"],
    }
}).json()

print(f"Report ID: {report['report_id']}")
print(f"Score:     {report['overall_score']}/100")
print(f"HTML:      {COMPLIANCE}/report/{report['report_id']}/html")
The generated report covers all 7 DPDP DPIA sections: processing description, data categories, retention periods, consent records, risk assessment, safeguards, and Records of Processing Activities (RoPA). Generate your DPIA →

Penalties

The DPDP Act specifies financial penalties per breach. Unlike GDPR, there is no percentage-of-revenue calculation — these are absolute amounts.

₹250 CrFailure to implement reasonable security safeguards (§8(5))
₹200 CrFailure to notify DPBI of a data breach (§8(5))
₹200 CrNon-compliance with obligations for processing children's data (§9)
₹150 CrFailure to comply with additional obligations for Significant Data Fiduciaries
₹50 CrViolation of data principal rights or consent requirements
₹10 CrOther violations including inadequate grievance redressal
Repeated violations can result in the DPBI suspending your ability to process personal data — which would halt operations entirely for AI-driven products.

Enforcement timeline

Aug 2023DPDP Act passed by Parliament
Jan 2025DPDP Rules 2025 notified
NowRBI FREE AI Framework active — BFSI must comply
May 2027DPBI begins enforcement — penalties become live
Nov 2027Significant Data Fiduciary obligations kick in

Compliance checklist for AI systems

Use this as a technical readiness checklist before deploying any AI system that processes personal data of Indian residents.

Consent

Consent is collected before any personal data is processed
Consent records include: purpose, data categories, version, channel, timestamp
Consent can be withdrawn at any time through the same channel it was granted
Withdrawal is recorded but does not delete the original grant (needed for audit)
Each consent is independently verifiable without trusting your database

PII Detection

All Indian PII types are detected: Aadhaar, PAN, UPI, IFSC, mobile, bank account, GST
PII is redacted from LLM prompts before they leave your network
PII is redacted from LLM responses before they are stored or displayed
Detection happens at <80ms latency (synchronous, in-path)
PII detections are logged for audit (type, not value)

Audit trail

Every agent run records: data accessed, tools called, LLM calls, decisions made
Audit records are hash-chained (tampering breaks the chain)
Human-in-the-loop checkpoints are recorded for high-risk decisions
The audit trail can answer: "what did this agent do with customer X's data?"
Audit records are retained for the DPDP-required period

DPIA

A DPIA exists for every AI system making automated decisions about individuals
The DPIA covers all 7 required sections under DPDP Rules 2025
The DPIA is updated whenever the AI system or processing changes significantly
RoPA (Records of Processing Activities) is maintained and queryable

Rights fulfilment

A process exists to respond to §12 access requests within the mandated period
A process exists to honour §14 erasure requests
A grievance contact is published and monitored
All AI-driven decisions on individuals have a human escalation path
Automate your DPDP compliance
PII Shield, Consent Ledger, Agent Tracer, and DPIA generation — deployed and running. Open the dashboard to see it in action.
Open Dashboard →View on GitHub