Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
The GDPR Erasure API permanently deletes all records associated with a specific customer across all data tables. This supports GDPR Article 17 (right to erasure). The deletion runs inside a single database transaction to ensure atomicity. Admin only.
Base path
Erase customer data
POST /api/v1/gdpr/erasure
Permanently deletes all data linked to a customer ID within the tenant. The operation is transactional — if any table deletion fails, the entire operation is rolled back.
Request body
| Field | Type | Required | Description |
|---|
customerId | string | Yes | The customer identifier to erase all data for. |
Example request
curl -X POST https://playground.kaireonai.com/api/v1/gdpr/erasure \
-H "Content-Type: application/json" \
-H "X-Tenant-Id: my-tenant" \
-H "X-User-Role: admin" \
-d '{ "customerId": "cust_12345" }'
Response 200
{
"success": true,
"customerId": "cust_12345",
"deletedCounts": {
"interactionHistory": 47,
"interactionSummary": 12,
"suppression": 3,
"decisionTrace": 8,
"attributionResult": 5,
"variantAssignment": 2,
"identityLink": 1,
"journeyEnrollment": 3,
"dynamicSchemaRows": 14
},
"totalDeleted": 95
}
Response fields
| Field | Type | Description |
|---|
success | boolean | Whether the erasure completed successfully. |
customerId | string | The customer ID that was erased. |
deletedCounts | object | Breakdown of deleted records per table. |
deletedCounts.interactionHistory | number | Interaction history records deleted. |
deletedCounts.interactionSummary | number | Aggregated interaction summary records deleted. |
deletedCounts.suppression | number | Active suppression records deleted. |
deletedCounts.decisionTrace | number | Decision trace (forensic audit) records deleted. |
deletedCounts.attributionResult | number | Attribution result records deleted. |
deletedCounts.variantAssignment | number | Experiment variant assignment records deleted. |
deletedCounts.identityLink | number | Identity cluster link records deleted. |
deletedCounts.journeyEnrollment | number | Journey enrollment records deleted. |
deletedCounts.dynamicSchemaRows | number | Rows deleted from customer-type dynamic schema tables. |
totalDeleted | number | Sum of all deleted records across all tables. |
Error codes
| Code | Reason |
|---|
400 | Missing or invalid customerId (must be a non-empty string). |
400 | Invalid JSON body. |
500 | Transaction failed — all deletions are rolled back. |
This operation is irreversible. All interaction history, summaries, suppressions, decision traces, attribution results, variant assignments, identity links, journey enrollments, and dynamic schema rows for the customer are permanently deleted. An audit log entry is created to record the erasure event.
Audit trail
Every erasure request is logged with:
- Action:
gdpr_erasure
- Entity type:
customer
- Entity ID: The erased customer ID
- Changes: The
deletedCounts breakdown
Data categories affected
| Category | What is deleted |
|---|
| Interaction history | All recommendation, impression, click, and conversion events for the customer. |
| Interaction summaries | Pre-aggregated performance summaries per offer and channel for the customer. |
| Suppressions | Active contact-policy suppressions (frequency caps, cooldowns, etc.). |
| Decision traces | Forensic traces of decision pipeline executions involving the customer. |
| Attribution results | Records linking outcomes back to the recommendations that drove them. |
| Variant assignments | Experiment variant assignments for the customer. |
| Identity links | Identity-cluster membership records for the customer. |
| Journey enrollments | Customer-journey enrollment records. |
| Dynamic schema rows | Rows matching the customer ID from all active customer-type schema tables (tables prefixed with ds_). |
Dynamic schema table erasure queries each active customer-type schema’s underlying table for rows where customer_id matches. If the table does not have a customer_id column, it is skipped silently.
Role requirements
| Method | Minimum role |
|---|
| POST | admin |