---
title: "Validate a code"
method: POST
path: "/v1/two-fa/verification/{session_id}/check"
tags: ["2FA"]
---

# Validate a code

`POST /v1/two-fa/verification/{session_id}/check`

## Request

- Base URL: `https://api.wavix.com`
- URL: `https://api.wavix.com/v1/two-fa/verification/{session_id}/check`
- Auth: HTTP bearer

Validates the OTP submitted by the end user against the verification identified by `session_id`. Non-idempotent — each call consumes one of a limited number of attempts tracked server-side; once exhausted, the verification returns `429` until a new verification is created.

## Path parameters

- `session_id` string, required

## Request body

- TwoFactorVerificationCheckRequest
  - `code` string, required: The code entered by an end user

## Response `200`

Returns the validation result in `is_valid`.

- TwoFactorVerificationCheckResponse
  - `is_valid` boolean, required: Indicates whether the entered code is valid

## Other responses

- `400`: Returns a validation error when a required field is missing or invalid.
- `401`: Unauthorized
- `403`: Request failed. The feature is disabled for your account.
- `404`: Request failed. An object with the specified ID is not found.
- `429`: Too many requests

## Changes

- **2026-09-08** `6a89c962481c`: 1 breaking, 5 info
  - the response's body type changed from no type to `object` for status `200`
  - removed `#/components/schemas/TwoFactorVerificationCheckResponse, subschema #2` from the response body `allOf` list for the response status `200`
  - added the non-success response with the status `401`
  - added the non-success response with the status `404`
  - …2 more
- **2026-06-15** `76b9bb35619f`: 1 warning
  - removed the optional property `error_code` from the response with the `403` status
- **2026-05-25** `33be77905120`: 1 info
  - the endpoint scheme security `bearerAuth` was added to the API

[Operation history](https://skmtc.dev/wavix/apis/wavix-apis/changes/v1/two-fa/verification/:session_id/check/post.md)

---

[API](https://skmtc.dev/wavix/apis/wavix-apis.md) - [All operations](https://skmtc.dev/wavix/apis/wavix-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/wavix/apis/wavix-apis/revisions/f2dde79f05ab?raw)
