---
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

---

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