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.
Responses
-
The primary email was updated successfully.
-
The new verification record is invalid.
-
Permission denied, recent user authentication is required.
-
Permission denied, the application is a third-party application. The Account API only accepts mutations from first-party applications.
-
Unprocessable Content
POST
/api/my-account/primary-email
curl \
--request POST 'https://[tenant_id].logto.app/api/my-account/primary-email' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"email": "string",
"newIdentifierVerificationRecordId": "string"
}'
Request examples
{
"email": "string",
"newIdentifierVerificationRecordId": "string"
}