Create a User

Report issue

Create a new user. Note: connection is required and will always be JM-DB-Connection but other parameters such as email and password are dependent upon the type of connection.

Authentication

AuthorizationBearer

Auth0-issued access token for the Auth0 Management API audience.

Request

This endpoint expects an object.
connectionstringRequired>=1 characterDefaults to Initial-Connection
Name of the connection this user should be created in.
emailstringOptionalformat: "email"Defaults to john.doe@gmail.com
The user's email.
phone_numberstringOptionalformat: "^\+[0-9]{1,15}$"Defaults to +199999999999999

The user’s phone number (following the E.164 recommendation).

user_metadatamap from strings to anyOptional
Data related to the user that does not affect the application's core functionality.
blockedbooleanOptionalDefaults to false

Whether this user was blocked by an administrator (true) or not (false).

email_verifiedbooleanOptionalDefaults to false

Whether this email address is verified (true) or unverified (false). User will receive a verification email after creation if email_verified is false or not specified

phone_verifiedbooleanOptionalDefaults to false

Whether this phone number has been verified (true) or not (false).

app_metadataobjectOptional
Data related to the user that does affect the application's core functionality.
given_namestringOptional1-150 charactersDefaults to John

The user’s given name(s).

family_namestringOptional1-150 charactersDefaults to Doe

The user’s family name(s).

namestringOptional1-300 charactersDefaults to John Doe
The user's full name.
nicknamestringOptional1-300 charactersDefaults to Johnny
The user's nickname.
picturestringOptionalformat: "strict-uri"Defaults to https://secure.gravatar.com/avatar/15626c5e0c749cb912f9d1ad48dba440?s=480&r=pg&d=https%3A%2F%2Fssl.gstatic.com%2Fs2%2Fprofiles%2Fimages%2Fsilhouette80.png
A URI pointing to the user's picture.
user_idstringOptionalformat: "^\S*$"0-255 charactersDefaults to abc
The external user's id provided by the identity provider.
passwordstringOptional>=1 characterDefaults to secret
Initial password for this user. Only valid for auth0 connection strategy.
verify_emailbooleanOptionalDefaults to false

Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter.

usernamestringOptional1-128 charactersDefaults to johndoe
The user's username. Only valid if the connection requires a username.

Response

User successfully created.
user_idstringOptionalDefaults to auth0|507f1f77bcf86cd799439020
ID of the user which can be used when interacting with other APIs.
emailstringOptionalformat: "email"Defaults to john.doe@gmail.com
Email address of this user.
email_verifiedbooleanOptionalDefaults to false

Whether this email address is verified (true) or unverified (false).

usernamestringOptionalDefaults to johndoe
Username of this user.
phone_numberstringOptionalDefaults to +199999999999999

Phone number for this user. Follows the E.164 recommendation.

phone_verifiedbooleanOptionalDefaults to false

Whether this phone number has been verified (true) or not (false).

created_atdatetimeOptional
Date and time when this user was created.
updated_atdatetimeOptional

Date and time when this user was last updated/modified.

identitieslist of objectsOptional
Array of user identity objects when accounts are linked.
app_metadataobjectOptional

User metadata to which this user has read-only access.

user_metadatamap from strings to anyOptional

User metadata to which this user has read/write access.

picturestringOptional
URL to picture, photo, or avatar of this user.
namestringOptional
Name of this user.
nicknamestringOptional
Preferred nickname or alias of this user.
multifactorlist of stringsOptional

List of multi-factor authentication providers with which this user has enrolled.

multifactor_last_modifieddatetimeOptional

Last date and time this user’s multi-factor authentication providers were updated.

last_ipstringOptional
Last IP address from which this user logged in.
last_logindatetimeOptional
Last date and time this user logged in.
last_password_resetdatetimeOptional
Last date and time this user had their password reset.
logins_countintegerOptional
Total number of logins this user has performed.
blockedbooleanOptional

Whether this user was blocked by an administrator (true) or is not (false).

given_namestringOptional

Given name/first name/forename of this user.

family_namestringOptional

Family name/last name/surname of this user.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error