# Проверка кода подтверждения

## Проверка кода

<mark style="color:green;">`POST`</mark> `https://direct.i-dgtl.ru/api/v1/verifier/check`

Запрос позволяет проверить код подтверждения, указанный абонентом

#### Headers

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark>  | String | `application/json` |
| Authorization<mark style="color:red;">\*</mark> | String | `Bearer {TOKEN_3}` |

#### Request Body

| Name                                   | Type   | Description                                 |
| -------------------------------------- | ------ | ------------------------------------------- |
| uuid<mark style="color:red;">\*</mark> | String | `uuid`, переданный в ответ на отправку кода |
| code<mark style="color:red;">\*</mark> | String | Код, введенный абонентом                    |

{% tabs %}
{% tab title="200: OK" %}
При корректном запросе возвращается статус проверки

```
{
  "status": "CONFIRMED"
}
```

{% endtab %}
{% endtabs %}

| Значение status | Описание                                                                |
| --------------- | ----------------------------------------------------------------------- |
| `CONFIRMED`     | Переданный код совпадает с отправленным                                 |
| `WRONG_CODE`    | Переданный код не совпадает с отправленным                              |
| `EXPIRED`       | Превышено допустимое количество проверок, либо истекло время жизни кода |
| `NOT_FOUND`     | Факт отправки кода не найден                                            |

{% hint style="info" %}

* Время жизни кода и максимальное количество отправок кодов на один номер в единицу времени настраивается в модуле в личном кабинете
* Максимальное количество попыток подтверждения кода – 3
  {% endhint %}

## Пример тела запроса

```
{
  "uuid": "b8e52cdd-f5de-4c3c-95bc-63e841c70be9",
  "code": "3344"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.docs.direct.i-dgtl.ru/verifier/api/check.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
