Developer guide: 4. Events, persons, groups and data management

Events, persons, groups, definitions and the data catalogue, privacy and deletion.

Embed
Preview of the card
<a href="https://lucidace.com/help/developer-guide-data-management"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/fe2c547f-d420-4fdb-8868-2397df7b267f/social-card.svg?v=3e7ae33eec8b" alt="Developer guide: 4. Events, persons, groups and data management" width="600" height="315"></a>

4. Events, persons, groups and data management

Reads need insight:read (events), person:read (persons, groups) or settings:read (rules); writes need the matching :write. Use *:read for a read-only key. Results lag ingestion by seconds; retry for up to ~30 s after a send.

Events

Method and path

Scope

Purpose

GET {p}/events

insight:read

newest first. Query: event, person, host, path, referrer, prop_key with prop_value, bots, columns, sample, limit, cursor; after and before (RFC 3339 times, e.g. 2026-11-20T06:00:00Z) keep events whose timestamp is at or after after and before before, and work together and with cursor

GET {p}/events/live

insight:read

server-sent events: polls and pushes new rows; keep the connection open and read the stream (curl -N), do not poll it

GET {p}/events/export.csv

insight:read

CSV uuid,timestamp,event,distinct_id,person_id,properties; stops at 10 000 rows (x-lc-export-cap header)

POST {p}/events/first-occurrence

insight:read

{event*, distinct_ids*, since?} returns {data:[{distinct_id, first_at, count}]}

GET {p}/live/visitors, /live/visitors/stream, /live/bots

insight:read

who is on the site now

lc "$LUCIDA_API/v1/projects/$PROJECT_ID/events?event=purchase&prop_key=currency&prop_value=EUR&limit=5" \
  | jq '.data[] | {event, distinct_id, timestamp, amount: .properties.amount}'

