Update a user

Updates instance role assignments and optionally the email. Requires user:write or usermanagement.write. Email changes are not allowed for external SSO users or users with more than one customer domain.

Request

PUT /user/{auth0UserId}

Path Parameters

ParameterTypeRequiredDescription
auth0UserIdstringYesUser ID (for example auth0|abc123).

Headers

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

Request Body

FieldTypeRequiredDescription
emailstringNoUpdated email (lowercased).
instancesobjectNoMap of instance identifiers to arrays of role IDs. Use "*" for all instances.

Example Request

{
  "email": "[email protected]",
  "instances": {
    "*": ["rol_abc"],
    "live": ["rol_abc", "rol_xyz"]
  }
}

Response

Sanitized user object:

{
  "user_id": "auth0|abc123",
  "email": "[email protected]",
  "instances": {
    "*": ["rol_abc"],
    "live": ["rol_abc", "rol_xyz"]
  }
}
Path Params
string
required
Response
200

Successful response

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