Documentation v2.3.0.

API RestAuth

Dernière mise à jour le 20 juillet 2026

PATCH
/auth/user/2fa/email

Enable or disable email-based 2FA for the authenticated user.

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Payload to enable or disable email 2FA from the user profile.

  • Enable (step 1): { enabled: true } → triggers OTP send, returns 202.
  • Enable (step 2): { enabled: true, challenge_id, code } → confirms activation.
  • Disable: { enabled: false, password } → verifies password and disables.

Response Body

application/json

application/json