A row is {uuid, event, distinct_id, person_id, timestamp, properties}; the page also has next_cursor, newer_cursor, older_cursor. The endpoint never returns an error for a huge limit; it just caps it (the house convention for lists: a value above the route's maximum is clamped, 0 is 400). A malformed limit or cursor is 400.

Persons

A person is one human with one or more distinct_ids and merged properties.

GET {p}/persons and the routes below are management routes for tools, exports and admin screens, not something to call on every request. To read one person from your server per request (personalization, agents), use the gateway's Profile API: edge-cached, one key with the profiles:read scope.

Method and path

Scope

Purpose

GET {p}/persons

person:read

search. Query: q (text match), distinct_id, property with value, platform, limit, cursor. Row: {id, created_at, last_seen, platform, distinct_ids, properties}

GET {p}/persons/{id}

person:read

one person with properties (masked unless pii:read)

PATCH {p}/persons/{id} or /persons/{id}/properties

person:write

{set:{...}, unset:[...]}. .../properties answers 202 {event_uuid, distinct_id} (applied through the pipeline). PATCH {p}/persons/{id} answers 202 with the merged person, whose properties show the result (internal $lc_* keys are never returned)

GET {p}/persons/{id}/events

person:read

their events (event, limit, cursor)

GET {p}/persons/{id}/recordings

person:read

their session recordings (reading replays is a later part)

GET {p}/persons/{id}/cohorts, /flags, /groups, /history

person:read

memberships, evaluated flags, groups, property history; all cursor-paginated

GET {p}/persons/{id}/identity_graph

person:read

{person_id, platforms, identities:[{distinct_id, event_count, first_seen, last_seen, current}], merged_from}

POST {p}/persons/{id}/unmerge

person:write

{old_person_id*} revert a merge

GET {p}/persons/export.csv

person:read

CSV export

POST {p}/persons/{id}/export

admin

start a DSAR export (async; see Privacy)

DELETE {p}/persons/{id}, POST {p}/persons/bulk_delete

privacy:execute or admin

erasure request (async 202; see Privacy)

PID=$(lc "$LUCIDA_API/v1/projects/$PROJECT_ID/persons?distinct_id=user_123" | jq -r '.data[0].id')
lc -X PATCH "$LUCIDA_API/v1/projects/$PROJECT_ID/persons/$PID/properties" \
  -d '{"set":{"company_size":"50"},"unset":["first_seen_via"]}'

GET {p}/profiles/{distinct_id} and GET {p}/profiles/groups/{type_index}/{key} (profiles:read or person:read, ?events=N) return the same served profile the gateway edge returns.

Groups and group types

Method and path

Scope

Purpose

GET {p}/group_types

person:read

[{group_type, group_type_index}] (up to 5, created on first use). The group_type name is what you send in $groups and can be used in place of the index, see below

PATCH {p}/group_types/{type_index}

admin

{name_singular, name_plural} display names

GET {p}/groups?type_index=0&q=&limit=&cursor=

person:read

type_index is required

GET {p}/groups/{type_index}/{key}

person:read

properties, event_count, person_count, first_seen, last_seen

PATCH {p}/groups/{type_index}/{key}

person:write

{set, unset}; 202, applied in order with SDK writes

GET {p}/groups/{type_index}/{key}/events

person:read

events of the group

GET, POST {p}/groups/{type_index}/{key}/relationships

person:read / person:write

owner links {user_id*, kind*, starts_on?, ends_on?}

GET, POST {p}/groups/{type_index}/{key}/tasks

person:read / person:write

account tasks {title*, assignee_id, due_on, notes, status}

GET {p}/groups/export.csv?type_index=

person:read

CSV

A group type by name. Wherever a query takes a group type index you may send the type's name (group_type from GET {p}/group_types) instead: in math ({"unique_groups":"workspace"}, weekly_active_groups, monthly_active_groups), aggregate_by ({"groups":"workspace"}), the group_index of a filter or a breakdown, and in saved insights and dashboard tiles (a saved query keeps the name you sent, so it survives an index being reassigned). Name resolution is per project. A name the project has no type for, or an index with no type defined, is 400 naming it and listing what is defined (group type "workspace" is not defined in this project (defined: company=0)). The profile routes take it in the path as well: GET {p}/profiles/groups/{type}/{key} and GET /v1/profiles/groups/{type}/{key} on the capture host ({type} is a name or an index 0 to 4). The other /groups/{type_index}/... management routes still take the numeric index.

Identity

GET/PUT {p}/identity/rules (settings:read / admin): {types:[{name, priority, limit, source:"distinct_id"|"property", pattern, property}]}, up to 20 types; a merge that would leave a profile with more values of a type than limit (0 is unlimited) is refused. POST {p}/identity/rules/test {a, b, types} dry-runs a merge. The worker picks changes up within 60 s.

Definitions and the data catalogue

Event and property definitions are created automatically from traffic. Edit them to document, verify, hide or deprecate.

Method and path

Scope

Purpose

GET {p}/event-definitions?q=&hidden=&verified=

insight:read

{name, description, tags, verified, hidden, deprecated, is_core, owner_user_id, volume_30d, last_seen_at}

GET, PATCH, PUT {p}/event-definitions/{name}

insight:read / insight:write

{description, tags, verified, hidden, deprecated, is_core, owner_user_id}. At most 100 core events. PUT creates the definition if it does not exist (an upsert with the same fields), so you can document an event before it has traffic; PATCH of an event never seen is 404

GET {p}/property-definitions?target=&event_name=

insight:read

target event or person; row has id, name, value_type, value_type_locked

DELETE {p}/event-definitions/{name}

insight:write

hard delete of the definition and its property definitions (204; 404 when neither exists). Captured events stay and traffic recreates the definition

PATCH {p}/property-definitions/{id}

insight:write

{description, tags, verified, hidden, deprecated, owner_user_id, value_type, value_type_locked}

GET, PUT, DELETE {p}/event-definitions/{name}/preview, same for property-definitions/{id}/preview

read / write

preview-type overrides

GET {p}/property-values?key=&type=&q=

insight:read

[{value, count}] for a property key

POST {p}/taxonomy/events/bulk, .../properties/bulk

insight:write

one change for up to 500: {names[] or ids[] , description, verified, hidden, deprecated, owner_user_id, add_tags, remove_tags} returns {updated}

GET {p}/taxonomy/events/export.csv, .../properties/export.csv

insight:read

round-trips through import

POST {p}/taxonomy/events/import, .../properties/import

insight:write

body is CSV (Content-Type: text/csv); header name (events) or id (properties) plus any of description, tags (; separated), verified, hidden, deprecated, owner_user_id. All-or-nothing: one bad row writes nothing

GET {p}/event-inbox

insight:read

newly seen event names to triage

GET {p}/smart-events, GET {p}/hidden-data

insight:read

suggested events; hidden properties and warehouse objects

lc -X PATCH "$LUCIDA_API/v1/projects/$PROJECT_ID/event-definitions/signed_up" \
  -d '{"description":"User finished sign-up","verified":true,"tags":["growth"]}' | jq '{name, verified, tags}'
curl -sS -X POST -H "Authorization: Bearer $LUCIDA_ACCOUNT_KEY" -H 'Content-Type: text/csv' \
  --data-binary $'name,description,tags,verified\nupgraded,Upgrade to paid,growth;billing,true\n' \
  "$LUCIDA_API/v1/projects/$PROJECT_ID/taxonomy/events/import"      # {"updated":1}

Tracking plans

A plan is the schema the worker validates events against (mode off, warn or enforce) and that lucida codegen reads. Planned events appear as verified definitions before they are first seen.

Method and path

Scope

Purpose

GET, POST {p}/tracking-plans

settings:read / settings:write

{name*, mode?, schema*}

POST {p}/tracking-plans/validate

settings:read

compile patterns without saving: {valid, errors}

GET, PATCH, DELETE {p}/tracking-plans/{plan_id}

read / settings:write

version increases on each schema change

.../{plan_id}/branches (GET, POST), .../branches/{branch_id} (GET, PATCH), /diff, /merge, /rebase, /review

settings:read / settings:write

draft copies with four-eyes review; merge conflicts answer 409 plan-merge-conflict: Tracking-plan branches

lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/tracking-plans" -d '{
  "name":"core","mode":"warn",
  "schema":{"events":[{"name":"purchase","description":"A paid order","props":[
              {"name":"amount","type":"number","required":true},
              {"name":"currency","type":"string","enum":["EUR","USD"]}]}],
            "global_props":[{"name":"ssn","flag":"forbidden"}]}}' | jq '{id, mode, version}'

