Skip to main content
POST
Confirm New 2FA Method

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
code
string

Verification code from the new 2FA method being confirmed

Example:

"123456"

secret
string

The tfa_secret returned when the code was sent (SMS) or the TOTP secret from the setup step

Example:

"abc123secret"

tfa_method
enum<string>

Type of two-factor authentication method being confirmed; defaults to 'sms' when a phone number is provided.

Available options:
sms,
totp
Example:

"totp"

phone_number
string

Phone number for SMS methods; falls back to account's registered number

Example:

"+14155550123"

label
string

Optional display name for this method

Example:

"Personal Phone"

Response

Returns {success: true, msg: "{METHOD} 2FA method added successfully."} and includes backup_codes: [...] if this is the user's first 2FA method.

success
boolean

Always true on success

msg
string

Confirmation message, e.g. "SMS 2FA method added successfully."

backup_codes
string[]

Plaintext backup codes (returned only when this is the user's first ever 2FA method); store securely — shown only once