Skip to main content
POST
/
v1
/
users
/
{id}
/
mfa
/
setup
Initiate MFA Setup
curl --request POST \
  --url https://identity.sandbox.lerian.net/v1/users/{id}/mfa/setup \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "mfaType": "app"
}
'
{
  "secret": "JBSWY3DPEHPK3PXP",
  "url": "otpauth://totp/Lerian:johndoe?secret=JBSWY3DPEHPK3PXP&issuer=Lerian",
  "recoveryCodes": [
    "a1b2c3d4e5",
    "f6g7h8i9j0",
    "k1l2m3n4o5"
  ],
  "mfaType": "app",
  "enabled": false
}

Documentation Index

Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The authorization token in the 'Bearer ' format.

Path Parameters

id
string
required

The unique identifier of the user you want to retrieve.

Body

application/json

Information required to initiate MFA setup for a user.

mfaType
enum<string>
required

The type of MFA to configure.

Available options:
app,
email,
sms

Response

MFA setup initiated successfully. Store the secret and recovery codes before proceeding to verification.

The result of an MFA setup initiation, including the secret and recovery codes.

secret
string

TOTP secret to be stored securely by the user or app.

url
string

OTP Auth URL for QR code generation (TOTP only).

recoveryCodes
string[]

One-time recovery codes to be stored by the user.

mfaType
enum<string>

The MFA type that was configured.

Available options:
app,
email,
sms
enabled
boolean

Indicates whether MFA is currently enabled.