> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Создание события мониторинга через API

> Didit: отправка событий входа, игры, бонусов, платежей, споров и безопасности с вашего бэкенда. Событие сохраняется, обогащается и оценивается по правилам.



Промпт для API создания события мониторинга
        Скопировать промпт в буфер обмена



      
      

\<pre>

\`Send one non-monetary monitoring event (login, session, gameplay, bonus, affiliate, payment, dispute, security, responsible gambling or custom) from my backend to Didit.

Endpoint:
POST https://verification.didit.me/v3/events/

Authentication:
Use the x-api-key header with my Didit API key, from my backend only. A scoped key needs transactions: write.

Goal:
\- Record what happened on my platform so Didit's event rules can score it alongside my transactions, and read the verdict from the response.

Request body (application/json):
\{
"event_id": "login-2026-10-17-000001",   // required - my id, unique per application, the idempotency key (max 128)
"event_category": "auth",                // required - auth, session, gameplay, bonus, affiliate, payment, dispute, security, responsible_gambling, custom
"action_type": "login",                  // required - what happened inside the category (max 128)
"occurred_at": "2026-10-17T09:15:02.481Z", // required - at most 7 days in the past, 5 minutes in the future
"subject": { "vendor_data": "user-42", "entity_type": "individual" }, // required - entity_type individual (default) or company
"session": { "session_id": "web-session-abc", "sequence": 142 },
"device_context": { "fingerprint": "didit-fp-v2:a8c1", "network_context": { "ip_address": "203.0.113.42" } },
"transaction_context": { "amount": "1000.00", "currency": "EUR", "payment_reference_id": "dep_735" },
"payload": { "method": "password" },     // category fields, max 16 KB
"custom_values": { "vip_tier": "gold" }  // max 100 scalar keys
}

Behavior:
\- Validated, stored, IP-enriched and evaluated by the real-time event rules before the response returns. Cross-subject and long-window rules run asynchronously within minutes (correlation_pending: true).
\- Some actions require payload keys, for example gameplay.p2p_settlement (game_id, counterparty_vendor_data, stake_amount, net_result_amount, role, and one of hand_id, round_id, match_id), payment.deposit_completed (payment_reference_id, amount, currency, payment_method, status) and dispute.chargeback_opened (payment_reference_id and one of dispute_id, chargeback_id). transaction_context keys count towards these requirements.
\- Send hashes and references, never a card number, a full withdrawal address, a password hash or an MFA secret.
\- Idempotency: the same event_id with the same event_category, action_type, occurred_at, subject.vendor_data and payload returns 200 with idempotent_replay true and the stored event's result. Different values in those fields return 409; the other fields are not compared. Retry safely on timeouts.
\- The IP address used for enrichment and rules is device_context.network_context.ip_address as you send it.
\- In a sandbox application no rules run: status is ACCEPTED and rules_evaluated_count is 0.
\- The subject resolves to the user (or company) with that vendor_data; one is created when none exists.
\- Event ingestion is opt-in: until it is switched on in Transactions > Settings > Event monitoring, this call returns 403 with code event_monitoring_disabled and stores nothing.

Example call:
curl -X POST "https://verification.didit.me/v3/events/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"event_id":"login-2026-10-17-000001","event_category":"auth","action_type":"login","occurred_at":"2026-10-17T09:15:02.481Z","subject":{"vendor_data":"user-42"},"device_context":{"network_context":{"ip_address":"203.0.113.42"}},"payload":{"method":"password"}}'

What to read from the response:
\- event_uuid - Didit id of the stored event.
\- status - ACCEPTED (stored, no rule changed it), APPROVED, IN_REVIEW or DECLINED.
\- score, rules_evaluated_count, rules_matched_count, rule_matches[] (rule_id, library_key, mode, is_async).
\- correlation_pending - when true, read GET /v3/events/{event_uuid}/ later for the final status.
\- retention_class and expires_at (null for payment and dispute events).
\- idempotent_replay - true when the event was already stored.

Failure modes:
\- 400 - validation error keyed by field (missing field, occurred_at outside the window, payload over 16 KB, nested custom_values, missing required payload keys).
\- 401 - the API key has expired.
\- 403 - missing API key (a wrong, revoked or expired key gets 401), a scoped key without transactions: write, or code event_monitoring_disabled.
\- 409 - event_id reused with different content; use a new event_id.
\- 429 - more than 600 ingestion requests per minute for this API key (event and transaction ingestion share this budget, apart from the 300 of every other write); honor Retry-After.

Side effects: stores the event, may create the subject's user or company, and applies the actions of matched active rules (score, status, tags, notes, list entries, cases).

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

Вставьте в

> [!NOTE]
>
> Отправка событий требует явного включения. Включите её в разделе **Transactions > Settings > Event monitoring** перед тем, как отправлять события. До этого момента endpoint возвращает `403` с `"code": "event_monitoring_disabled"`.[Прием событий](https://docs.didit.me/ru/transaction-monitoring/events.md) описывает обёртку события, десять категорий, обязательные ключи payload и классы хранения. [Правила для событий](https://docs.didit.me/ru/transaction-monitoring/event-rules.md) объясняют, какие правила выполняются в самом запросе, а какие асинхронно. Чтобы отправлять события из браузера или приложения, а не с вашего бэкенда, используйте [отправку событий через SDK](https://docs.didit.me/ru/transaction-monitoring/sdk-event-submission.md).


## OpenAPI

````yaml ru/openapi-25.json POST /v3/events/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: >-
    API верификации личности. Аутентификация выполняется с помощью заголовка
    x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/events/:
    post:
      tags:
        - Monitoring Events
      summary: Создать событие мониторинга
      description: >-
        Отправьте одно немонетарное событие (логин, сессия, игровой процесс,
        бонус, реферал, платёж, спор, безопасность, ответственная игра или
        кастомное) из вашего бэкенда. Событие валидируется на соответствие
        контракту категории, сохраняется, обогащается IP-данными один раз для
        каждого уникального публичного адреса и проверяется вашими правилами
        событий реального времени до возврата ответа; межсубъектные правила и
        правила с длинным окном выполняются асинхронно (`correlation_pending:
        true`), а в приложении песочницы правила не выполняются вовсе. Поле
        `event_id` служит ключом идемпотентности: запрос с тем же `event_id`,
        `event_category`, `action_type`, `occurred_at`, `subject.vendor_data` и
        `payload` возвращает `200` с флагом `idempotent_replay: true` и
        сохранённым результатом (другие поля конверта не сравниваются), в то
        время как отличающиеся значения возвращают `409`. Приём событий
        подключается отдельно для каждого приложения: пока он не включён, этот
        endpoint возвращает `403` с кодом `code: event_monitoring_disabled` и
        ничего не сохраняет. API-ключу с ограниченными правами требуется
        разрешение `transactions: write`. См. [Приём
        событий](https://docs.didit.me/ru/transaction-monitoring/events) и
        [Правила для
        событий](https://docs.didit.me/ru/transaction-monitoring/event-rules);
        для отправки событий из браузера или приложения используйте [Отправку
        событий через
        SDK](https://docs.didit.me/ru/transaction-monitoring/sdk-event-submission).
      operationId: create_monitoring_event
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitoringEventCreateRequest'
            examples:
              Login:
                value:
                  event_id: login-2026-10-17-000001
                  event_category: auth
                  action_type: login
                  occurred_at: '2026-10-17T09:15:02.481Z'
                  time_zone: Europe/Madrid
                  subject:
                    vendor_data: user-42
                    entity_type: individual
                  session:
                    session_id: web-session-abc
                    sequence: 142
                  device_context:
                    fingerprint: fp-a8c1
                    network_context:
                      ip_address: 203.0.113.42
                  payload:
                    method: password
                  custom_values:
                    vip_tier: gold
              Deposit completed:
                value:
                  event_id: deposit-2026-10-17-000002
                  event_category: payment
                  action_type: deposit_completed
                  occurred_at: '2026-10-17T09:16:40Z'
                  subject:
                    vendor_data: user-42
                  transaction_context:
                    amount: '100.00'
                    currency: EUR
                    direction: inbound
                    payment_reference_id: dep_736
                  payload:
                    payment_method: card
                    status: completed
              Chargeback opened:
                value:
                  event_id: chargeback-2026-10-16-000318
                  event_category: dispute
                  action_type: chargeback_opened
                  occurred_at: '2026-10-16T14:02:11Z'
                  subject:
                    vendor_data: user-42
                  payload:
                    payment_reference_id: dep_735
                    chargeback_id: cb_5521
                    amount: '250.00'
                    currency: EUR
                    reason_code: fraud
      responses:
        '200':
          description: >-
            Идемпотентный повтор: событие с таким `event_id` и тем же содержимым
            уже сохранено. Повторное сохранение или оценка не выполнялись; тело
            ответа описывает сохранённое событие.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitoringEventIngestResult'
              examples:
                Replay:
                  value:
                    event_uuid: 33333333-4444-5555-6666-777777777777
                    event_id: login-2026-10-17-000001
                    status: ACCEPTED
                    score: 0
                    rules_evaluated_count: 6
                    rules_matched_count: 0
                    correlation_pending: false
                    retention_class: standard
                    expires_at: '2026-11-16T09:15:02.481000Z'
                    idempotent_replay: true
                    rule_matches: []
        '201':
          description: Событие сохранено и оценено.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitoringEventIngestResult'
              examples:
                Stored, no rule matched:
                  value:
                    event_uuid: 33333333-4444-5555-6666-777777777777
                    event_id: login-2026-10-17-000001
                    status: ACCEPTED
                    score: 0
                    rules_evaluated_count: 6
                    rules_matched_count: 0
                    correlation_pending: false
                    retention_class: standard
                    expires_at: '2026-11-16T09:15:02.481000Z'
                    idempotent_replay: false
                    rule_matches: []
                Rule matched, async rule pending:
                  value:
                    event_uuid: 33333333-4444-5555-6666-777777777777
                    event_id: login-2026-10-17-000001
                    status: IN_REVIEW
                    score: 40
                    rules_evaluated_count: 6
                    rules_matched_count: 1
                    correlation_pending: true
                    retention_class: risk_relevant
                    expires_at: '2027-01-15T09:15:02.481000Z'
                    idempotent_replay: false
                    rule_matches:
                      - rule_id: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                        library_key: null
                        mode: ACTIVE
                        is_async: false
        '400':
          description: >-
            Ошибка валидации. Ключами тела запроса являются поля; вложенные поля
            представляют собой вложенные объекты. Ничего не сохранено.
          content:
            application/json:
              examples:
                Missing fields:
                  value:
                    event_id:
                      - This field is required.
                    subject:
                      - This field is required.
                Unknown category:
                  value:
                    event_category:
                      - '"login" is not a valid choice.'
                occurred_at too old:
                  value:
                    occurred_at:
                      - >-
                        occurred_at is more than 7 days in the past. Use the
                        batch import lane for backfills.
                occurred_at in the future:
                  value:
                    occurred_at:
                      - occurred_at is more than 5 minutes in the future.
                Missing subject vendor_data:
                  value:
                    subject:
                      vendor_data:
                        - This field is required.
                Missing required payload keys:
                  value:
                    payload:
                      - >-
                        payment.deposit_completed requires: payment_method,
                        status.
                Missing one-of payload key:
                  value:
                    payload:
                      - >-
                        dispute.chargeback_opened requires one of: dispute_id,
                        chargeback_id.
                Security change without changed_field:
                  value:
                    payload:
                      - security.*_changed requires 'changed_field'.
                Payload too large:
                  value:
                    payload:
                      - >-
                        payload exceeds 16384 bytes. Summarise telemetry
                        client-side.
                Too many custom_values:
                  value:
                    custom_values:
                      - custom_values accepts at most 100 keys.
                Nested custom value:
                  value:
                    custom_values:
                      - >-
                        custom_values['limits'] must be a scalar - rule
                        conditions cannot address nested values.
        '401':
          description: >-
            Срок действия API-ключа с ограниченной областью действия истёк.
            Только при истёкшем сроке действия ключа возвращается `401`; при
            отсутствии ключа или его недействительности возвращается `403`.
          content:
            application/json:
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            Отсутствует `x-api-key` (неверный, отозванный или истекший ключ
            возвращает `401`), ключ с ограниченной областью действия без права
            `transactions: write`, ключ, ограниченный определёнными сценариями
            или одобренными сессиями (такой ключ никогда не получает доступ к
            данным мониторинга транзакций), либо запрос отправлен не из списка
            разрешённых адресов ключа. Также возвращается с `code:
            event_monitoring_disabled`, пока сбор событий выключен для
            приложения; в этом случае ничего не сохраняется, а проверка
            выполняется до валидации тела запроса.
          content:
            application/json:
              examples:
                Event monitoring disabled:
                  value:
                    detail: >-
                      Event monitoring is not enabled for this application. Turn
                      on event ingestion in the transaction monitoring settings
                      before submitting events.
                    code: event_monitoring_disabled
                Missing or invalid API key:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without access:
                  value:
                    detail: This API key has no write access to transactions.
                Key limited to workflows or approved sessions:
                  value:
                    detail: >-
                      This API key only reaches sessions inside its workflow or
                      status limits, so it can't use this endpoint.
                IP not allowed:
                  value:
                    detail: This API key can't be used from this IP address.
        '409':
          description: >-
            `event_id` уже использовался для события с другим содержимым
            (категория, тип действия, `occurred_at`, `vendor_data` субъекта или
            payload). Отправьте событие с новым `event_id`.
          content:
            application/json:
              examples:
                event_id reused:
                  value:
                    event_id: >-
                      event_id 'login-2026-10-17-000001' already exists with a
                      different payload.
        '429':
          description: >-
            Лимит запросов превышен: создание транзакций и приём событий (`POST
            /v3/transactions/`, `POST /v3/events/`, `POST /v3/events/batch/`)
            разделяют лимит в 600 запросов в минуту на один API-ключ, отдельно
            от лимита в 300 запросов для всех остальных запросов на запись.
            Подождите `Retry-After` секунд, затем повторите попытку.
          headers:
            Retry-After:
              description: >-
                Количество секунд ожидания перед повторной попыткой, округлённое
                в большую сторону, чтобы повторный запрос попал в следующее
                окно.
              schema:
                type: integer
                minimum: 1
                example: 30
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    detail: >-
                      Ingestion rate limit exceeded. You can make up to 600
                      requests per minute.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST 'https://verification.didit.me/v3/events/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "event_id": "login-2026-10-17-000001",
                "event_category": "auth",
                "action_type": "login",
                "occurred_at": "2026-10-17T09:15:02.481Z",
                "subject": {"vendor_data": "user-42", "entity_type": "individual"},
                "session": {"session_id": "web-session-abc", "sequence": 142},
                "device_context": {
                  "fingerprint": "fp-a8c1",
                  "network_context": {"ip_address": "203.0.113.42"}
                },
                "payload": {"method": "password"}
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.monitoring_events.create(
                event_id="login-2026-10-17-000001",
                event_category="auth",
                action_type="login",
                occurred_at="2026-10-17T09:15:02.481Z",
                time_zone="Europe/Madrid",
                subject={
                    "vendor_data": "user-42",
                    "entity_type": "individual",
                },
                session={
                    "session_id": "web-session-abc",
                    "sequence": 142,
                },
                device_context={
                    "fingerprint": "fp-a8c1",
                    "network_context": {
                        "ip_address": "203.0.113.42",
                    },
                },
                payload={"method": "password"},
                custom_values={"vip_tier": "gold"},
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.monitoringEvents.create({
              event_id: "login-2026-10-17-000001",
              event_category: "auth",
              action_type: "login",
              occurred_at: "2026-10-17T09:15:02.481Z",
              time_zone: "Europe/Madrid",
              subject: {
                vendor_data: "user-42",
                entity_type: "individual",
              },
              session: {
                session_id: "web-session-abc",
                sequence: 142,
              },
              device_context: {
                fingerprint: "fp-a8c1",
                network_context: {
                  ip_address: "203.0.113.42",
                },
              },
              payload: { method: "password" },
              custom_values: { vip_tier: "gold" },
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.Create(ctx, didit.MonitoringEventCreateRequest{\n\tEventID:       \"login-2026-10-17-000001\",\n\tEventCategory: \"auth\",\n\tActionType:    \"login\",\n\tOccurredAt:    time.Date(2026, 10, 17, 9, 15, 2, 0, time.UTC),\n\tTimeZone:      didit.String(\"Europe/Madrid\"),\n\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\tVendorData: \"user-42\",\n\t\tEntityType: didit.String(\"individual\"),\n\t},\n\tSession: didit.Some(didit.MonitoringEventCreateRequestSession{\n\t\tSessionID: didit.String(\"web-session-abc\"),\n\t\tSequence:  didit.Int(142),\n\t}),\n\tDeviceContext: didit.Some(didit.MonitoringEventCreateRequestDeviceContext{\n\t\tFingerprint: didit.String(\"fp-a8c1\"),\n\t\tNetworkContext: didit.Some(didit.MonitoringEventCreateRequestDeviceContextNetworkContext{\n\t\t\tIPAddress: didit.String(\"203.0.113.42\"),\n\t\t}),\n\t}),\n\tPayload:      didit.Some(map[string]any{\"method\": \"password\"}),\n\tCustomValues: didit.Some(map[string]any{\"vip_tier\": \"gold\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.time.OffsetDateTime;

            import java.util.Map;

            import me.didit.Didit;

            import me.didit.types.MonitoringEventCreateRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.monitoringEvents().create(MonitoringEventCreateRequest.builder()
                    .eventId("login-2026-10-17-000001")
                    .eventCategory(MonitoringEventCreateRequest.EventCategory.of("auth"))
                    .actionType("login")
                    .occurredAt(OffsetDateTime.parse("2026-10-17T09:15:02.481Z"))
                    .timeZone("Europe/Madrid")
                    .subject(MonitoringEventCreateRequest.Subject.builder()
                            .vendorData("user-42")
                            .entityType("individual")
                            .build())
                    .session(MonitoringEventCreateRequest.Session.builder()
                            .sessionId("web-session-abc")
                            .sequence(142L)
                            .build())
                    .deviceContext(MonitoringEventCreateRequest.DeviceContext.builder()
                            .fingerprint("fp-a8c1")
                            .networkContext(MonitoringEventCreateRequest.DeviceContext.NetworkContext.builder()
                                    .ipAddress("203.0.113.42")
                                    .build())
                            .build())
                    .payload(Map.of("method", "password"))
                    .customValues(Map.of("vip_tier", MonitoringEventCreateRequest.CustomValuesValue.ofString("gold")))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->monitoringEvents->create([
                'event_id' => 'login-2026-10-17-000001',
                'event_category' => 'auth',
                'action_type' => 'login',
                'occurred_at' => '2026-10-17T09:15:02.481Z',
                'time_zone' => 'Europe/Madrid',
                'subject' => [
                    'vendor_data' => 'user-42',
                    'entity_type' => 'individual',
                ],
                'session' => [
                    'session_id' => 'web-session-abc',
                    'sequence' => 142,
                ],
                'device_context' => [
                    'fingerprint' => 'fp-a8c1',
                    'network_context' => [
                        'ip_address' => '203.0.113.42',
                    ],
                ],
                'payload' => ['method' => 'password'],
                'custom_values' => ['vip_tier' => 'gold'],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.monitoring_events.create(
              event_id: "login-2026-10-17-000001",
              event_category: "auth",
              action_type: "login",
              occurred_at: "2026-10-17T09:15:02.481Z",
              time_zone: "Europe/Madrid",
              subject: {
                vendor_data: "user-42",
                entity_type: "individual",
              },
              session: {
                session_id: "web-session-abc",
                sequence: 142,
              },
              device_context: {
                fingerprint: "fp-a8c1",
                network_context: {
                  ip_address: "203.0.113.42",
                },
              },
              payload: { method: "password" },
              custom_values: { vip_tier: "gold" }
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Collections.Generic;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.MonitoringEvents.CreateAsync(new
            MonitoringEventCreateRequest

            {
                EventId = "login-2026-10-17-000001",
                EventCategory = "auth",
                ActionType = "login",
                OccurredAt = DateTimeOffset.Parse("2026-10-17T09:15:02.481Z"),
                TimeZone = "Europe/Madrid",
                Subject = new()
                {
                    VendorData = "user-42",
                    EntityType = "individual",
                },
                Session = new MonitoringEventCreateRequestSession
                {
                    SessionId = "web-session-abc",
                    Sequence = 142,
                },
                DeviceContext = new MonitoringEventCreateRequestDeviceContext
                {
                    Fingerprint = "fp-a8c1",
                    NetworkContext = new MonitoringEventCreateRequestDeviceContextNetworkContext
                    {
                        IpAddress = "203.0.113.42",
                    },
                },
                Payload = new Dictionary<string, object> { ["method"] = "password" },
                CustomValues = new Dictionary<string, object> { ["vip_tier"] = "gold" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    MonitoringEventCreateRequest:
      type: object
      description: >-
        Конверт события, одинаковый для каждой категории. Принимаются псевдонимы
        в camelCase: `eventId`, `eventCategory` (или `category`), `actionType`,
        `occurredAt`, `timeZone` (или `zoneId`), `deviceContext` (или `device`),
        `transactionContext`, `customValues` (или `props`); внутри `subject`:
        `vendorData`, `entityType`, `fullName`; внутри `session`: `sessionId`,
        `pageUrl`; внутри `transaction_context`: `paymentReferenceId`.
      required:
        - event_id
        - event_category
        - action_type
        - occurred_at
        - subject
      properties:
        event_id:
          type: string
          maxLength: 128
          description: >-
            Ваш идентификатор события, уникальный в рамках приложения. Является
            ключом идемпотентности: повторная отправка тех же `event_category`,
            `action_type`, `occurred_at`, `subject.vendor_data` и `payload` с
            ним считается повтором, а любые отличия считаются конфликтом.
          example: login-2026-10-17-000001
        event_category:
          type: string
          enum:
            - auth
            - session
            - gameplay
            - bonus
            - affiliate
            - payment
            - dispute
            - security
            - responsible_gambling
            - custom
          description: Категория события.
          example: auth
        action_type:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            Что произошло внутри категории. Открытый словарь; управляемые
            действия, перечисленные в [Сборе
            событий](https://docs.didit.me/ru/transaction-monitoring/events)
            (например, `login`, `deposit_completed`, `chargeback_opened`),
            открывают доступ к типизированной валидации и полям управляемых
            правил. Начальные и конечные пробелы обрезаются.
          example: login
        occurred_at:
          type: string
          format: date-time
          description: >-
            Когда событие произошло на вашей стороне, ISO 8601 (значение без
            смещения считывается как UTC). Должно быть не более чем на 7 дней в
            прошлом и не более чем на 5 минут в будущем.
          example: '2026-10-17T09:15:02.481Z'
        time_zone:
          type: string
          nullable: true
          maxLength: 64
          description: >-
            Часовой пояс события на вашей стороне, например `Europe/Madrid`.
            Сохраняется вместе с событием; не возвращается endpoint чтения.
        subject:
          type: object
          description: >-
            Пользователь или компания, к которым относится событие.
            Соответствует пользователю (или компании) с этим `vendor_data` в
            вашем приложении; если сущность отсутствует, она будет создана.
          required:
            - vendor_data
          properties:
            vendor_data:
              type: string
              minLength: 1
              maxLength: 255
              description: Ваш id для субъекта.
              example: user-42
            entity_type:
              type: string
              maxLength: 32
              default: individual
              description: >-
                `company` определяет субъекта как компанию; любое другое
                значение (по умолчанию `individual`) определяет его как
                физическое лицо. Один и тот же `vendor_data` может указывать на
                каждого из них.
              example: individual
            full_name:
              type: string
              nullable: true
              maxLength: 512
              description: >-
                Отображаемое имя, используемое только тогда, когда это событие
                создаёт пользователя или компанию.
            email:
              type: string
              format: email
              nullable: true
              description: >-
                Проверяется как адрес электронной почты; не сохраняется в
                событии.
            phone:
              type: string
              nullable: true
              maxLength: 32
              description: Проверено; не сохраняется в событии.
            country:
              type: string
              nullable: true
              maxLength: 3
              description: Проверено; не сохраняется в событии.
        business:
          type: object
          description: >-
            Компания, к которой относится событие, если она отличается от
            субъекта. Считывается только `vendor_data`.
          additionalProperties: true
          properties:
            vendor_data:
              type: string
              maxLength: 255
              description: >-
                Ваш id для компании. Можно фильтровать как
                `business_vendor_data`.
              example: merchant-7
        session:
          type: object
          description: Ваш контекст сессии для события.
          properties:
            session_id:
              type: string
              nullable: true
              maxLength: 255
              description: >-
                Ваш идентификатор сессии. Доступен для фильтрации и возвращается
                как `session_id`.
            sequence:
              type: integer
              nullable: true
              description: >-
                Позиция события внутри сессии. Возвращается как
                `session_sequence`.
            page_url:
              type: string
              nullable: true
              maxLength: 2048
              description: Проверено; не сохраняется в событии.
            referrer:
              type: string
              nullable: true
              maxLength: 2048
              description: Проверено; не сохраняется в событии.
        device_context:
          type: object
          additionalProperties: true
          description: >-
            Контекст устройства и сети, сохраняемый в переданном виде и
            возвращаемый `GET /v3/events/{event_uuid}/`. На этом серверном
            маршруте Didit не видит подключение конечного пользователя, поэтому
            адресом, обогащаемым данными и используемым правилами, является
            `network_context.ip_address` в том виде, в котором вы его
            отправляете.
          properties:
            fingerprint:
              type: string
              maxLength: 255
              description: >-
                Цифровой отпечаток устройства. Доступна фильтрация по
                `device_fingerprint`.
            persistent_device_id:
              type: string
              maxLength: 255
              description: Ваш постоянный идентификатор устройства.
            bot_score:
              type: integer
              description: >-
                Оценка бота из вашей собственной системы обнаружения в виде
                целого числа.
            network_context:
              type: object
              additionalProperties: true
              properties:
                ip_address:
                  type: string
                  maxLength: 64
                  description: >-
                    IP-адрес конечного пользователя. Публичные адреса
                    обогащаются данными один раз для каждого уникального адреса.
                  example: 203.0.113.42
        transaction_context:
          type: object
          description: >-
            Контекст денежных средств. Непустые значения здесь также
            соответствуют обязательным ключам payload действия.
          properties:
            amount:
              type: string
              nullable: true
              description: Сумма в виде десятичной строки (число также принимается).
              example: '1000.00'
            currency:
              type: string
              nullable: true
              maxLength: 10
              description: Код валюты.
            direction:
              type: string
              nullable: true
              maxLength: 16
              description: >-
                Направление движения денежных средств, например `inbound` или
                `outbound`.
            payment_reference_id:
              type: string
              nullable: true
              maxLength: 255
              description: >-
                Ваш идентификатор платежа. Доступен для фильтрации как
                `payment_reference_id`.
        payload:
          type: object
          additionalProperties: true
          description: >-
            Доменные поля категории, не более 16384 байт после кодирования в
            JSON. Для некоторых действий требуются ключи (в `payload` или
            `transaction_context`): для `gameplay.p2p_settlement` требуются
            `game_id`, `counterparty_vendor_data`, `stake_amount`,
            `net_result_amount`, `role` и одно из `hand_id`, `round_id`,
            `match_id`; для `gameplay.bet_placed` и `gameplay.bet_settled`
            требуется `game_id`; для `payment.deposit_initiated`,
            `payment.deposit_completed`, `payment.withdrawal_requested` и
            `payment.withdrawal_completed` требуются `payment_reference_id`,
            `amount`, `currency`, `payment_method`, `status`; для
            `payment.withdrawal_address_changed` требуется
            `withdrawal_address_hash`; для `dispute.chargeback_opened`,
            `dispute.chargeback_won` и `dispute.chargeback_lost` требуются
            `payment_reference_id` и одно из `dispute_id`, `chargeback_id`; для
            `session.bot_signal_observed` требуются `telemetry_schema_version` и
            одно из `bot_score`, `actions_per_minute`, `timing_variance_ms`,
            `pointer_entropy`, `keystroke_entropy`, `reaction_time_ms_p50`; для
            `responsible_gambling.self_exclusion_match` требуются
            `registry_source`, `exclusion_status`, `identity_match_ref`. Для
            каждого действия категории `security`, оканчивающегося на
            `_changed`, требуется `changed_field`, а также
            `previous_reference_hash` или `new_reference_hash`, если полем
            является `password`, `mfa_method`, `mfa`, `email`, `phone`,
            `withdrawal_address`, `payout_method` или `api_key`. Отправляйте
            хеши и ссылки, но ни в коем случае не номер карты, полный адрес
            вывода средств, хеш пароля или секрет MFA.
        custom_values:
          type: object
          description: >-
            До 100 ваших собственных ключей, доступных из правил как
            `custom_values.<key>`. Значения должны быть скалярными (строка,
            число, логическое значение или null); вложенные объекты и массивы
            отклоняются.
          additionalProperties:
            nullable: true
            oneOf:
              - type: string
              - type: number
              - type: boolean
      example:
        event_id: login-2026-10-17-000001
        event_category: auth
        action_type: login
        occurred_at: '2026-10-17T09:15:02.481Z'
        time_zone: Europe/Madrid
        subject:
          vendor_data: user-42
          entity_type: individual
        session:
          session_id: web-session-abc
          sequence: 142
        device_context:
          fingerprint: fp-a8c1
          network_context:
            ip_address: 203.0.113.42
        payload:
          method: password
        custom_values:
          vip_tier: gold
    MonitoringEventIngestResult:
      type: object
      description: >-
        Результат приёма одного события. Для нового события и для идемпотентного
        повтора возвращается одна и та же структура.
      required:
        - event_uuid
        - event_id
        - status
        - score
        - rules_evaluated_count
        - rules_matched_count
        - correlation_pending
        - retention_class
        - expires_at
        - idempotent_replay
        - rule_matches
      properties:
        event_uuid:
          type: string
          format: uuid
          description: Идентификатор сохранённого события в Didit.
        event_id:
          type: string
          description: Ваш `event_id`.
        status:
          type: string
          enum:
            - ACCEPTED
            - APPROVED
            - IN_REVIEW
            - DECLINED
          description: >-
            Статус после выполнения правил реального времени. См.
            `MonitoringEvent.status`.
        score:
          type: integer
          description: Оценка после выполнения правил в реальном времени.
        rules_evaluated_count:
          type: integer
          minimum: 0
          description: >-
            Количество правил событий, проверенных в запросе. 0 для приложения в
            песочнице, где правила не выполняются.
        rules_matched_count:
          type: integer
          minimum: 0
          description: Количество совпавших правил, включая правила в режиме `TEST`.
        correlation_pending:
          type: boolean
          description: >-
            `true`, если асинхронное правило всё ещё должно выполниться.
            Вызовите `GET /v3/events/{event_uuid}/` через несколько минут, чтобы
            получить окончательные `status` и `score`.
        retention_class:
          type: string
          enum:
            - low_value
            - standard
            - risk_relevant
            - monetary_or_compliance
          description: >-
            Класс хранения после любого повышения, выполненного совпавшим
            правилом.
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Когда срок хранения события в соответствии с его классом хранения
            истекает и оно удаляется. Null для событий `monetary_or_compliance`
            (платёжные события и события, связанные со спорами).
        idempotent_replay:
          type: boolean
          description: >-
            `true`, если событие с таким `event_id` и тем же содержимым уже было
            сохранено; значения соответствуют сохранённому событию, и повторный
            запуск правил не производился.
        rule_matches:
          type: array
          description: Правила, совпавшие с событием.
          items:
            type: object
            required:
              - rule_id
              - library_key
              - mode
              - is_async
            properties:
              rule_id:
                type: string
                format: uuid
                description: UUID правила.
              library_key:
                type: string
                nullable: true
                description: >-
                  Ключ библиотеки, если правило было установлено из библиотеки
                  правил, иначе null.
              mode:
                type: string
                enum:
                  - ACTIVE
                  - TEST
                description: >-
                  Правила типа `TEST` регистрируют совпадение, но не применяют
                  никаких действий.
              is_async:
                type: boolean
                description: >-
                  `true`, если совпадение было получено в результате
                  асинхронного прохода.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API-ключ вашего приложения из раздела «Разработчикам» -> «API-ключи» в
        Business Console. Основной ключ имеет полный доступ. Именованный ключ
        может иметь ограниченную область действия: без доступа, чтение или
        запись для каждого ресурса, ограничение определенными сценариями или
        одобренными сессиями, списком IP-адресов и сроком действия. 401
        означает, что ключ неверен, отозван или его срок действия истек; 403
        означает, что ключ не был передан, у ключа нет доступа к этому ресурсу
        или действию, либо запрос поступил с адреса вне его списка IP-адресов;
        404 на маршруте сессии означает, что сессия не входит в сценарии или
        статусы ключа. Ключ без доступа к медиа получает URL изображений, видео
        и PDF как null, а ключ без прав на запись сессий получает ссылки на
        сессии и токены как null. См. https://docs.didit.me/console/api-keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.