---
title: "Create a new detect liveness session."
method: POST
path: "/detectLiveness/singleModal/sessions"
---

# Create a new detect liveness session.

`POST /detectLiveness/singleModal/sessions`

A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.

Permissions includes...
>
*
  * A token lifetime of 10 minutes.

> [!NOTE]
> Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries.

## Request body

- CreateLivenessSessionContent — Request model for creating liveness session.
  - `livenessOperationMode` 'Passive' | 'PassiveActive', required — The liveness operation mode to drive the client's end-user experience.
  - `sendResultsToClient` boolean — Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented.
  - `deviceCorrelationIdSetInClient` boolean — Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body.
  - `enableSessionImage` boolean — Whether or not store the session image.
  - `livenessSingleModalModel` '2022-10-15-preview.04' | '2023-12-20-preview.06' — The model version used for liveness classification.
  - `deviceCorrelationId` string — Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null.
  - `authTokenTimeToLiveInSeconds` integer — Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600.

## Response `200`

A successful call create a session for a client device and provide an authorization token for use by the client application for a limited purpose and time.

- CreateLivenessSessionResult — Response of liveness session creation.
  - `sessionId` string, required — The unique session ID of the created session. It will expire 48 hours after it was created or may be deleted sooner using the corresponding Session DELETE operation.
  - `authToken` string, required — Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has limited permissions to perform only the required action and expires after the TTL time. It is also auditable.

## Other responses

- `default` — An unexpected error response.

## Changes

- **2026-07-13** `44e2cf82becd` — 1 info
  - endpoint added
- **2026-07-13** `e1f63ec9983b` — 1 info
  - endpoint added
- **2026-07-13** `5375faa8d134` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/azure/apis/ai-face/changes/detectLiveness/singleModal/sessions/post.md)

---

[API](https://skmtc.dev/azure/apis/ai-face.md) · [All operations](https://skmtc.dev/azure/apis/ai-face/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/ai-face/revisions/44e2cf82becd/schema)
