> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/panel-api/resources/user/mfa-settings.md).

# Multi-factor authentication settings

> **Work in progress!**\
> This API is a work in progress and may change in future releases.\
> In this version, allowing MFA to a user automatically enables it for them.

## API actions

API path: `panel/user/mfa/settings`.

***

*required permissions*: `users: "update"`.

## Update MFA settings

> Set the multi-factor authentication policy for specific users, or for all of them.\
> \
> Both \`target\` and \`settings\` are discriminated unions on \`type\`. Note the target list is capped at \*\*100\*\* user IDs, unlike the menu preset assignment which allows 10000.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"User","description":"End users belonging to the dealer: their profiles, sessions, balance transactions, menu presets, and multi-factor authentication settings. All resources under the /panel/user/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"MfaTarget":{"description":"Which users the settings apply to. The shape depends on `type`.","oneOf":[{"$ref":"#/components/schemas/MfaTargetAll"},{"$ref":"#/components/schemas/MfaTargetSelected"}],"discriminator":{"propertyName":"type","mapping":{"all":"#/components/schemas/MfaTargetAll","selected":"#/components/schemas/MfaTargetSelected"}}},"MfaTargetAll":{"type":"object","title":"all","description":"Apply to every user of the dealer.","required":["type"],"properties":{"type":{"type":"string","enum":["all"]}}},"MfaTargetSelected":{"type":"object","title":"selected","description":"Apply to an explicit list of users.","required":["type","ids"],"properties":{"type":{"type":"string","enum":["selected"]},"ids":{"type":"array","description":"User IDs. Between 1 and 100 inclusive.","minItems":1,"maxItems":100,"items":{"type":"integer","minimum":1}}}},"MfaSettings":{"description":"Multi-factor authentication policy. The shape depends on `type`.","oneOf":[{"$ref":"#/components/schemas/MfaSettingsAllowed"},{"$ref":"#/components/schemas/MfaSettingsDisallowed"}],"discriminator":{"propertyName":"type","mapping":{"allowed":"#/components/schemas/MfaSettingsAllowed","disallowed":"#/components/schemas/MfaSettingsDisallowed"}}},"MfaSettingsAllowed":{"type":"object","title":"allowed","description":"Multi-factor authentication is permitted, using the listed factor types.","required":["type","factor_types"],"properties":{"type":{"type":"string","enum":["allowed"]},"factor_types":{"type":"array","description":"Permitted authentication factors. Must not be empty. Only `email` is currently supported.","minItems":1,"items":{"type":"string","enum":["email"]}}}},"MfaSettingsDisallowed":{"type":"object","title":"disallowed","description":"Multi-factor authentication is not permitted.","required":["type"],"properties":{"type":{"type":"string","enum":["disallowed"]}}}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API (not a HTTP code)"},"description":{"type":"string","description":"An error description"}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/panel/user/mfa/settings/update":{"post":{"tags":["User"],"summary":"Update MFA settings","operationId":"userMfaSettingsUpdate","description":"Set the multi-factor authentication policy for specific users, or for all of them.\n\nBoth `target` and `settings` are discriminated unions on `type`. Note the target list is capped at **100** user IDs, unlike the menu preset assignment which allows 10000.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target","settings"],"properties":{"target":{"$ref":"#/components/schemas/MfaTarget"},"settings":{"$ref":"#/components/schemas/MfaSettings"}}}}}},"responses":{"200":{"$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

Both `target` and `settings` vary by their `type` field. See [Update target](#update-target) and [MFA settings](#mfa-settings) below.

***

*required permissions*: `users: "read"`.

## Read default MFA settings

> Read the dealer-level default multi-factor authentication policy, applied to users with no explicit setting.\
> \
> \`value\` is \`null\` when no default has been configured. Takes no parameters beyond the session credential.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"User","description":"End users belonging to the dealer: their profiles, sessions, balance transactions, menu presets, and multi-factor authentication settings. All resources under the /panel/user/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"MfaSettings":{"description":"Multi-factor authentication policy. The shape depends on `type`.","oneOf":[{"$ref":"#/components/schemas/MfaSettingsAllowed"},{"$ref":"#/components/schemas/MfaSettingsDisallowed"}],"discriminator":{"propertyName":"type","mapping":{"allowed":"#/components/schemas/MfaSettingsAllowed","disallowed":"#/components/schemas/MfaSettingsDisallowed"}}},"MfaSettingsAllowed":{"type":"object","title":"allowed","description":"Multi-factor authentication is permitted, using the listed factor types.","required":["type","factor_types"],"properties":{"type":{"type":"string","enum":["allowed"]},"factor_types":{"type":"array","description":"Permitted authentication factors. Must not be empty. Only `email` is currently supported.","minItems":1,"items":{"type":"string","enum":["email"]}}}},"MfaSettingsDisallowed":{"type":"object","title":"disallowed","description":"Multi-factor authentication is not permitted.","required":["type"],"properties":{"type":{"type":"string","enum":["disallowed"]}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API (not a HTTP code)"},"description":{"type":"string","description":"An error description"}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/panel/user/mfa/settings/default/read":{"post":{"tags":["User"],"summary":"Read default MFA settings","operationId":"userMfaSettingsDefaultRead","description":"Read the dealer-level default multi-factor authentication policy, applied to users with no explicit setting.\n\n`value` is `null` when no default has been configured. Takes no parameters beyond the session credential.","responses":{"200":{"description":"The default policy","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"anyOf":[{"$ref":"#/components/schemas/MfaSettings"},{"type":"null"}],"description":"The configured default, or `null` when none is set."}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

`value` is `null` when the dealer has not configured a default.

***

*required permissions*: `users: "update"`.

## Update default MFA settings

> Set the dealer-level default multi-factor authentication policy. It applies to users with no explicit setting of their own.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"tags":[{"name":"User","description":"End users belonging to the dealer: their profiles, sessions, balance transactions, menu presets, and multi-factor authentication settings. All resources under the /panel/user/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Enter the panel session hash with the \"NVX \" prefix, e.g. \"NVX fa7bf873fab9333144e171372a321b06\". Obtain the hash from the accountAuth operation.","name":"Authorization","in":"header"}},"schemas":{"MfaSettings":{"description":"Multi-factor authentication policy. The shape depends on `type`.","oneOf":[{"$ref":"#/components/schemas/MfaSettingsAllowed"},{"$ref":"#/components/schemas/MfaSettingsDisallowed"}],"discriminator":{"propertyName":"type","mapping":{"allowed":"#/components/schemas/MfaSettingsAllowed","disallowed":"#/components/schemas/MfaSettingsDisallowed"}}},"MfaSettingsAllowed":{"type":"object","title":"allowed","description":"Multi-factor authentication is permitted, using the listed factor types.","required":["type","factor_types"],"properties":{"type":{"type":"string","enum":["allowed"]},"factor_types":{"type":"array","description":"Permitted authentication factors. Must not be empty. Only `email` is currently supported.","minItems":1,"items":{"type":"string","enum":["email"]}}}},"MfaSettingsDisallowed":{"type":"object","title":"disallowed","description":"Multi-factor authentication is not permitted.","required":["type"],"properties":{"type":{"type":"string","enum":["disallowed"]}}}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API (not a HTTP code)"},"description":{"type":"string","description":"An error description"}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/panel/user/mfa/settings/default/update":{"post":{"tags":["User"],"summary":"Update default MFA settings","operationId":"userMfaSettingsDefaultUpdate","description":"Set the dealer-level default multi-factor authentication policy. It applies to users with no explicit setting of their own.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["settings"],"properties":{"settings":{"$ref":"#/components/schemas/MfaSettings"}}}}}},"responses":{"200":{"$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Operation not permitted, error code 13: the session lacks the required permission.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

The default applies to users who have no explicit setting of their own.

## Types

### MFA settings

## The MfaSettings object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"components":{"schemas":{"MfaSettings":{"description":"Multi-factor authentication policy. The shape depends on `type`.","oneOf":[{"$ref":"#/components/schemas/MfaSettingsAllowed"},{"$ref":"#/components/schemas/MfaSettingsDisallowed"}],"discriminator":{"propertyName":"type","mapping":{"allowed":"#/components/schemas/MfaSettingsAllowed","disallowed":"#/components/schemas/MfaSettingsDisallowed"}}},"MfaSettingsAllowed":{"type":"object","title":"allowed","description":"Multi-factor authentication is permitted, using the listed factor types.","required":["type","factor_types"],"properties":{"type":{"type":"string","enum":["allowed"]},"factor_types":{"type":"array","description":"Permitted authentication factors. Must not be empty. Only `email` is currently supported.","minItems":1,"items":{"type":"string","enum":["email"]}}}},"MfaSettingsDisallowed":{"type":"object","title":"disallowed","description":"Multi-factor authentication is not permitted.","required":["type"],"properties":{"type":{"type":"string","enum":["disallowed"]}}}}}}
```

