Overview
PUT
/account/mfa/preferencemfaSet the preferred 2FA method
Replace a record in preference.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- method"sms" | "totp" | "webauthn"
Example
{
"method": "sms"
}Responses
200
Preference
- preferredMethod"sms" | "totp" | "webauthn"
Example
{
"preferredMethod": "sms"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X PUT "https://api.agenticdeveloperhub.com/account/mfa/preference" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "sms"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/account/mfa/preference", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"method\": \"sms\"\n}",
});
const data = await res.json();