> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Request Account Deletion

> Email the authenticated user a one-time code to confirm self-service account deletion

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](/v8/api-reference/auth/confirm-account-deletion) endpoint.

Requires a valid user access token. This step does **not** delete anything — it only sends the code.

<Warning>
  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
  server-side with a service key via the [node SDK](/v8/node-sdk/users).
</Warning>

## Body Parameters

This endpoint takes no body parameters.

## Response

<ResponseField name="success" type="boolean">
  `true` when the request is processed without a server error. The response is intentionally generic.
</ResponseField>

## 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/no-user-found` | 403 | The access token is valid but no matching user record exists (e.g. the account was already deleted). |

<Note>
  Each call generates a fresh code and overwrites any pending one for that user.
  The code expires after 10 minutes.
</Note>

## See Also

* [`useRequestAccountDeletion` hook](/v8/hooks/auth/use-request-account-deletion)
* [Confirm Account Deletion endpoint](/v8/api-reference/auth/confirm-account-deletion)
* [Delete User (service key) endpoint](/v8/api-reference/users/delete-user)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.