/{app_slug}/v1/admin/users/{user_id}AuthPermanently delete an end-user
Removes the account, its sessions, contacts, and tenant memberships. Audit rows are preserved, and the deletion itself is audited as `auth.account.deleted` with `via: consumer_admin` and the caller as actor. Fires `user.deleted` with `via: "consumer_admin"`.
Path parameters
app_slug*stringSlug of the app.
user_id*stringId of the user.
Response · 204
End-user deleted.
Example
Request
DELETE https://api.auth.productcraft.co/{app_slug}/v1/admin/users/{user_id}
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
await auth.consumer("my-app").users.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");auth.consumer(…).users.delete(userId, options?): void