---
title: "Create an MFA TOTP token that proves TOTP code checking has passed as a specific time for posture checks."
method: POST
path: "/current-api-session/totp-token"
tags: ["Current API Session", "MFA"]
---

# Create an MFA TOTP token that proves TOTP code checking has passed as a specific time for posture checks.

`POST /current-api-session/totp-token`

## Request

- Base URL: `https://demo.ziti.dev/edge/client/v1`
- URL: `https://demo.ziti.dev/edge/client/v1/current-api-session/totp-token`
- 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-api-session/totp-token/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a TOTP token that proves TOTP validation occurred at a specific time. Used in posture response for posture checks.

## Request body

- MfaCode
  - `code` string, required

## Response `200`

A TOTP token create response, contains a token used to satisfy posture checks

- TotpTokenEnvelope
  - `data` TotpToken, required
    - `issuedAt` string, date-time, required
    - `token` string, required
  - `meta` Meta, required
    - `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
- `404`: The requested resource does not exist

## Changes

- **2025-11-04** `e8b8c6cc7e72`: 1 info
  - endpoint added
- **2024-05-29** `cce2800c1357`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/openziti/apis/ziti-edge-client/changes/current-api-session/totp-token/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)