Schema vocabulary: events[] {name, description?, props[], groups[]}, global_props[], property_groups[] {name, props[]}. A prop is {name, type?, required?, enum?, pattern?, flag?} with type string|number|bool|datetime|array|object and flag pii|sensitive|forbidden. forbidden props are dropped at ingest. The schema must be a JSON object under 1 MiB; a bad regex is 400.

Ingest-time rules (pick the right tool)

Tool

What it does

Scope

Event filter {p}/event-filter

one condition tree that drops matching events before anything else

GET/POST test: settings:read; PUT/DELETE: admin

Transformations {p}/transformations

ordered rules: drop, rename, hash, set, sample, code

pipeline:* or settings:*

JS rules {p}/js_rules

function transform(event) in a sandbox with a key-value store

settings:*, KV admin

Bot rules {p}/bot-rules

label user agents and IPs as bots by category

settings:*

Traffic exclusions {p}/traffic-exclusions

hide matching traffic from reports at query time, retroactive and reversible

settings:*

Internal traffic {p}/internal-traffic/rules

flag matching events as internal at ingest

settings:*

Tracking plan

validate and optionally drop forbidden props

settings:*

Event filter. PUT {p}/event-filter {mode*, root*, tests?}: mode is off, dry_run (counts what would drop) or live; root is a tree of {"type":"and"|"or","children":[...]}, {"type":"not","child":{}} and leaves {"type":"condition","field":"event"|"distinct_id","op":"equals"|"contains"|"starts_with"|"ends_with"|"regex","value":"..."} (max 20 conditions, depth 5); tests are saved cases {event, distinct_id?, expect_drop} (max 50) that must pass before live. GET returns 404 no event filter until one is set.

lc -X PUT "$LUCIDA_API/v1/projects/$PROJECT_ID/event-filter" -d '{"mode":"dry_run",
  "root":{"type":"condition","field":"event","op":"starts_with","value":"test_"},
  "tests":[{"event":"test_ping","expect_drop":true},{"event":"signed_up","expect_drop":false}]}' | jq '{mode, failing_tests, counts}'
lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/event-filter/test" -d '{"events":[{"event":"test_x","distinct_id":"a"}]}'   # {"drops":[true],...}

