> ## 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では、最大500件のモニタリングイベントを1回のリクエストで送信でき、結果は項目ごとに返されます。不正な形式のイベントが1件あっても、バッチ内の他のイベントは処理されます。



モニタリングイベント一括作成APIプロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Send up to 500 monitoring events to Didit in one request from my backend, and handle the per-item outcomes.

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

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

Goal:
\- Flush a queue of events (logins, gameplay rounds, payment steps, chargebacks) in as few requests as possible, without one bad event blocking the others.

Request body (application/json):
\{
"events": [ { ...one event, same envelope as POST /v3/events/... }, ... ]   // 1 to 500 events
}
A bare JSON array of events is also accepted.

Behavior:
\- Each item is validated, stored and evaluated on its own, exactly like POST /v3/events/. A rejected item never rolls back the others.
\- HTTP 201 when no item was rejected, 207 when at least one was. Treat both as success and read results[].
\- results[] has one entry per item in request order, with index pointing into my events array and outcome accepted, replayed or rejected.
\- accepted and replayed items carry the same fields as the single-event response (event_uuid, status, score, rule_matches, correlation_pending, retention_class, expires_at, idempotent_replay).
\- rejected items carry errors keyed by field, in the same shape as the 400 of POST /v3/events/. A reused event_id with different content is reported as a string under errors.event_id. Send event_id in snake_case so a rejected item's results[].event_id is filled.
\- Retry only the rejected items after fixing them. Resending an accepted item is safe: it comes back as replayed.
\- occurred_at must still be within 7 days in the past and 5 minutes in the future for every item.

Example call:
curl -X POST "https://verification.didit.me/v3/events/batch/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"events":[{"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"}}]}'

What to read from the response:
\- accepted_count, replayed_count, rejected_count.
\- results[].index and results[].outcome.
\- results[].errors for rejected items.
\- results[].event_uuid and results[].status for stored items.

Failure modes:
\- 400 - events missing, not an array, empty, or longer than 500 items ({ "events": "<message>" }). Nothing is stored; split the batch.
\- 429 - more than 300 writes per minute for this API key; honor Retry-After.
\- 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 (event ingestion is not switched on; nothing is stored).

Side effects: stores every valid item, may create subjects, and applies the actions of matched active rules.

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

\</pre>



      
      

貼り付け先

