PUT /mfa/enrollments/{id} – Updates or creates an MFA enrollment configuration for a user.


Headers:

  • Authorization: Bearer <access_token> (required)
  • Content-Type: application/json or application/x-www-form-urlencoded (required)

Body:

  • provider: The authentication provider (optional). Defaults to auth0-user.
  • requiresMfa: Boolean indicating if MFA is required for the user (required).

Path Parameters:

  • id: The ID of the MFA enrollment to update or create. (required)

Query Parameters:

  • None


Status Code Meaning When it Happens
400 Bad Request Missing or invalid fields in request body
401 Unauthorized Missing or invalid authentication token
404 Not Found Specified MFA enrollment not found
500 Internal Server Error Unexpected error during MFA enrollment update
{
"error": "Detailed error message here"
}

PUT /mfa/enrollments/exampleMfaEnrollmentId
{
"requiresMfa": true
}
PUT /mfa/enrollments/exampleMfaEnrollmentId
{
"provider": "cognito-user",
"requiresMfa": true
}
{
"id": "exampleMfaEnrollmentId",
"requiredMfa": true
}

  • Parameters

    • event: APIGatewayProxyEvent

      The API Gateway event containing the request.

    • context: Context
    • callback: Callback<APIGatewayProxyResult>

    Returns void | Promise<APIGatewayProxyResult>

    A Promise resolving to an API Gateway-compatible response.