/api/v1/users/:masterUserIdDelete or export a person
Erase one person and everything stored about them, or download it all as JSON, for a deletion or access request.
The dashboard does the same from a user page: Export JSON and Delete user, which asks you to type the user id first. What is collected and kept is on Privacy.
Authorization
Delete takes a dashboard session, or Authorization: Bearer fk_data_… with the users:delete scope. Export takes a dashboard session only. The SDK key (gk_) can do neither.
Delete
curl -X DELETE https://api.fictura.co/api/v1/users/0f1e2d3c-4b5a-6978-8695-a4b3c2d1e0f9 \
-H "Authorization: Bearer fk_data_..."The person's events, identifiers, revenue rows, experiment assignments, sessions, attributes, push tokens, attribution, entitlement, session replay and error events are deleted in batches, and the response counts each: rows per table, and attribute keys under attributes.
{
"ok": true,
"request_id": "a7b8c9d0-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
"master_user_id": "0f1e2d3c-4b5a-6978-8695-a4b3c2d1e0f9",
"already_deleted": false,
"counts": {
"events": 1284,
"revenue_events": 4,
"sessions": 61,
"assignments": 2,
"event_user_hours": 310,
"user_activity": 42,
"audience_members": 1,
"replay_frames": 0,
"push_tokens": 1,
"push_messages": 3,
"attributions": 1,
"entitlements": 1,
"reengagements": 0,
"user_overrides": 0,
"error_events": 2,
"identity_merges": 0,
"cohort_sync_members": 0,
"identity_map": 3,
"attributes": 1
},
"suppressed_identifiers": 3,
"suppressed_types": ["account_id", "device_id", "revenuecat_id"]
}Suppression. Every identifier value the person had is added to a suppression list (stored hashed). Later events and billing webhooks carrying one of them are dropped and counted as a suppressed_identifier ingest warning, so the person is not rebuilt by the next batch from their device.
Idempotent. Deleting again succeeds and counts zero, with already_deleted: true and the first deletion's request_id. An id that never existed in this app answers 404 not_found. Each deletion is recorded as a completed data request with its counts.
Export
GET /api/v1/users/:masterUserId/export returns the person as one JSON document: identities, attributes, attribution, revenue, sessions, experiment assignments and events. It is streamed, so a person with many events does not time out. Each export is recorded as a data request.
curl https://api.fictura.co/api/v1/users/0f1e2d3c-4b5a-6978-8695-a4b3c2d1e0f9/export \
-H "Authorization: Bearer <dashboard session>" \
-H "x-app-id: <app id>" \
-o person.jsonNewer backends only
On a Fictura backend that predates these routes, they answer 404 and the user page says export and delete are not available yet.