イベント取り込みガイドの[バッチ](https://docs.didit.me/ja/transaction-monitoring/events.md#バッチ)を参照してください。デバイスレーンでも、SDKのフラッシュに対して項目ごとに同じ結果が返ります。[SDKイベント送信](https://docs.didit.me/ja/transaction-monitoring/sdk-event-submission.md#バッチ処理)を参照してください。


## OpenAPI

````yaml ja/openapi-25.json POST /v3/events/batch/
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/batch/:
    post:
      tags:
        - Monitoring Events
      summary: モニタリングイベントを一括作成
      description: >-
        1〜500件のイベントを1回のリクエストで送信します。各イベントは`POST
        /v3/events/`と同じエンベロープ形式です。各項目は個別に検証、保存、評価され、それぞれ独自の結果（`accepted`、`replayed`、`rejected`）を受け取ります。そのため、不正な形式のイベントが1件あっても、他のイベントがロールバックされることはありません。拒否された項目がない場合のレスポンスは`201`、1件以上ある場合は`207`となり、どちらもリクエストが処理されたことを意味します。`{"events":
        [...]}`を送信してください。イベントのJSON配列をそのまま送ることもできます。アプリケーションでイベント取り込みを有効にする必要があります。有効でない場合、リクエスト全体が`code:
        event_monitoring_disabled`とともに`403`を返し、何も保存されません。スコープ付きAPIキーには`transactions:
        write`が必要です。詳しくは[バッチ](https://docs.didit.me/ja/transaction-monitoring/events#バッチ)を参照してください。
      operationId: create_monitoring_events_batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - events
              properties:
                events:
                  type: array
                  minItems: 1
                  maxItems: 500
                  description: >-
                    1〜500件のイベント。各項目は`MonitoringEventCreateRequest`に従い、`occurred_at`に対する過去7日間・未来5分間の範囲制限も適用されます。
                  items:
                    $ref: '#/components/schemas/MonitoringEventCreateRequest'
            example:
              events:
                - 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
                - 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
                    payment_reference_id: dep_736
                  payload:
                    payment_method: card
                    status: completed
      responses:
        '201':
          description: 拒否された項目はありません。すべての項目が`accepted`または`replayed`です。
          content:
            application/json:
              schema:
                type: object
                required:
                  - accepted_count
                  - replayed_count
                  - rejected_count
                  - results
                properties:
                  accepted_count:
                    type: integer
                    minimum: 0
                    description: 保存され、評価された項目。
                  replayed_count:
                    type: integer
                    minimum: 0
                    description: 同じ内容ですでに保存されている項目。
                  rejected_count:
                    type: integer
                    minimum: 0
                    description: 保存されなかった項目。
                  results:
                    type: array
                    description: 項目ごとに1エントリーで、リクエストの順序どおりに並びます。
                    items:
                      type: object
                      description: >-
                        1件のアイテムの結果。受け付けられたアイテムとリプレイされたアイテムには`MonitoringEventIngestResult`のすべてのフィールドも含まれます。拒否されたアイテムには代わりに`event_id`と`errors`が含まれます。
                      required:
                        - index
                        - outcome
                      properties:
                        index:
                          type: integer
                          minimum: 0
                          description: '`events`配列内での項目の位置。'
                        outcome:
                          type: string
                          enum:
                            - accepted
                            - replayed
                            - rejected
                          description: >-
                            `accepted`：保存され、評価されました。`replayed`：同じ内容ですでに保存されています。`rejected`：保存されていません。`errors`を参照してください。
                        event_id:
                          type: string
                          nullable: true
                          description: >-
                            お客様の`event_id`です。検証で拒否された項目では、項目のsnake_caseの`event_id`キーから読み取られます。そのため、項目で省略された場合や`eventId`エイリアスで送信された場合はnullになります。
                        errors:
                          type: object
                          additionalProperties: true
                          description: >-
                            拒否された項目のみ。フィールドをキーとする検証エラーで、`POST
                            /v3/events/`の`400`と同じ形式です。異なる内容で再利用された`event_id`は、`errors.event_id`の下に文字列として報告されます。
                        event_uuid:
                          type: string
                          format: uuid
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        status:
                          type: string
                          enum:
                            - ACCEPTED
                            - APPROVED
                            - IN_REVIEW
                            - DECLINED
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        score:
                          type: integer
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        rules_evaluated_count:
                          type: integer
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        rules_matched_count:
                          type: integer
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        correlation_pending:
                          type: boolean
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        retention_class:
                          type: string
                          enum:
                            - low_value
                            - standard
                            - risk_relevant
                            - monetary_or_compliance
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        expires_at:
                          type: string
                          format: date-time
                          nullable: true
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        idempotent_replay:
                          type: boolean
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        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`です。
              examples:
                All landed:
                  value:
                    accepted_count: 1
                    replayed_count: 1
                    rejected_count: 0
                    results:
                      - index: 0
                        outcome: accepted
                        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: []
                      - index: 1
                        outcome: replayed
                        event_uuid: 11111111-2222-3333-4444-555555555555
                        event_id: deposit-2026-10-17-000002
                        status: ACCEPTED
                        score: 0
                        rules_evaluated_count: 6
                        rules_matched_count: 0
                        correlation_pending: false
                        retention_class: monetary_or_compliance
                        expires_at: null
                        idempotent_replay: true
                        rule_matches: []
        '207':
          description: >-
            少なくとも1つの項目が拒否されました。その他の項目は保存されています。拒否された項目のみを修正して再送信してください(受け付けられた項目を再送信しても問題はなく、`replayed`として返されます)。
          content:
            application/json:
              schema:
                type: object
                required:
                  - accepted_count
                  - replayed_count
                  - rejected_count
                  - results
                properties:
                  accepted_count:
                    type: integer
                    minimum: 0
                    description: 保存され、評価された項目。
                  replayed_count:
                    type: integer
                    minimum: 0
                    description: 同じ内容ですでに保存されている項目。
                  rejected_count:
                    type: integer
                    minimum: 0
                    description: 保存されなかった項目。
                  results:
                    type: array
                    description: 項目ごとに1エントリーで、リクエストの順序どおりに並びます。
                    items:
                      type: object
                      description: >-
                        1件のアイテムの結果。受け付けられたアイテムとリプレイされたアイテムには`MonitoringEventIngestResult`のすべてのフィールドも含まれます。拒否されたアイテムには代わりに`event_id`と`errors`が含まれます。
                      required:
                        - index
                        - outcome
                      properties:
                        index:
                          type: integer
                          minimum: 0
                          description: '`events`配列内での項目の位置。'
                        outcome:
                          type: string
                          enum:
                            - accepted
                            - replayed
                            - rejected
                          description: >-
                            `accepted`：保存され、評価されました。`replayed`：同じ内容ですでに保存されています。`rejected`：保存されていません。`errors`を参照してください。
                        event_id:
                          type: string
                          nullable: true
                          description: >-
                            お客様の`event_id`です。検証で拒否された項目では、項目のsnake_caseの`event_id`キーから読み取られます。そのため、項目で省略された場合や`eventId`エイリアスで送信された場合はnullになります。
                        errors:
                          type: object
                          additionalProperties: true
                          description: >-
                            拒否された項目のみ。フィールドをキーとする検証エラーで、`POST
                            /v3/events/`の`400`と同じ形式です。異なる内容で再利用された`event_id`は、`errors.event_id`の下に文字列として報告されます。
                        event_uuid:
                          type: string
                          format: uuid
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        status:
                          type: string
                          enum:
                            - ACCEPTED
                            - APPROVED
                            - IN_REVIEW
                            - DECLINED
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        score:
                          type: integer
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        rules_evaluated_count:
                          type: integer
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        rules_matched_count:
                          type: integer
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        correlation_pending:
                          type: boolean
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        retention_class:
                          type: string
                          enum:
                            - low_value
                            - standard
                            - risk_relevant
                            - monetary_or_compliance
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        expires_at:
                          type: string
                          format: date-time
                          nullable: true
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        idempotent_replay:
                          type: boolean
                          description: 受け入れられた項目とリプレイされた項目のみ。
                        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`です。
              examples:
                Partial success:
                  value:
                    accepted_count: 1
                    replayed_count: 0
                    rejected_count: 2
                    results:
                      - index: 0
                        outcome: accepted
                        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: []
                      - index: 1
                        event_id: deposit-2026-10-17-000002
                        outcome: rejected
                        errors:
                          payload:
                            - >-
                              payment.deposit_completed requires:
                              payment_method, status.
                      - index: 2
                        event_id: login-2026-10-16-000777
                        outcome: rejected
                        errors:
                          event_id: >-
                            event_id 'login-2026-10-16-000777' already exists
                            with a different payload.
        '400':
          description: >-
            バッチ自体の形式が不正です。`events`がない、配列ではない、空である、または500件を超えています。何も保存されません。大きなバッチは分割してください。
          content:
            application/json:
              examples:
                Not a list:
                  value:
                    events: Expected a list of events.
                Empty:
                  value:
                    events: At least one event is required.
                Too many:
                  value:
                    events: A batch accepts at most 500 events; received 612.
        '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.
        '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/batch/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "events": [
                  {"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"}},
                  {"event_id": "deposit-2026-10-17-000002", "event_category": "payment", "action_type": "deposit_completed",
                   "occurred_at": "2026-10-17T09:16:40.000Z", "subject": {"vendor_data": "user-42"},
                   "transaction_context": {"amount": "100.00", "currency": "EUR", "payment_reference_id": "dep_736"},
                   "payload": {"payment_method": "card", "status": "completed"}}
                ]
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.monitoring_events.create_batch(
                events=[{
                    "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",
                    },
                }, {
                    "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",
                        "payment_reference_id": "dep_736",
                    },
                    "payload": {"payment_method": "card", "status": "completed"},
                }],
            )
            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.createBatch({
              events: [{
                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",
                },
              }, {
                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",
                  payment_reference_id: "dep_736",
                },
                payload: { payment_method: "card", status: "completed" },
              }],
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.CreateBatch(ctx, didit.MonitoringEventsCreateBatchParams{\n\tEvents: []didit.MonitoringEventCreateRequest{{\n\t\tEventID:       \"login-2026-10-17-000001\",\n\t\tEventCategory: \"auth\",\n\t\tActionType:    \"login\",\n\t\tOccurredAt:    time.Date(2026, 10, 17, 9, 15, 2, 0, time.UTC),\n\t\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\t\tVendorData: \"user-42\",\n\t\t},\n\t}, {\n\t\tEventID:       \"deposit-2026-10-17-000002\",\n\t\tEventCategory: \"payment\",\n\t\tActionType:    \"deposit_completed\",\n\t\tOccurredAt:    time.Date(2026, 10, 17, 9, 16, 40, 0, time.UTC),\n\t\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\t\tVendorData: \"user-42\",\n\t\t},\n\t\tTransactionContext: didit.Some(didit.MonitoringEventCreateRequestTransactionContext{\n\t\t\tAmount:             didit.String(\"100.00\"),\n\t\t\tCurrency:           didit.String(\"EUR\"),\n\t\t\tPaymentReferenceID: didit.String(\"dep_736\"),\n\t\t}),\n\t\tPayload: didit.Some(map[string]any{\"payment_method\": \"card\", \"status\": \"completed\"}),\n\t}},\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.List;

            import java.util.Map;

            import me.didit.Didit;

            import me.didit.types.MonitoringEventCreateRequest;

            import me.didit.types.MonitoringEventsCreateBatchParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.monitoringEvents().createBatch(MonitoringEventsCreateBatchParams.builder()
                    .events(List.of(
                            MonitoringEventCreateRequest.builder()
                                    .eventId("login-2026-10-17-000001")
                                    .eventCategory(MonitoringEventCreateRequest.EventCategory.of("auth"))
                                    .actionType("login")
                                    .occurredAt(OffsetDateTime.parse("2026-10-17T09:15:02.481Z"))
                                    .subject(MonitoringEventCreateRequest.Subject.builder()
                                            .vendorData("user-42")
                                            .build())
                                    .build(),
                            MonitoringEventCreateRequest.builder()
                                    .eventId("deposit-2026-10-17-000002")
                                    .eventCategory(MonitoringEventCreateRequest.EventCategory.of("payment"))
                                    .actionType("deposit_completed")
                                    .occurredAt(OffsetDateTime.parse("2026-10-17T09:16:40Z"))
                                    .subject(MonitoringEventCreateRequest.Subject.builder()
                                            .vendorData("user-42")
                                            .build())
                                    .transactionContext(MonitoringEventCreateRequest.TransactionContext.builder()
                                            .amount("100.00")
                                            .currency("EUR")
                                            .paymentReferenceId("dep_736")
                                            .build())
                                    .payload(Map.of("payment_method", "card", "status", "completed"))
                                    .build()))
                    .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->createBatch([
                'events' => [[
                    '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',
                    ],
                ], [
                    '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',
                        'payment_reference_id' => 'dep_736',
                    ],
                    'payload' => ['payment_method' => 'card', 'status' => 'completed'],
                ]],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.monitoring_events.create_batch(
              events: [{
                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",
                },
              }, {
                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",
                  payment_reference_id: "dep_736",
                },
                payload: { payment_method: "card", status: "completed" },
              }]
            )
            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.CreateBatchAsync(new
            MonitoringEventsCreateBatchParams

            {
                Events = new MonitoringEventCreateRequest[]
                {
                    new()
                    {
                        EventId = "login-2026-10-17-000001",
                        EventCategory = "auth",
                        ActionType = "login",
                        OccurredAt = DateTimeOffset.Parse("2026-10-17T09:15:02.481Z"),
                        Subject = new()
                        {
                            VendorData = "user-42",
                        },
                    },
                    new()
                    {
                        EventId = "deposit-2026-10-17-000002",
                        EventCategory = "payment",
                        ActionType = "deposit_completed",
                        OccurredAt = DateTimeOffset.Parse("2026-10-17T09:16:40Z"),
                        Subject = new()
                        {
                            VendorData = "user-42",
                        },
                        TransactionContext = new MonitoringEventCreateRequestTransactionContext
                        {
                            Amount = "100.00",
                            Currency = "EUR",
                            PaymentReferenceId = "dep_736",
                        },
                        Payload = new Dictionary<string, object> { ["payment_method"] = "card", ["status"] = "completed" },
                    },
                },
            });

            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
  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.