Two-Factor

TOTP y códigos de recuperación para usuarios con 2FA activado.

Base path: /two-factor·3 endpoints·Source: mosend-wb-backend/src/modules/two-factor/two-factor.controller.ts
POST/two-factor/enroll
bearer

Inicia el alta de 2FA y devuelve el secreto/QR TOTP.

Respuestas

  • 201
curl -X POST 'https://api.mosend.dev/two-factor/enroll' \
  -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "createdAt": "2026-05-01T03:42:18.123Z"
  },
  "timestamp": "2026-05-01T03:42:18.123Z"
}
POST/two-factor/verify
bearer

Verifica el código TOTP y activa el 2FA.

Body

VerifyDtoparámetro: dto

Respuestas

  • 201
curl -X POST 'https://api.mosend.dev/two-factor/verify' \
  -H 'X-Api-Key: mk_live_<prefix>.<secret>' \
  -H 'Content-Type: application/json' \
  -d '{"name": "string","description": "string"}'
Response · 200
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "description": "string"
  },
  "timestamp": "2026-05-01T03:42:18.123Z"
}
POST/two-factor/disable
bearer

Desactiva el 2FA del usuario.

Respuestas

  • 204
curl -X POST 'https://api.mosend.dev/two-factor/disable' \
  -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "createdAt": "2026-05-01T03:42:18.123Z"
  },
  "timestamp": "2026-05-01T03:42:18.123Z"
}