Create a new MFA verification code and send it to the user's bound identifier (email or phone). This endpoint automatically uses the user's bound email address or phone number from their profile for MFA verification. The user must be identified before calling this endpoint.
Responses
-
The MFA verification code has been successfully sent to the user's bound identifier.
-
Bad request.
-session.identifier_not_found:The user is not identified.
-session.mfa.mfa_factor_not_enabled:The MFA factor is not enabled in the sign-in experience settings, or the user has no primary identifier of the specified type.
-session.mfa.mfa_factor_not_enrolled:The user has not set up the MFA factor. -
User not found.
-
Too Many Requests
-
The connector for the specified identifier type is not configured.
curl \
--request POST 'https://[tenant_id].logto.app/api/experience/verification/mfa-verification-code' \
--header "Content-Type: application/json" \
--data '{
"identifierType": "email"
}'
{
"identifierType": "email"
}
{
"verificationId": "string"
}