Administration
Set the two-factor requirement for everyone
POST
/api/admin/2fa/globalEnables or disables the installation-wide requirement for users to set up two-factor authentication.
Headers
| Name | Type | Description |
|---|---|---|
| Authorizationrequired | string | Authentication credentials, e.g. Bearer <token>. |
Request body
| Name | Type | Description |
|---|---|---|
| requiredrequired | boolean |
Example request
Responses
200The operation completed successfully.
| Name | Type | Description |
|---|---|---|
| okrequired | boolean | Whether the operation succeeded. |
| requiredrequired | any |
200 example
400Bad request.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
400 example
401Unauthorized.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
401 example
404Not found.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
404 example
503Service unavailable.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
503 example
Code samples
cURL