---
title: "Deanonymize an anonymous user"
method: POST
path: "/user/deanonymize"
tags: ["authentication"]
---

# Deanonymize an anonymous user

`POST /user/deanonymize`

Convert an anonymous user to a regular user by adding email and optionally password credentials. A confirmation email will be sent if the server is configured to do so.

## Request body

- UserDeanonymizeRequest
  - `signInMethod` 'email-password' | 'passwordless', required — Which sign-in method to use
  - `email` string, email, required — A valid email
  - `password` string — A password of minimum 3 characters
  - `connection` string — Deprecated, will be ignored
  - `options` SignUpOptions
    - `allowedRoles` string[]
    - `defaultRole` string
    - `displayName` string
    - `locale` string — A two or three characters locale
    - `metadata` object
    - `redirectTo` string, uri
  - `codeChallenge` string — PKCE code challenge (S256). When provided, the verification redirect will contain an authorization code instead of a refresh token.

## Response `200`

User deanonymized successfully

- 'OK'

## Other responses

- `default` — An error occurred while processing the request

## Changes

- **2026-06-24** `0fc5fd589dbf` — 1 warning
  - added the new `otp-too-many-attempts` enum value to the `error` response property for the response status `default`
- **2026-04-20** `b39086c84b43` — 1 warning, 1 info
  - added the new `user-already-exists` enum value to the `error` response property for the response status `default`
  - removed the `email-already-in-use` enum value from the `error` response property for the response status `default`
- **2026-03-27** `fbbb4ff76b2a` — 1 info
  - added the new optional request property `codeChallenge`
- **2026-01-13** `7560a2934be4` — 1 info
  - the `options/locale` request property's maxLength was increased from `2` to `3`
- **2025-11-11** `484d9f1a422a` — 1 warning
  - added the new `provider-account-already-linked` enum value to the `error` response property for the response status `default`

[Full history](https://skmtc.dev/nhost/apis/nhost-authentication-api/changes/user/deanonymize/post.md)

---

[API](https://skmtc.dev/nhost/apis/nhost-authentication-api.md) · [All operations](https://skmtc.dev/nhost/apis/nhost-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nhost/nhost-authentication-api/revisions/a5c0d88b55c4/schema)
