POST
/
signup
/
email-password
curl --request POST \
  --url https://local.auth.nhost.run/v1/signup/email-password \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "john.smith@nhost.io",
  "password": "Str0ngPassw#ord-94|%",
  "options": {
    "allowedRoles": [
      "me",
      "user"
    ],
    "defaultRole": "user",
    "displayName": "John Smith",
    "locale": "en",
    "metadata": {
      "firstName": "John",
      "lastName": "Smith"
    },
    "redirectTo": "https://my-app.com/catch-redirection"
  }
}'
{
  "mfa": {
    "ticket": "<string>"
  },
  "session": {
    "accessToken": "<string>",
    "accessTokenExpiresIn": 123,
    "refreshToken": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
    "user": {
      "activeMfaType": "totp",
      "avatarUrl": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "defaultRole": "user",
      "displayName": "John Smith",
      "email": "john.smith@nhost.io",
      "emailVerified": false,
      "id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
      "isAnonymous": false,
      "locale": "en",
      "metadata": {
        "firstName": "John",
        "lastName": "Smith"
      },
      "phoneNumber": "<string>",
      "phoneNumberVerified": false,
      "roles": [
        "me",
        "user"
      ]
    }
  }
}

Body

application/json
a description

The body is of type object.

Response

200
application/json
Successfully registered. Null session means email verification is pending

The response is of type object.