Update primary email
Update primary email for the user, a logto-verification-id in header is required for checking sensitive permissions, and a new identifier verification record is required for the new email ownership verification.
Body Required
-
The new email for the user.
Format should match the following pattern:
/^\S+@\S+\.\S+$/
. -
The identifier verification record ID for the new email ownership verification.
POST
/api/my-account/primary-email
curl \
-X POST https://[tenant_id].logto.app/api/my-account/primary-email \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"string","newIdentifierVerificationRecordId":"string"}'
Request examples
{
"email": "string",
"newIdentifierVerificationRecordId": "string"
}