Starts the self-service account-deletion flow for the authenticated user. The server generates a one-time, 6-digit confirmation code, emails it to the user’s registered address, and stores it for 10 minutes. The user completes deletion by passing that code to the Confirm Account Deletion endpoint.Requires the user’s own access token; a service key is refused (403 auth/user-token-required). This step does not delete anything — it only sends the code.
This flow only works for accounts with an email on file. Accounts without one
(e.g. anonymous or foreign-id users) cannot self-serve deletion — delete them
from your backend with Delete User
(users.deleteUser in the node SDK).
Body Parameters
This endpoint takes no body parameters.
Response
204 No Content with no body whenever the request is processed without a server error. The response is intentionally generic.
Error Codes
Code
Status
Description
auth/no-email-on-file
400
The authenticated account has no email address, so a confirmation code cannot be delivered. Use a service key to delete it instead.
auth/user-not-found
404
The access token is valid but no matching user record exists (e.g. the account was already deleted).
auth/unsupported-param
400
The request sent userId, in the body or the query. These endpoints always act as the signed-in user: "`userId` isn't accepted here: these endpoints always act as the signed-in user.", with param: "userId".
auth/user-token-required
403
A service key called this endpoint, with or without actingUserId: "This endpoint needs the user's own access token; a service key can't use it."
auth/acting-user-not-allowed
400
A user token, or a request with no credentials, sent actingUserId: "actingUserId is only accepted with a service key. A user's own token always acts as that user." A user token always acts as its own user.
Each call generates a fresh code and overwrites any pending one for that user.
The code expires after 10 minutes.