Transformations. POST {p}/transformations {name*, rule*, events?, conditions?, filter?, enabled?, position?}. rule.kind is one of drop_event (optional per_event:[{event, conditions}]), drop_property {property}, rename_property {from, to}, hash_property {property}, set_property {property, value}, sample {percent 0..100, mode: "random"|"distinct_id"}, code {source, inputs?, secrets?} (a small statement language, not JavaScript). Scope: events (OR) and conditions [{property, op, value}] with op eq, neq, contains, not_contains, gt, gte, lt, lte, regex, is_set, is_not_set (AND). Property names may not start with $lc_. Rules run in position order. Other routes: GET, PATCH/DELETE {p}/transformations/{id} (clear_quarantine), GET {p}/transformations/metrics?hours=, POST {p}/transformations/test {event, rules[]} dry-run (no save), and reusable code libraries {p}/transformation-libraries (GET, POST {name*, source*, description}, GET/PATCH/DELETE .../{id}, GET .../{id}/versions). A rule that keeps failing is quarantined (quarantined_until, quarantine_reason).

# Dry-run first (nothing is saved), then create
lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/transformations/test" -d '{
  "event":{"event":"signup","distinct_id":"u1","properties":{"email":"a@b.co","plan":"pro"}},
  "rules":[{"name":"hash email","rule":{"kind":"hash_property","property":"email"}},
           {"name":"rename","rule":{"kind":"rename_property","from":"plan","to":"tier"}}]}' | jq '{properties, dropped, steps}'
lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/transformations" -d '{
  "name":"hash email","events":["signed_up"],"rule":{"kind":"hash_property","property":"email"},"enabled":true}' | jq '{id, position, scope}'

An unknown rule.kind is 400 invalid rule: unknown variant ... listing the valid kinds. Changes apply to events ingested after the change; they do not rewrite stored events.

JS rules. POST {p}/js_rules {name*, source*, enabled?, position?}; PATCH/DELETE .../{id}; POST {p}/js_rules/test {event*, source?}; GET {p}/js_rules/metrics?hours=; the per-project key-value store: GET {p}/js_rules/kv?prefix=, GET .../kv/usage, PUT .../kv/quota {max_keys*, max_bytes*} (admin), DELETE .../kv?key=|prefix= (admin; no parameter deletes all). See Key-value store for ingest JS rules.

Bot rules. POST {p}/bot-rules {name*, category*, conditions*, combiner?, note?}: category is ai_crawler, ai_search, ai_assistant, search_crawler, seo_crawler, social_crawler, monitoring, http_client, headless_browser, no_user_agent, referrer_spam, other_bot; combiner and or or (default or); 1 to 10 conditions {property, op, value} with op contains, equals, regex, cidr and property one of user_agent, ip, lib, host, pathname, url, browser, os, language, screen_width, screen_height, country, referrer, referring_domain. Also GET {p}/bot-rules, PUT .../{id}, DELETE .../{id}, PUT .../order {ids*} (every id), POST .../reclassify {days} (apply to past events), and GET {p}/bot-traffic (report).

Traffic exclusions and internal traffic.

lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/traffic-exclusions" -d '{"kind":"hostname","value":"staging.example.com","note":"staging"}' | jq '{id, kind, enabled}'
lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/traffic-exclusions/preview" -d '{"days":7,"rules":[{"kind":"hostname","value":"staging.example.com"}]}'   # {events, sessions, persons, days}
lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/internal-traffic/rules" -d '{"kind":"ip_cidr","value":"203.0.113.0/24","note":"office"}'

Exclusion kind: ip_cidr, hostname, path, distinct_id, event_property, person_property (key is required for the two property kinds). GET ?trash=true lists deleted rules; PATCH .../{id} {enabled}; DELETE moves to the trash; POST .../{id}/restore. At most 100 live rules. Internal-traffic kind: ip_cidr, email_domain, person_property; POST {p}/internal-traffic/cohort builds a cohort of internal users. Details: Traffic exclusions.

Path cleaning. PUT {p}/path-cleaning-rules {rules*:[{kind:"regex"|"wildcard", pattern, replacement}], apply_to_filters?} (up to 50): regex replaces every match (\1 is group 1), wildcard matches the whole path (* one segment, ** anything). POST .../ops {ops*, dry_run?} previews bulk edits. GET returns {max_rules, rules, apply_to_filters}.

Lookup tables. POST {p}/lookup_tables {name*, join_property*, csv*, key_column?}; queries read lookup:<name>.<column>. Name [a-z][a-z0-9_]{0,62}; CSV with a header row, at most 50 000 rows, 20 columns, 1.5 MB; the key column must be unique. PUT .../{id} replaces the CSV; DELETE .../{id}; GET lists {id, name, key_column, join_property, columns, row_count}.

