Endpoint
Authentication
Requires a developer API key in theAuthorization header.
Request Headers
| Header | Value |
|---|---|
Authorization | Bearer <api_key> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
principalId | string | Yes | The data principal requesting erasure |
Example Request
Response — 201 Created
Response Fields
| Field | Type | Description |
|---|---|---|
requestId | string | Erasure request reference number (format: ER-YYYY-NNNNN) |
dataPrincipalId | string | The data principal whose data was erased |
status | string | Request status: completed |
recordsErased | number | Number of consent records marked as erased |
grantsRevoked | number | Number of grants revoked as part of erasure |
submittedAt | string | ISO-8601 timestamp of the erasure request |
expectedCompletionBy | string | ISO-8601 timestamp for full completion (7 days from submission) |
What Happens on Erasure
- All consent records for the data principal are set to
status: 'erased' - All associated grants are revoked
- Audit entries are annotated with an
erasedAttimestamp (anonymized) - A
dpdp.erasure.completedevent is emitted
Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 404 | NOT_FOUND | No consent records found for this data principal |