`factor_types` is required when `type` is `allowed`, and must not be empty.

### Update target

## The MfaTarget object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Admin Panel API","version":"1.2.0"},"components":{"schemas":{"MfaTarget":{"description":"Which users the settings apply to. The shape depends on `type`.","oneOf":[{"$ref":"#/components/schemas/MfaTargetAll"},{"$ref":"#/components/schemas/MfaTargetSelected"}],"discriminator":{"propertyName":"type","mapping":{"all":"#/components/schemas/MfaTargetAll","selected":"#/components/schemas/MfaTargetSelected"}}},"MfaTargetAll":{"type":"object","title":"all","description":"Apply to every user of the dealer.","required":["type"],"properties":{"type":{"type":"string","enum":["all"]}}},"MfaTargetSelected":{"type":"object","title":"selected","description":"Apply to an explicit list of users.","required":["type","ids"],"properties":{"type":{"type":"string","enum":["selected"]},"ids":{"type":"array","description":"User IDs. Between 1 and 100 inclusive.","minItems":1,"maxItems":100,"items":{"type":"integer","minimum":1}}}}}}}
```

When `type` is `selected`, `ids` must contain between 1 and 100 user IDs. Note this is a tighter limit than the 10000 allowed by [menu preset assignment](/docs/navixy-api/panel-api/resources/user/preset.md#menu-preset-assignment-type).

### Settings action type

* `allowed` - MFA with the specified factor types is allowed for the users.
* `disallowed` - MFA is disallowed for the users.

### Factor type

* `email` - a multi-digit code sent by email.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/panel-api/resources/user/mfa-settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
