Appearance
DSAR Management
A Data Subject Access Request (DSAR) is a privacy request from an individual to access or delete personal data your organization processes through GhostAI. GhostAI supports workflows aligned with GDPR Article 15 (right of access / data portability style exports) and Article 17 (right to erasure).
What DSAR covers here
- Subject export — Produce an export of data associated with a subject identifier (for example, a user or customer key your org uses consistently across systems).
- Erasure — Execute a right-to-erasure run for that subject within the organization’s scope, with an explicit confirmation step so accidental deletes are harder.
Operational review and packaging for full “DSAR packages” may also use related PII flows; the subject-based APIs below are the primary automation hooks.
Triggering a subject export
Call POST /api/pii/dsar/subject-export with a JSON body that identifies the data subject:
| Field | Required | Description |
|---|---|---|
subject_identifier | Yes | Non-empty string identifying the data subject. |
org_id | No | Organization scope; defaults to the authenticated user’s organization when omitted. |
The response includes data_locations, record_count, and exported_at, summarizing what was located and exported for audit and fulfillment.
Authentication uses the standard user session; DSAR actions are logged for compliance traceability.
Erasure workflow (confirm=true)
Erasure is a destructive operation. The API requires an explicit acknowledgment:
- Request body field
confirmmust betrue. - If
confirmis missing orfalse, the API returns 400 with a message that erasure requiresconfirm=trueand that the action is irreversible.
Body fields:
| Field | Required | Description |
|---|---|---|
subject_identifier | Yes | Non-empty string identifying the data subject. |
org_id | No | Organization scope; defaults to the authenticated user’s organization when omitted. |
confirm | Yes (value) | Must be true to proceed. |
Irreversibility
Right-to-erasure execution permanently removes associated records within the system’s scope. There is no undo. Validate the subject identifier and organizational scope before setting confirm=true.
Viewing proof hashes
After a successful erasure, POST /api/pii/dsar/erasure returns a DSARErasureResponse that includes:
records_deleted— Count of records removed.proof_hashes— Cryptographic hashes you can retain as evidence that a deletion run completed (for audits, DPIAs, or regulatory follow-up). Store and handle these according to your retention policy.
The response also includes executed_at (ISO timestamp).
API reference
| Method | Path | Purpose |
|---|---|---|
POST | /api/pii/dsar/subject-export | Export all data associated with a subject identifier (Article 15–style access). |
POST | /api/pii/dsar/erasure | Execute right-to-erasure for a subject (Article 17); requires confirm: true. |
For interactive DSAR package export (download-oriented flows), the backend also exposes POST /api/pii/dsar/export — see the main PII / DSAR router documentation for details.