Change a user's email

PATCH /groups/{groupId}/apps/{appId}/users/{userId}/reset_email

Change the email address for an email/password user by ID.

Path parameters

application/json

Body Required

The new email address for the user.

  • email string Required

    The new email for the user.

Responses

  • 204

    No Content

  • 400
    • Payload is formatted incorrectly.
    • The email in the payload is not a string.
    • The email in payload has 0 or greater than 128 characters.
    • The user does not have a local-userpass identity.
  • 404

    The appId, groupId, or userId is invalid.

PATCH /groups/{groupId}/apps/{appId}/users/{userId}/reset_email
curl \
 --request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/users/{userId}/reset_email' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"email":"new_email@example.com"}'
Request example
{
  "email": "new_email@example.com"
}