Calculated properties. POST {p}/calculated_properties {name*, expr*, description?}; use as calc:<name> in filters and breakdowns. expr is a tree {"op": "prop"|"lit"|"concat"|"regex_extract"|"coalesce"|"arith"|"case"|"borrow", ...}, for example {"op":"concat","args":[{"op":"prop","key":"a"},{"op":"lit","value":"-"}]} (depth 8, 64 nodes). PATCH/DELETE .../{id}.

Materialized properties. POST {p}/materialized-properties {key*} promotes a hot event property to a column for fast filters (status goes backfilling, then ready); DELETE .../{id}; GET .../candidates; GET/PUT .../settings {auto_enabled*, max_columns*, threshold*}. See Materialized properties.

Sensitive keys (client-side encrypted properties). GET {p}/sensitive-keys (settings:read), POST {p}/sensitive-keys (admin, makes a new key pair the active one), DELETE .../{kid} destroys a private key: crypto-shredding, irreversible.

Snapshot properties. GET/POST {p}/snapshot-properties (action:read / action:write) {name*, selector*, source*, events*, attribute?, scope?, url?} capture a page value onto events; DELETE .../{name}.

Custom fields. Org-defined fields on flags, experiments and dashboards: GET {p}/custom-fields, GET {p}/custom-fields/{object_type} (?field=&value= to filter), GET/PUT {p}/custom-fields/{object_type}/{object_id} (the PUT body is a {field: value} object; the scope is the object type's own :write).

Data quality

GET {p}/data-quality?from=&to= is the overview (volume with anomaly baseline, late events, null rates, naming and dynamic-name findings); GET .../data-quality/pii-scan (admin) scans a sample for emails, card and phone numbers. Checks are scheduled assertions over any table or SQL view:

Method and path

Scope

Purpose

GET {p}/data-quality/checks?tag=&status=

insight:read

status pass, fail, error, not_run

POST {p}/data-quality/checks, PUT .../{id}, DELETE .../{id}

insight:write

{name*, kind*, target_table*, column_name?, config?, severity?, schedule?, tags?, enabled?}

POST .../{id}/run, POST {p}/data-quality/run-all

insight:read

run now: {check_id, status, observed, error, duration_ms}

GET .../{id}/runs, GET .../{id}/failing-rows, GET {p}/data-quality/health

insight:read

history, a SQL query for the failing rows, {overall, healthy, warning, failing, erroring, not_run, disabled}

kind: not_null, unique, accepted_values (config.values, 1 to 200), relationship (config.to_table, to_column), row_count (config.min and/or max), freshness (column_name and config.max_age_hours), custom_sql (config.sql, a SELECT whose rows are the failures). severity: error or warning. schedule: manual, after_refresh, after_sync, 1h, 6h, 12h, daily, weekly (default daily). Tags: up to 20.

CHK=$(lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/data-quality/checks" -d '{
  "name":"events have distinct_id","kind":"not_null","target_table":"events","column_name":"distinct_id",
  "severity":"error","schedule":"daily"}' | jq -r .id)
lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/data-quality/checks/$CHK/run"     # {"status":"pass","observed":0.0,...}

Ingestion health

GET {p}/ingestion/warnings (settings:read; filters kind, outcome, event, from, to, plus /summary) lists what the gateway and worker dropped or repaired (invalid_uuid, invalid_timestamp, future_timestamp, distinct_id_too_long, invalid_person_ops, ...). GET {p}/ingestion/dlq (source, include_dismissed) lists events that failed processing; POST .../dlq/replay and .../dlq/dismiss take {ids*} (settings:write).

Origin-drop alert. A public-key request from an origin outside capture_allowed_origins is acknowledged with 200 and dropped, so a moved site looks like a flat graph. The gateway writes one origin_not_allowed ingestion warning per project per minute, its detail starting with the number of events dropped since the last one. When a project drops 50 or more events in 10 minutes, a critical health issue origin_not_allowed opens within about a minute (Data > Project health, GET {p}/health-issues) and $lc_health_issue_firing is emitted with kind: origin_not_allowed, so an alert rule, workflow or project webhook on that event notifies you. It resolves by itself when the drops fall under the threshold ($lc_health_issue_resolved). Fix it with lucida origin move <old> <new>. Self-hosted: LC_ORIGIN_DROP_ALERT_MIN on lc-jobs changes the 50. Drops of the last minute before traffic stops are counted when the next drop arrives, not before.

Privacy and deletion

Method and path

Scope

Purpose

DELETE {p}/persons/{id}

admin or privacy:execute

erasure request; 202

POST {p}/persons/bulk_delete

admin or privacy:execute

{ids?, distinct_ids?, events?, recordings?, keep_person?, forward?, suppress?}, ids plus distinct_ids total 1 to 1000 per call; defaults erase everything. 202 {queued, batch_id, requests[], errors[]}; unknown subjects are listed in errors and not queued: a subject with not found had nothing to erase, so treat it as done. Events sent with $process_person_profile: false under a distinct id are erased by that distinct id (shown in requests with personless: true)

GET {p}/deletion-requests

privacy:execute or admin

requests, status pending, running, done, failed, cancelled; filter with status, person_id, batch_id

DELETE {p}/deletion-requests/{id}

admin

cancel while pending (409 once running); DELETE .../batches/{batch_id} cancels a whole bulk call

GET {p}/deletion-requests/{id}/forwards, POST .../forwards/{forward_id}/retry

admin

per-destination status of deletes forwarded to connected tools; retry a failed one (409 if not failed or identifiers purged)

POST {p}/persons/{id}/export

admin

DSAR export job; poll GET {p}/dsar-exports/{id}: status is pending, then done (usually under a minute). When it is done and not expired the export carries a relative download_url (/v1/projects/{project_id}/dsar-exports/{id}/download); prefix it with $LUCIDA_API and fetch it with your key

GET {p}/dsar-exports

admin

your exports, oldest first, ?limit=&cursor= pages {data, next_cursor}; each item is shaped like GET {p}/dsar-exports/{id}

DELETE {p}/dsar-exports/{id}

admin

delete the export row and its stored bundle; 204, 404 when unknown. A finished erasure also deletes every export of the erased person (bundle and row), so their download answers 404 afterwards

GET, PUT {p}/retention

settings:read / admin

{person_days, audit_days, export_days*}

GET {p}/data-quality/pii-scan

admin

find personal data in event properties

GET {p}/replay-privacy/findings, POST .../scan, PATCH .../findings/{id}, GET .../text-samples

settings:read / admin

replay privacy scan; owned by the replay part

POST /v1/privacy/lookup, POST /v1/privacy/requests, GET /v1/privacy/requests/{id}, POST .../cancel

platform signature

cross-product privacy requests from the Lucida privacy platform; not for general agents

# Erase one person and their events and recordings; do not forward to destinations
lc -X POST "$LUCIDA_API/v1/projects/$PROJECT_ID/persons/bulk_delete" \
  -d '{"ids":["'"$PID"'"],"events":true,"recordings":true,"forward":false}' | jq '{queued, batch_id}'
lc "$LUCIDA_API/v1/projects/$PROJECT_ID/deletion-requests?limit=5" | jq '.data[] | {id, status, options}'

A batch where no distinct id is known (no person and no events), for example {"distinct_ids":["never-seen"]}, still answers 202. Nothing is queued:

{
  "queued": 0,
  "batch_id": "0192f4c4-7f0e-7c3a-9d21-5b1f0e8a4c11",
  "requests": [],
  "errors": [{"subject": "never-seen", "detail": "not found"}]
}

batch_id is still a new id, but there are no requests to list under it. A repeated subject in one call is handled once. To confirm an erasure finished, call GET {p}/deletion-requests?batch_id=<batch_id> (or ?person_id=) with the same privacy:execute (or admin) key and wait until every request has status done; completed_at is set when every store was verified erased. The statuses are pending, running, done, failed and cancelled.

Erasure (DELETE {p}/persons/{id}, persons/bulk_delete) needs admin or privacy:execute, on a project secret key or on an account key. A server that only forwards deletions should hold a project secret key with ["capture","privacy:execute"] (it can then send events and erase, and read nothing), not admin (section 1). Erasure is irreversible once running. Dry-run it by reading GET {p}/persons/{id} and events first; cancel with DELETE .../deletion-requests/{id} while pending. keep_person:true keeps the record and its distinct ids and implies forward:false.

Updated