---
title: "Verify User Code"
method: PATCH
path: "/v1/2fa/{id}/codes"
tags: ["Two Factor Codes"]
---

# Verify User Code

`PATCH /v1/2fa/{id}/codes`

This endpoint allows you to verify the security code to Validate the user, Cancel the security code and check the Status of the code. You need to provide the code generator <code>id</code>, the request id and the security code of the user once he entered it into your app to perform each action as mentioned above.

## Path parameters

- `id` integer, required

## Request body

- TwoFactorCodeActionBody
  - `action` string, required — action to be executed on the code
  - `requestId` string, required — id of the request
  - `code` string, required — code

## Response `200`

Success, Code is Valid

- BaseResponse
  - `meta` MetadataDTO
    - `timestamp` integer, required — Transaction's date in timestamp
    - `transactionId` string, required — Id for the current transaction (Endpoint's call)
    - `explain` string — Explain string in case of failure

## Other responses

- `401` — User not allowed
- `403` — Forbidden access
- `404` — Not found or not valid request id
- `412` — Precondition failed
- `500` — Internal Server Error

---

[API](https://skmtc.dev/messangi/apis/raven.md) · [All operations](https://skmtc.dev/messangi/apis/raven/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/messangi/raven/revisions/c87f398fa338/schema)
