Skip to content

Totp Setup

POST
/auth/totp/setup
curl --request POST \
--url https://example.com/auth/totp/setup

Begin enrollment: mint a secret (encrypted at rest) and return it + the otpauth:// URI. Re-running before enable simply rotates the unverified secret; 409 once 2FA is live (disable first — prevents silently swapping the authenticator without a code).

Successful Response

Media typeapplication/json
TotpSetupResponse
object
otpauth_uri
required
Otpauth Uri
string
secret
required
Secret
string
Examplegenerated
{
"otpauth_uri": "example",
"secret": "example"
}