/v1/apps/{app_id}/end-users/{user_id}AuthDelete an end-user permanently.
Removes the account with its contacts, sessions and tenant memberships. Writes one `auth.account.deleted` audit row (`via: platform`) in the same transaction, mirrors the deletion into the workspace audit log as `auth.end_users.deleted`, and fires `user.deleted` with `via: "platform"`.
Path parameters
app_id*stringId of the app.
user_id*stringId of the user.
Response · 204
End-user deleted.
Example
Request
DELETE https://api.auth.productcraft.co/v1/apps/{app_id}/end-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.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").endUsers.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");auth.admin.app(…).endUsers.delete(userId, options?): void