users_users_erase
GDPR hard erasure (Art.
GDPR hard erasure (Art. 17) of one end user. IRREVERSIBLE and quite different from users_users_delete: the identifier and identity rows are DELETED, the profile fields nulled and all three metadata bags emptied. What survives is a tombstone — the user row with its id and `erasedAt` — so that every foreign reference and webhook consumer holding that id still resolves. The audit trail is KEPT but pseudonymized (the metadata of rows targeting this user is cleared), because a security log that erasure can rewrite is not a security log. The email is freed: registering it again creates a NEW user id. Emits `users/user.erased` so consumers purge their own copies. Idempotent — erasing an already-erased user returns the same tombstone and changes nothing.
Behavior
- HTTP
POST /users/users/:userId/erase
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| userId | string | • | The opaque user id returned by users_users_create or _list. |
Response
| Field | Type | Always | Description |
|---|---|---|---|
| id | string | • | |
| name | string | • | |
| bannedAt | string | • | |
| erasedAt | string | • | |
| imageUrl | string | • | |
| testUser | boolean | • | |
| createdAt | string | • | |
| deletedAt | string | • | |
| productId | string | • | |
| updatedAt | string | • | |
| waitlisted | boolean | • | |
| identifiers | array | • | |
| lockedUntil | string | • | |
| lastSignInAt | string | • | |
| requiresReset | boolean | • | |
| publicMetadata | object | • | |
| unsafeMetadata | object | • | |
| privateMetadata | object | • | |
| emailChangeLockedUntil | string | • |
Try it
GDPR hard erasure (Art.