> ## 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>
  \`Permanently delete one monitoring event from my Didit application.

  Endpoint:
  DELETE [https://verification.didit.me/v3/events/\{event\_uuid}/delete/](https://verification.didit.me/v3/events/\{event_uuid}/delete/)

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

  Goal:

  * Delete a single event, for example one sent by mistake. To erase everything about a person or a company, delete the user or the company instead, which also deletes their events.

  Behavior:

  * event\_uuid is the Didit id of the event (from the create, batch, list or timeline response), not my own event\_id.
  * The event is deleted together with its rule runs, notes and tag links.
  * After a 204 the event no longer appears in any read: GET /v3/events/{event_uuid}/ returns 404 and it is gone from the list and the subject timeline.
  * Deletion is irreversible. A second call returns 404.
  * Not affected: the user or company the event resolved to, cases a rule opened, and list entries a rule added. They are separate records with their own lifecycle.
  * The event\_id becomes free: a later POST /v3/events/ with it stores a new event.

  Example call:
  curl -X DELETE "[https://verification.didit.me/v3/events/11111111-2222-3333-4444-555555555555/delete/](https://verification.didit.me/v3/events/11111111-2222-3333-4444-555555555555/delete/)" \
  -H "x-api-key: YOUR\_API\_KEY"

  What to read from the response:

  * 204 No Content means the event was deleted. There is no body.

  Failure modes:

  * 401 - the API key has expired.
  * 403 - missing API key (a wrong, revoked or expired key gets 401), or a scoped key without transactions: write.
  * 404 - no event with this event\_uuid in the application (already deleted, never stored, or another application's).

  Side effects: permanently deletes the event. This cannot be undone.

  For the full integration shape, see /integration/integration-prompt.\`
</pre>

粘贴到

> [!WARNING]
>
> 删除事件不可撤销。若要彻底清除某个人或某家企业的全部信息，请改为[删除用户](https://docs.didit.me/zh/management-api/users/delete.md)或[删除企业](https://docs.didit.me/zh/management-api/businesses/delete.md)，而不是逐一删除其事件：删除用户或企业也会同时删除其事件。


## OpenAPI

````yaml zh/openapi-25.json DELETE /v3/events/{event_uuid}/delete/
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/{event_uuid}/delete/:
    delete:
      tags:
        - Monitoring Events
      summary: 删除监控事件
      description: >-
        永久删除单个监控事件及其规则运行记录、备注和标签关联，例如错误发送的事件。返回 `204` 后，该事件将从所有读取操作中消失（检索返回
        `404`，且不再出现在列表或主体时间线中），此删除操作不可逆，并且其 `event_id`
        可重新用于新事件。不受影响的内容包括：事件解析到的用户或企业、规则开启的案件、规则添加的名单条目，以及已应用于其他事件的评分和状态。要抹除关于个人或企业的所有内容，请改为删除该用户或企业，这也会一并删除其事件。限定作用域的
        API 密钥需要 `transactions: write`。
      operationId: delete_monitoring_event
      parameters:
        - name: event_uuid
          in: path
          required: true
          description: 事件的 Didit 标识符（创建、批量、列表或时间线响应中的 `event_uuid`），而非您自己的 `event_id`。
          schema:
            type: string
            format: uuid
          example: 11111111-2222-3333-4444-555555555555
      responses:
        '204':
          description: 事件已删除。无响应体。
        '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 白名单之外的请求。
          content:
            application/json:
              examples:
                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.
        '404':
          description: >-
            应用中不存在具有此 `event_uuid` 的事件：从未存储、已被删除，或属于另一个应用。非 UUID 的路径段与路由不匹配，也会返回
            `404`。
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: No MonitoringEvent matches the given query.
        '429':
          description: >-
            超出速率限制：每个 API 密钥的写入请求（`POST`、`PATCH`、`DELETE`）共享每分钟 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 DELETE
            'https://verification.didit.me/v3/events/11111111-2222-3333-4444-555555555555/delete/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            client.monitoring_events.delete(
                "11111111-2222-3333-4444-555555555555",
            )
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            await
            didit.monitoringEvents.delete("11111111-2222-3333-4444-555555555555");
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.MonitoringEvents.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            client.monitoringEvents().delete("11111111-2222-3333-4444-555555555555");
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $didit->monitoringEvents->delete('11111111-2222-3333-4444-555555555555');
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            didit.monitoring_events.delete("11111111-2222-3333-4444-555555555555")
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            await
            client.MonitoringEvents.DeleteAsync("11111111-2222-3333-4444-555555555555");
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

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