---
title: "Add a MFA verification"
method: POST
path: "/api/my-account/mfa-verifications"
tags: ["My account"]
---

# Add a MFA verification

`POST /api/my-account/mfa-verifications`

Add a MFA verification to the user, a logto-verification-id in header is required for checking sensitive permissions.

## Request body

- union
  - object
    - `type` string, "WebAuthn", required
    - `newIdentifierVerificationRecordId` string, required
    - `name` string
  - object
    - `type` string, "Totp", required
    - `secret` string, required
    - `code` string
  - object
    - `type` string, "BackupCode", required
    - `codes` string[], required
  - object
    - `type` 'WebAuthn', required — The type of the MFA verification.
    - `newIdentifierVerificationRecordId` string, required — The identifier verification record ID for the new WebAuthn registration verification.
    - `name` string — The name of the MFA verification, if not provided, the name will be generated from user agent.
  - object
    - `type` 'TOTP', required — The type of the MFA verification, for TOTP, one user can only bind one TOTP factor.
    - `secret` string, required — The TOTP secret for the MFA verification. Use the generate endpoint to create a secret, and verify the generated code with the user before binding to make sure the user has setup the secret in their authenticator app.
    - `code` string — Optional. The TOTP code generated by the secret to verify the binding.
  - object
    - `type` 'BackupCode', required — The type of the MFA verification, for backup codes, one user can only bind one set of backup codes and requires at least one other MFA factor.
    - `codes` string[], required — Array of backup codes. Use the generate endpoint to create codes.

## Response `204`

No Content

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Content

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/revisions/0287c6a59eba/schema)
