Reference / Auth

Complete MFA enrollment for a login that demanded it: verify the enrolled TOTP factor and sign in at `aal = 2`. Throttled like `mfa/verify` (a 6-digit code is brute-forceable in-window).

POST /v1/auth/mfa/enroll/complete
End-user session operationId: mfa_enroll_complete

Authorization

Called from the browser with the publishable application id (x-application-id); the access token lives in memory.

Request body · required

  • code string required
  • factor_id string<uuid> required uuid
  • pending_token string required

Responses

200 Enrolled + signed in
{
  "data": {
    "tokens": {
      "aal": 0,
      "access_token": "string",
      "expires_in": 0,
      "refresh_token": "string",
      "session_id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
      "token_type": "string"
    },
    "user": {
      "created_at": "2026-01-15T09:30:00Z",
      "email_verified": false,
      "id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
      "primary_email": "string",
      "profile": {},
      "status": "string"
    }
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "meta": {
    "timestamp": "string"
  },
  "success": false
}
401 Incorrect code or invalid/expired pending token

Request

curl -X POST "http://localhost:8080/v1/auth/mfa/enroll/complete" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "string",
  "factor_id": "018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f",
  "pending_token": "string"
}'

Try it

live request
POST http://localhost:8080/v1/auth/mfa/enroll/complete

Request body

application/json