RiskPilot API
RiskPilot customer API

Your two-factor state

GET
/api/v1/customer/2fa

Your two-factor state › Responses

OK

enabled
​boolean · required
required
​boolean · required
recoveryCodesLeft
​integer · required

Turn off 2FA (password and a code)

POST
/api/v1/customer/2fa/disable

Turn off 2FA (password and a code) › Request Body

code
​string · required

A 6-digit authenticator code, or a recovery code (xxxx-xxxx).

password
​string

When you have one.

Turn off 2FA (password and a code) › Responses

OK

enabled
​boolean · required

Turn on 2FA with a first code (ends your other sessions)

POST
/api/v1/customer/2fa/enable

Turn on 2FA with a first code (ends your other sessions) › Request Body

code
​string · required

6 digits.

Turn on 2FA with a first code (ends your other sessions) › Responses

OK

recoveryCodes
​string[] · required

Ten one-time codes, shown only here.

enabled
​boolean

New recovery codes (the old ones stop)

POST
/api/v1/customer/2fa/recovery-codes

New recovery codes (the old ones stop) › Request Body

code
​string · required

6 digits.

New recovery codes (the old ones stop) › Responses

OK

recoveryCodes
​string[] · required

Ten one-time codes, shown only here.


Start turning on 2FA: a new secret (15 minutes)

POST
/api/v1/customer/2fa/setup

Start turning on 2FA: a new secret (15 minutes) › Responses

OK

secret
​string · required

Base32 TOTP secret.

otpauthUrl
​string · required

otpauth:// link for authenticator apps (QR code).

expiresInMinutes
​integer · required