> ## Documentation Index
> Fetch the complete documentation index at: https://docs.responsibleailabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DPDP: Evidence

> Generate audit-grade DPDP evidence packets: DSR responses, DPBI breach reports, CERT-In incident reports, consent audits, child protection audits, and SDF annual DPIA packs.

<Info>
  **Overview:** [Compliance API](/api-reference/compliance-overview) | **Credits:** 2.0 per call | **Tier:** Pro+
</Info>

Generates audit-grade evidence packets on demand. These documents are structured for regulatory submission and internal compliance audits.

<Warning>
  This endpoint requires a **Pro or higher** subscription tier. Calls from lower tiers return `403 TIER_INSUFFICIENT`.
</Warning>

## Parameters

<ParamField body="type" type="string" required>
  Evidence type to generate. See table below.
</ParamField>

<ParamField body="params" type="object" required>
  Type-specific parameters.
</ParamField>

## Evidence types

| Type                            | Description                                  | Required Params             |
| ------------------------------- | -------------------------------------------- | --------------------------- |
| `dsr_response`                  | Data Principal rights response packet        | `user_id`, `request_id`     |
| `breach_notification_dpbi`      | DPBI 72-hour detailed breach report (Rule 7) | `breach_id`                 |
| `breach_notification_principal` | Data Principal breach notification (S.8(6))  | `user_id`, `breach_id`      |
| `breach_notification_certin`    | CERT-In 6-hour incident report               | `breach_id`                 |
| `compliance_health`             | Compliance health dashboard data             | `window_days` (default: 30) |
| `consent_audit`                 | Full consent history for user or purpose     | `user_id` and/or `purpose`  |
| `child_protection_audit`        | Evidence that S.9 controls are active        | `window_days` (default: 30) |
| `sdf_annual_report`             | Annual DPIA + audit evidence pack (Rule 13)  | `year`                      |

## Request

```bash theme={null}
curl -X POST https://api.responsibleailabs.ai/railscore/v1/compliance/dpdp/evidence \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_RAIL_API_KEY" \
  -d '{
    "type": "compliance_health",
    "params": {
      "window_days": 30
    }
  }'
```

## Response: compliance\_health

```json theme={null}
{
  "result": {
    "evidence_id": "evd_xyz789012345",
    "type": "compliance_health",
    "generated_at": "2026-05-14T15:00:00+00:00",
    "window": {
      "start_date": "2026-04-14T15:00:00+00:00",
      "end_date": "2026-05-14T15:00:00+00:00",
      "window_days": 30
    },
    "dsr_stats": {
      "total_received": 23,
      "responded": 21,
      "in_progress": 0,
      "overdue": 2,
      "sla_compliance_rate": 91.3
    },
    "breach_stats": {
      "total_breaches": 0,
      "overdue_notifications": 0,
      "breach_timers": 0
    },
    "retention_stats": {
      "active_retention_timers": 150,
      "overdue_erasures": 0
    },
    "timer_summary": {
      "total_active": 173,
      "total_overdue": 2,
      "by_type": { "dsr_sla": 23, "erasure_execution": 150 }
    }
  },
  "credits_consumed": 2.0
}
```

## Response: dsr\_response

```json theme={null}
{
  "result": {
    "evidence_id": "evd_abc123def456",
    "type": "dsr_response",
    "generated_at": "2026-05-14T15:00:00+00:00",
    "request": {
      "request_id": "dsr_456",
      "type": "erasure",
      "received_at": "2026-05-10T10:00:00+00:00",
      "deadline": "2026-08-08T10:00:00+00:00",
      "days_remaining": 86,
      "status": "in_progress"
    },
    "data_summary": {
      "categories_held": ["pan", "income", "employment"],
      "purposes": ["credit_scoring"],
      "processors": ["credit_bureau_xyz"],
      "consent_history": [
        {
          "event": "consent.granted",
          "purpose": "credit_scoring",
          "timestamp": "2026-03-15T09:00:00+00:00"
        }
      ]
    },
    "erasure_status": {
      "requested": true,
      "executed": false,
      "categories_erased": [],
      "categories_remaining": ["pan", "income", "employment"]
    }
  },
  "credits_consumed": 2.0
}
```

<ResponseField name="result.evidence_id" type="string">
  Unique identifier for this evidence packet. Use for audit trail references.
</ResponseField>

<ResponseField name="result.type" type="string">
  The evidence type that was generated.
</ResponseField>

<ResponseField name="result.generated_at" type="string">
  ISO-8601 timestamp of when the evidence was generated.
</ResponseField>

<ResponseField name="credits_consumed" type="number">
  Always 2.0 for evidence generation.
</ResponseField>
