---
title: "Confirm MFA enrollment."
method: POST
path: "/api/users/me/mfa/confirm"
tags: ["Users"]
---

# Confirm MFA enrollment.

`POST /api/users/me/mfa/confirm`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/users/me/mfa/confirm`
- Auth: HTTP bearer

Completes enrollment with a code from the authenticator app for the secret POST /api/users/me/mfa returned. From then on, sign-in asks for a code. Revokes the user's session keys, so the person signs in again with MFA. Requires the scope but not an administrator. Recorded as a user_mfa_enrolled audit event. Requires the `users:write` scope.

## Headers

- `Authorization` string, required

## Request body

- MfaCodeRequest
  - `code` string

## Response `204`

MFA is enrolled.

## Other responses

- `400`: The code is missing or not valid.
- `401`: The Authorization header is absent or the API key is not recognized.
- `403`: The key does not hold users:write.
- `404`: Not Found
- `406`: No representation matches Accept.
- `409`: MFA is not available, the user is already enrolled, or no enrollment was started.
- `413`: Content Too Large
- `415`: Unsupported Media Type
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-10** `c4f85daa9208`: 17 info
  - added the non-success response with the status `404`
  - added the optional property `field` to the response with the `400` status
  - added the optional property `field` to the response with the `401` status
  - added the optional property `field` to the response with the `403` status
  - …13 more
- **2026-10-05** `4082c17721d8`: 5 breaking, 5 info
  - removed the media type `*/*` for the response with the status `401`
  - removed the media type `*/*` for the response with the status `413`
  - removed the media type `*/*` for the response with the status `415`
  - removed the media type `*/*` for the response with the status `500`
  - …6 more
- **2026-10-05** `2cd7275cfcb5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/philterd/apis/philter-api/changes/api/users/me/mfa/confirm/post.md)

---

[API](https://skmtc.dev/philterd/apis/philter-api.md) - [All operations](https://skmtc.dev/philterd/apis/philter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/philterd/apis/philter-api/revisions/aa3d7ad1aab4?raw)
