Skip to content
The API may change between versions while TTX-Zone is 0.x.

Set preferred MFA

PUT
/api/v1/auth/mfa/preferred
curl --request PUT \
--url https://example.com/api/v1/auth/mfa/preferred \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: <X-CSRF-Token>' \
--cookie ttx_access_token=<ttx_access_token> \
--data '{ "method": "totp" }'

Choose which second factor a challenge opens on.

Media typeapplication/json
MfaPreferredRequest
object
method
required
Method
string
Allowed values: totp email

Successful Response

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}