Delete one visitor's or user's data
POST/ v1/ projects/ {project}/ deletion-requests
Give visitor_id (a whole number), user_id or both. The request is stored as pending; a scheduled job takes it within a few minutes, deletes the visitor's or user's events (and the anonymous events of the visitors identified as that user), then marks it done with completed_at.
Path parameters
project
The project's id (
prj_…).Body
visitor_id
The visitor's anonymous id, a whole number; empty when only
user_id is given.user_id
The id passed to identify.
Responses
Accepted; the deletion is carried out in the background.
id
A prefixed ULID; the prefix names the kind (
prj_… a project, org_… an organization).org_id
A prefixed ULID; the prefix names the kind (
prj_… a project, org_… an organization).project_id
A prefixed ULID; the prefix names the kind (
prj_… a project, org_… an organization).visitor_id
user_id
status
pendingrunningdonerequested_by_id
A prefixed ULID; the prefix names the kind (
prj_… a project, org_… an organization).created_at
A time in UTC, ISO 8601.
updated_at
A time in UTC, ISO 8601.
completed_at
Example response
1{2"id": "id_01JD8Q2M4W9XK3T7B5",3"org_id": "org_01JD8Q2M4W9XK3T7B5",4"project_id": "prj_01JD8Q2M4W9XK3T7B5",5"visitor_id": "id_01JD8Q2M4W9XK3T7B5",6"user_id": "id_01JD8Q2M4W9XK3T7B5",7"status": "pending",8"requested_by_id": "id_01JD8Q2M4W9XK3T7B5",9"created_at": "2026-11-21T09:30:00Z",10"updated_at": "2026-11-21T09:30:00Z",11"completed_at": "2026-11-21T09:30:00Z"12}
Errors
Every error has the same shape: error.code, a message for people and details.
| Status | Code |
|---|---|
validation_error |