# Update user's two-factor authentication settings

Updates user's two-factor authentication settings from server.
 

{% html name="div" attrs={"class": "notice"} %}
Notice

Rate limits for server-side methods are applied to this method.
{% /html %}

Endpoint: POST /projects/{project_id}/users/{user_id}/mfa
Version: v1
Security: Server

## Path parameters:

  - `user_id` (string, required)
    User ID. You can find it in Publisher Account > your Login project > Users.

  - `project_id` (string, required)
    Login project ID from Publisher Account.

## Request fields (application/json):

  - `change_restricted` (boolean)
    Status of two-factor authentication change restriction. Set true value for enabling, and false value otherwise.
    Example: true

  - `enabled` (boolean)
    Status of two-factor authentication settings. Set true value for enabling, and false value otherwise.
    Example: true

  - `mfa_type` (string, required)
    Type of the second factor. You must enable the specified type for the Login project. Contact your Customer Success Manager to set it up.
    Enum: "email"

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.

## Response 401 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.

## Response 403 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.

## Response 404 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.

## Response 422 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.


## Response 204 fields
