Herald
OpenapiAuth

Request to change the email address for the authenticated user

Sends a confirmation link to the new email address. The link points to the first-party frontend confirm page, which the user must open in their logged-in browser so the frontend can call the confirm endpoint with the current session. Returns 400 when the realm has no usable email channel.

POST
/api/auth/{realmId}/change_email/request

Sends a confirmation link to the new email address. The link points to the first-party frontend confirm page, which the user must open in their logged-in browser so the frontend can call the confirm endpoint with the current session. Returns 400 when the realm has no usable email channel.

Path Parameters

realmId*string

Realm ID

Request Body

application/json
  1. body
newEmail*string
reauthToken*string

Fresh re-authentication ticket obtained from /api/user/reauth/verify.

Response Body

Change email request accepted.

application/json
  1. response
message*string
Example Request
curl -X POST 'https://example.com/api/auth/string/change_email/request' \
  -H 'Content-Type: application/json' \
  -d '{
  "newEmail": "string",
  "reauthToken": "string"
}'
Example Response
{
  "message": "string"
}