Concept: India DPDP guide | SDK: Python DPDP | Frameworks: Compliance overview
scan, add session and emit when you need stateful tracking, and reach for evidence at audit time.
Two ways to run DPDP
RAIL ships the same DPDP capability on two paths with opposite data-flow guarantees. This page documents the hosted API.Hosted (this API)
Your application sends content to
api.responsibleailabs.ai. Multi-tenant, org-scoped, billed per call. Everything on this page runs here.Enterprise self-hosted
The RAIL agent runs inside your own VPC or air-gapped environment; content never leaves your infrastructure. The same seven endpoints are mirrored there for single-tenant, licensed deployments.
The seven endpoints
| Endpoint | Method | Credits | What it does |
|---|---|---|---|
/scan | POST | 0.5 | Detect Indian PII (Aadhaar with Verhoeff checksum, PAN, UPI, mobile, and 6 more), child signals (S.9), and purpose drift (S.4). Detect, mask, or block. |
/evaluate | POST | 0.3 | Deterministic allow / block / require_action gate for an action, mapped to DPDP S.4–S.16. |
/emit | POST | 0.1 | Record 1–50 compliance events (consent, notice, DSR, breach). Auto-starts regulatory timers. |
/require | POST | 0.3 | List the required actions for a given workflow step. |
/evidence | POST | 2.0 | Generate an audit-grade evidence packet (DSR response, breach notification, consent audit, SDF annual report). Pro+ plans. |
/session | POST | 0 | Create or retrieve a stateful compliance session for one data-principal journey. |
/timers | GET | 0 | List regulatory deadline timers, filtered by status, type, or how soon they are due. |
How the pieces fit together
A typical integration threads a single session through the user’s journey. Events youemit mutate the session state and start the statutory timers; scan and evaluate make in-the-moment decisions; evidence reads the accumulated trail when an auditor or regulator asks.
Response envelope
Every endpoint returns the same two-key envelope.result holds the endpoint-specific payload; credits_consumed reports what the call cost.
Authentication
All routes require a Bearer token — an API key (rail_...) or a JWT. Pass it on every request:
A complete walkthrough
The flow below tracks one loan-application journey end to end. It uses curl; the Python SDK mirrors every call asclient.dpdp.*.
Open a session
A session ties events, scans, and timers to one data-principal journey. The response returns a
config.purpose is required.session_id you reuse on later calls.Record notice and consent
emit writes the events that later prove you met your notice (S.5) and consent (S.6) obligations.Scan content for Indian PII
Before storing or sending model output, scan it.
pii_action can detect, mask, or block.Gate the decision
evaluate returns a deterministic verdict for the action you are about to take.verdict of require_action tells you to call /require for the outstanding obligations.Errors
DPDP routes use standard HTTP status codes. Validation problems return400 with an error message; evidence on a plan below Pro returns 403 with code: TIER_INSUFFICIENT.
Where to go next
India DPDP guide
The concepts behind the suite: obligations, lifecycle, and which endpoint maps to which section of the Act.
Python SDK: DPDP
Every endpoint as a typed
client.dpdp.* method, plus client-side PII scanning and the system audit.Scan endpoint
Indian PII detection, child signals, and purpose drift in detail.
Evidence endpoint
Audit-grade packets for DSR, breach, consent, and SDF reporting.