Skip to content

Update Own MFA Setting

PUT
/api/v1/users/self/mfa
curl --request PUT \
--url https://api.spartanauth.com/api/v1/users/self/mfa \
--header 'Content-Type: application/json' \
--data '{ "enabled": true }'

Turns a second factor on or off for the signed-in user’s own sign-ins when the platform and the sector do not already require one. When either already requires MFA, the call is rejected and the stored choice is left unchanged. Existing sessions stay valid until they expire.

Media type application/json
object
enabled
boolean
Example generated
{
"enabled": true
}

A successful response.

Media type application/json

OwnMFASetting is the signed-in user’s MFA opt-in. Platform and sector requirements win. The profile flag can only add a requirement.

object
enforcedByPolicy

True when the platform or the sector already requires a second factor.

boolean
enabled

The user’s own opt-in. A false value does not turn off a platform or sector requirement.

boolean
Example generated
{
"enforcedByPolicy": true,
"enabled": true
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}