---
title: "Initiate MFA enrollment"
method: POST
path: "/current-identity/mfa"
tags: ["Current Identity", "MFA"]
---

# Initiate MFA enrollment

`POST /current-identity/mfa`

## Request

- Base URL: `https://demo.ziti.dev/edge/client/v1`
- URL: `https://demo.ziti.dev/edge/client/v1/current-identity/mfa`
- Auth: one of:
  - API key in header `zt-session`
  - OAuth 2
    - Authorization code: `/oidc/authorize`
    - Token URL: `/oidc/token` scopes: `openid`
- TypeScript: <https://skmtc.dev/openziti/apis/ziti-edge-client/docs/current-identity/mfa/post.ts> (a function with typed inputs; its response is checked against the schema)

Allows authenticator based MFA enrollment. If enrollment has already been completed, it must be disabled before attempting to re-enroll. Subsequent enrollment request is completed via `POST /current-identity/mfa/verify`

## Response `201`

The create request was successful and the resource has been added at the following location

- CreateEnvelope
  - `data` CreateLocation
    - `_links` object: A map of named links
    - `id` string
  - `meta` Meta
    - `apiEnrollmentVersion` string
    - `apiVersion` string
    - `filterableFields` string[]
    - `pagination` Pagination
      - `limit` number, required
      - `offset` number, required
      - `totalCount` number, required

## Other responses

- `401`: The supplied session does not have the correct access rights to request this resource
- `409`: The identity is already enrolled in MFA

## Changes

- **2024-05-29** `cce2800c1357`: 3 warning
  - the optional response header `WWW-Authenticate` removed for the status `201`
  - the optional response header `WWW-Authenticate` removed for the status `401`
  - the optional response header `WWW-Authenticate` removed for the status `409`

[Operation history](https://skmtc.dev/openziti/apis/ziti-edge-client/changes/current-identity/mfa/post.md)

---

[API](https://skmtc.dev/openziti/apis/ziti-edge-client.md) - [All operations](https://skmtc.dev/openziti/apis/ziti-edge-client/llms.txt) - [OpenAPI document](https://skmtc.dev/openziti/apis/ziti-edge-client/revisions/f7b51eaafbbb?raw)
