aimldocs
ReferenceApi

Privacy

data-subject erasure and access (DPDP/GDPR)

POST
/v1/privacy/erasure
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/privacy/erasure" \  -H "Content-Type: application/json" \  -d '{    "user_id": "end-user-42"  }'
{  "id": "dsr_01J9ZK2K4Q7Q3M3QX1V0F1DSR1",  "kind": "erasure",  "subject_hash": "9f86d081884c7d65",  "status": "completed",  "records": 12,  "created_at": "2026-09-14T10:00:00Z",  "receipt": {    "records": 12,    "method": "index_deletion+link_scrub"  }}
POST
/v1/privacy/export
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/privacy/export" \  -H "Content-Type: application/json" \  -d '{    "user_id": "end-user-42"  }'
{  "object": "dsar_export",  "subject_hash": "9f86d081884c7d65",  "generated_at": "2026-09-14T10:00:00Z",  "count": 1,  "records": [    {      "request_id": "req_01J9ZK2K4Q7Q3M3QX1V0F1REQ1",      "ts": "2026-09-10 12:00:00.000",      "model": "openai/gpt-5-mini",      "tokens": 1200,      "cost_micro": 2500    }  ]}
GET
/v1/privacy/requests
AuthorizationBearer <token>

In: header

Query Parameters

cursor?string
limit?integer
Rangevalue <= 200

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/privacy/requests"
{  "object": "list",  "data": [    {      "id": "dsr_01J9ZK2K4Q7Q3M3QX1V0F1DSR1",      "kind": "erasure",      "subject_hash": "9f86d081884c7d65",      "status": "completed",      "records": 12,      "created_at": "2026-09-14T10:00:00Z"    }  ],  "next_cursor": ""}
GET
/v1/legal/breach-template
AuthorizationBearer <token>

In: header

Response Body

text/markdown

application/json

curl -X GET "https://example.com/v1/legal/breach-template"
"string"