Skip to main content
POST
/
user
/
deanonymize
Deanonymize an anonymous user
curl --request POST \
  --url https://{subdomain}.auth.{region}.nhost.run/v1/user/deanonymize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "signInMethod": "email-password",
  "email": "john.smith@nhost.io",
  "password": "Str0ngPassw#ord-94|%",
  "connection": "<string>",
  "options": {
    "allowedRoles": [
      "me",
      "user"
    ],
    "defaultRole": "user",
    "displayName": "John Smith",
    "locale": "en",
    "metadata": {
      "firstName": "John",
      "lastName": "Smith"
    },
    "redirectTo": "https://my-app.com/catch-redirection"
  }
}'
"OK"

Authorizations

Authorization
string
header
required

Bearer authentication with JWT access token. Used to authenticate requests to protected endpoints.

Body

application/json

Authentication method and credentials to convert anonymous user to regular user

signInMethod
enum<string>
required

Which sign-in method to use

Available options:
email-password,
passwordless
email
string<email>
required

A valid email

Example:

"john.smith@nhost.io"

password
string

A password of minimum 3 characters

Required string length: 3 - 50
Example:

"Str0ngPassw#ord-94|%"

connection
string
deprecated

Deprecated, will be ignored

options
object

Response

User deanonymized successfully

The response is of type enum<string>.

Available options:
OK
I