You can set root attributes for a user during sign-up using Auth0’s . This allows you to minimize the number of API calls required to set root attributes when creating users. Make a POST call to the Create a User endpoint. Be sure to replace MGMT_API_ACCESS_TOKEN, CONNECTION_NAME, EMAIL_VALUE, PASSWORD_VALUE, GIVEN_NAME_VALUE, FAMILY_NAME_VALUE, NAME_VALUE, NICKNAME_VALUE, and PICTURE placeholder values with your Management API , initial connection name, email address, password, given name, family name, name, nickname, and picture URL, respectively.
curl --request POST \
  --url 'https://{yourDomain}/api/v2/users' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{ "connection": CONNECTION_NAME, "email": EMAIL_VALUE, "password": PASSWORD_VALUE, "given_name": GIVEN_NAME_VALUE, "family_name": FAMILY_NAME_VALUE,"name": NAME_VALUE, "nickname": NICKNAME_VALUE,"picture": PICTURE_VALUE }'
ValueDescription
MGMT_API_ACCESS_TOKENAccess Token for the Management API with the create:users.
CONNECTION_NAMEName of the connection through which the initial user information was received.
EMAIL_VALUEEmail address of the user to be created.
PASSWORD_VALUEPassword of the user to be created.
GIVEN_NAME_VALUEGiven name of the user to be created.
FAMILY_NAME_VALUEFamily name of the user to be created.
NAME_VALUEFull name of the user to be created.
NICKNAME_VALUENickname of the user to be created.
PICTURE_VALUEURL of the picture for the user to be created.
If you are using Lock or the public signup endpoint for user sign-up, you can set root attributes using the same method.

Learn more