Create or Invite a user

Creates a new user or invites an existing email into this customer. Requires user:write or usermanagement.write. Empty role lists on an instance receive the configured minimum role.

Request

POST /user

Headers

HeaderValue
AuthorizationBearer <token> (or HMAC headers, see Authentication)
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
emailstringYesEmail address (stored lowercased).
instancesobjectYesMap of instance identifiers to arrays of Auth0 role IDs. Use "*" for all instances.
create_storefrontbooleanNoWhen true, storefront credentials are included in the invite email.

Example Request

{
  "email": "[email protected]",
  "instances": {
    "live": ["rol_abc"]
  },
  "create_storefront": false
}

Response

{
  "users": [
    {
      "user_id": "auth0|def456",
      "email": "[email protected]",
      "instances": {
        "live": ["rol_abc"]
      }
    }
  ],
  "created": true
}

created is true for a new identity, false when an existing user was granted access to this customer.

Response
200

Successful response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!