Turning on MFA with an authenticator app (TOTP)
Multi-factor authenticationAn authenticated user enrols a TOTP authenticator (the totp method) and confirms it. Counterpart to phone-OTP enrolment (scenario 25).
- POST /v1/me/mfa/enroll → provisioningUri — render as a QR code for the authenticator app
- POST /v1/me/mfa/enroll/confirm → enables totp, returns recovery codes once (if first method)
/v1/me/mfa/enrollauthBegin TOTP MFA enrolmentNo body. Returns a provisioningUri (otpauth://…). The secret is stored but UNCONFIRMED; re-calling enroll before confirm REPLACES the pending secret.
Field guide — what each value means & where it comes fromno inputs
No request body, no path/query params, no caller-set headers. Just send the call on a live authenticated session (the tester supplies the accessToken / Bearer and the gateway injects x-gateway-context). Returns a TOTP provisioningUri to render as a QR code; enrollment stays pending until confirmed via POST /v1/me/mfa/enroll/confirm. Calling again replaces any pending secret.
POST https://api.kerja.team/v1/me/mfa/enrollResponse guide — what comes back & what each value means2 fields
200 OK with the { data } envelope; response header Cache-Control: no-store (no Set-Cookie). Body carries a single TOTP provisioning URI used to begin (not yet activate) MFA enrollment.
dataobjectalwaysdata.provisioningUristringalways/v1/me/mfa/enroll/confirmauthConfirm TOTP MFA enrolmentThe current TOTP code. Returns 8 one-time recovery codes if this is your first method — shown ONCE and not retrievable later (you can only regenerate a fresh set, scenario 27). After enabling, future logins carry an MFA hop; an mfa_totp challenge sends nothing — the code comes from the app, so no resend step applies.
Field guide — what each value means & where it comes from1 field
Confirms MFA enrollment by proving a live TOTP code; returns one-time recovery codes shown once. Needs an authenticated session (Authorization + gateway context handled by the tester). No path/query params or required custom headers.
codebodystringrequiredauthenticatorPOST https://api.kerja.team/v1/me/mfa/enroll/confirmResponse guide — what comes back & what each value means3 fields
200 OK with the standard { data } envelope; response header Cache-Control: no-store, no Set-Cookie. Body returns the one-time recovery codes generated when MFA is enabled — shown only once and never retrievable again.
dataobjectalwaysdata.recoveryCodesarrayalwaysdata.recoveryCodes[]stringalways