> ## 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 Management APIで、ログイン、ゲームプレイ、ボーナス、決済、紛争、セキュリティのイベントをバックエンドから1件ずつ送信します。イベントは保存・エンリッチされ、イベントルールでスコアリングされます。



モニタリングイベント作成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 300 writes per minute for this API key; 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**で有効にしてください。有効にするまで、このエンドポイントは`403`と`"code": "event_monitoring_disabled"`を返します。[イベントの取り込み](https://docs.didit.me/ja/transaction-monitoring/events.md)では、エンベロープの形式、10のカテゴリー、必須のペイロードキー、保持クラスについて説明しています。[イベントに対するルール](https://docs.didit.me/ja/transaction-monitoring/event-rules.md)では、どのルールがリクエスト内で実行され、どのルールが非同期で実行されるかを説明しています。バックエンドではなくブラウザやアプリからイベントを送信するには、[SDKによるイベント送信](https://docs.didit.me/ja/transaction-monitoring/sdk-event-submission.md)を使用してください。


## OpenAPI

````yaml ja/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: >-
        非金銭イベント（ログイン、セッション、ゲームプレイ、ボーナス、アフィリエイト、決済、紛争、セキュリティ、責任あるギャンブル、またはカスタム）を1件、バックエンドから送信します。イベントはカテゴリーの契約に照らして検証されて保存され、一意のパブリックアドレスごとに1回IP情報が付加され、レスポンスが返る前にリアルタイムのイベントルールで評価されます。サブジェクト横断ルールと長期間ウィンドウのルールは非同期で実行され（`correlation_pending:
        true`）、サンドボックスのアプリケーションではルールは実行されません。`event_id`は冪等性キーです。同じ`event_id`で`event_category`、`action_type`、`occurred_at`、`subject.vendor_data`、`payload`も同じ場合は、`idempotent_replay:
        true`と保存済みの結果を含む`200`を返し（その他のエンベロープフィールドは比較されません）、値が異なる場合は`409`を返します。イベントの取り込みはアプリケーションごとのオプトインです。有効にするまで、このエンドポイントは`code:
        event_monitoring_disabled`付きの`403`を返し、何も保存しません。スコープ付きAPIキーには`transactions:
        write`が必要です。[イベントの取り込み](https://docs.didit.me/ja/transaction-monitoring/events)と[イベントに対するルール](https://docs.didit.me/ja/transaction-monitoring/event-rules)を参照してください。ブラウザーやアプリからイベントを送信するには、[SDKによるイベント送信](https://docs.didit.me/ja/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`を持たないスコープ付きキー、一部のワークフローまたは承認済みセッションに限定されたキー（このようなキーはトランザクションモニタリングのデータに一切アクセスできません）、またはキーのIP許可リスト外からのリクエスト。アプリケーションでイベントの取り込みが無効になっている間も`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`、またはペイロード）が異なるイベントですでに使用されています。新しい`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`、`PATCH`、`DELETE`）は、APIキーごとに1分あたり300リクエストの上限を共有します。`Retry-After`秒待ってから再試行してください。
          headers:
            Retry-After:
              description: 再試行までに待機する秒数。
              schema:
                type: integer
                minimum: 1
                example: 30
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      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/ja/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`)。イベントとともに保存されますが、読み取り系のエンドポイントでは返されません。
        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`が企業と個人をそれぞれ1つずつ指すことができます。
              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はエンドユーザーの接続を把握できないため、エンリッチされてルールで使用されるIPは、送信された`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アドレス。パブリックアドレスには、一意のアドレスごとに1回だけ付加情報が追加されます。
                  example: 203.0.113.42
        transaction_context:
          type: object
          description: 金額に関するコンテキスト。ここに空でない値を指定すると、アクションの必須ペイロードキーも満たされます。
          properties:
            amount:
              type: string
              nullable: true
              description: 10進数の文字列で表した金額（数値も受け付けます）。
              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: >-
            カテゴリのドメインフィールド。JSONエンコード後で最大16384バイトです。一部のアクションには必須のキーがあります（`payload`または`transaction_context`内）。`gameplay.p2p_settlement`には`game_id`、`counterparty_vendor_data`、`stake_amount`、`net_result_amount`、`role`と、`hand_id`、`round_id`、`match_id`のいずれか1つが必要です。`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`のいずれか1つが必要です。`session.bot_signal_observed`には`telemetry_schema_version`と、`bot_score`、`actions_per_minute`、`timing_variance_ms`、`pointer_entropy`、`keystroke_entropy`、`reaction_time_ms_p50`のいずれか1つが必要です。`responsible_gambling.self_exclusion_match`には`registry_source`、`exclusion_status`、`identity_match_ref`が必要です。`_changed`で終わるすべての`security`アクションには`changed_field`が必要で、フィールドが`password`、`mfa_method`、`mfa`、`email`、`phone`、`withdrawal_address`、`payout_method`、`api_key`のいずれかの場合は、さらに`previous_reference_hash`または`new_reference_hash`が必要です。送信するのはハッシュと参照のみとし、カード番号、完全な出金先アドレス、パスワードハッシュ、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: 1件のイベントを取り込んだ結果。新規イベントと冪等なリプレイのどちらでも同じ形式が返されます。
      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: >-
            イベントが保持クラスに基づいて期限切れとなり、削除される日時。`monetary_or_compliance`（支払いおよび異議申し立て）イベントの場合はnull。
        idempotent_replay:
          type: boolean
          description: >-
            この`event_id`で同じ内容のイベントがすでに保存されていた場合は`true`です。値は保存済みイベントのものであり、ルールは再実行されていません。
        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キーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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