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

# Обновление адреса webhook через API

> Измените адрес webhook в Didit: название, URL, статус, версию и события. Управление webhook через API, оплата за вызов, без контрактов.



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



      
      

\<pre>

\`Update a Didit webhook destination through the Management API.

Endpoint:
PATCH https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/

Authentication:
Use the x-api-key header with my Didit API key.

Goal:
\- Change a destination's label, url, enabled state, webhook_version, or subscribed_events. Send only the fields you want to change.

Path parameter:
\- destination_uuid — the destination UUID from GET /v3/webhook/destinations/.

Request body (application/json) — all fields optional:
\{
"label": "Updated label",
"url": "https://yourapp.com/webhooks/v2",
"enabled": false,
"webhook_version": "v3",
"subscribed_events": ["status.updated", "data.updated", "transaction.created"]
}

Critical semantics:
\- subscribed_events is replaced wholesale, NOT merged. To add an event, GET the current destination, append to the list, and send the full array back. Sending [] returns 400.
\- url must remain unique among the application's destinations.
\- A uuid in the body is ignored: the path names the destination.
\- webhook_version applies to future deliveries only. Already-queued deliveries use the version that was active when they were enqueued.
\- The signing secret (secret_shared_key) is NOT rotated by PATCH. Console offers a manual rotation flow. For 24 hours after a rotation, every delivery also carries X-Signature-Previous, X-Signature-V2-Previous and X-Signature-Simple-Previous, made with the replaced secret, and previous_secret_expires_at says when that ends.
\- Changing url does not move automatic retries of deliveries already made: they go to the URL the first attempt used. A manual resend goes to the destination's current URL.

Example call (replace subscription list):
curl -X PATCH "https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"subscribed_events": ["status.updated", "data.updated", "transaction.created"]}'

\# Pause a destination without losing config:
curl -X PATCH "https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"enabled": false}'

Failure modes:
\- 400 — empty subscribed_events, unknown event name, duplicate url among destinations, or invalid webhook_version.
\- 401 — missing or malformed x-api-key.
\- 403 — canonical { "detail": "You do not have permission to perform this action." } envelope.
\- 404 — destination not found in this application.

Side effects:
\- Subsequent webhook deliveries respect the new url, enabled flag, and subscribed_events list.

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

\</pre>



      
      

Вставьте в

Используйте этот endpoint, чтобы изменить, куда адрес назначения отправляет webhook, и какие события он получает.## Обновление `subscribed_events`Когда вы передаёте `subscribed_events`, укажите полный список событий, на которые должна сохраняться подписка после обновления. Массив заменяет предыдущий набор подписок.```json theme={null}
{
  "subscribed_events": [
    "status.updated",
    "data.updated",
    "transaction.created",
    "transaction.status.updated"
  ]
}
```Поддерживаемые значения:| Событие | Что означает |
| - | - |
| `status.updated` | Изменился статус сессии проверки пользователей (KYC) или верификации бизнеса (KYB). |
| `data.updated` | Данные верификации сессии изменились после её создания. |
| `user.status.updated` | Изменился статус сущности пользователя. |
| `user.data.updated` | Изменились данные сущности пользователя. |
| `business.status.updated` | Изменился статус сущности компании. |
| `business.data.updated` | Изменились данные сущности компании. |
| `activity.created` | Принимается, но на продакшн-трафике сегодня не доставляется. |
| `transaction.created` | Транзакция создана и предварительно оценена. |
| `transaction.status.updated` | Изменился статус транзакции. |
| `travel_rule.status.updated` | Статус обмена по Travel Rule изменился. |
| `workflow.compliance_changed` | Статус комплаенса опубликованного сценария изменился. |
| `transaction_rule_suggestions.created` | В результате запуска формирования предложений по правилам предложены новые изменения в правилах. |Семейства событий Investigator (`investigator.*`) и Authentication (`auth.*`) также принимаются; полный список см. в разделе [Webhooks](https://docs.didit.me/ru/integration/webhooks.md#типы-событий).Подробные описания событий и типовые наборы подписок см. в [руководстве по созданию адреса назначения](https://docs.didit.me/ru/management-api/webhook/create-destination.md).


## OpenAPI

````yaml ru/openapi-25.json PATCH /v3/webhook/destinations/{destination_uuid}/
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/webhook/destinations/{destination_uuid}/:
    patch:
      tags:
        - Webhook
      summary: Обновить адрес назначения webhook
      description: >-
        Обновить адрес назначения webhook. **`subscribed_events` ЗАМЕНЯЕТСЯ
        целиком, а не объединяется**: сначала получите список, добавьте события
        и отправьте повторно. Секрет не ротируется. Значение `uuid` в теле
        запроса игнорируется: адрес назначения указывается в пути запроса.
      operationId: update_webhook_destination
      parameters:
        - name: destination_uuid
          in: path
          required: true
          description: UUID обновляемого адреса назначения webhook.
          schema:
            type: string
            format: uuid
          example: 11111111-2222-3333-4444-555555555555
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  description: Новое понятное пользователю имя.
                url:
                  type: string
                  format: uri
                  description: >-
                    Новый целевой URL. Должен быть уникальным в рамках
                    приложения.
                enabled:
                  type: boolean
                  description: >-
                    Установите значение `false`, чтобы приостановить доставку на
                    этот адрес назначения без его удаления.
                webhook_version:
                  type: string
                  enum:
                    - v1
                    - v2
                    - v3
                  description: Новая версия схемы payload для будущих доставок.
                subscribed_events:
                  $ref: '#/components/schemas/WebhookSubscribedEvents'
            examples:
              Pause destination:
                value:
                  enabled: false
              Add transaction events:
                value:
                  subscribed_events:
                    - status.updated
                    - data.updated
                    - transaction.created
                    - transaction.status.updated
              Move target URL:
                value:
                  label: Production session webhooks v2
                  url: https://api.yourapp.com/webhooks/didit/v2
      responses:
        '200':
          description: >-
            Обновлённый адрес назначения webhook. Тело имеет ту же структуру,
            что и `GET /v3/webhook/destinations/{destination_uuid}/`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    type: string
                    format: uuid
                  label:
                    type: string
                  url:
                    type: string
                    format: uri
                  enabled:
                    type: boolean
                  webhook_version:
                    type: string
                    enum:
                      - v1
                      - v2
                      - v3
                  secret_shared_key:
                    type: string
                  secret_last4:
                    type: string
                    description: >-
                      Последние четыре символа текущего секрета подписи адреса
                      назначения, позволяющие различать секреты. Недостаточно
                      для проверки подписи.
                  previous_secret_expires_at:
                    type: string
                    format: date-time
                    nullable: true
                    description: >-
                      Устанавливается на 24 часа после ротации секрета подписи
                      адреса назначения в Business Console. До истечения этого
                      времени каждая доставка на адрес назначения также содержит
                      `X-Signature-Previous`, `X-Signature-V2-Previous` и
                      `X-Signature-Simple-Previous`, созданные с заменённым
                      секретом (см. [Проверка
                      подписи](/ru/integration/webhooks#проверка-подписи)).
                      `null`, если за последние 24 часа ротация не проводилась.
                  subscribed_events:
                    $ref: '#/components/schemas/WebhookSubscribedEvents'
                  created_by_email:
                    type: string
                    nullable: true
                    description: >-
                      Электронная почта участника Business Console, создавшего
                      адрес назначения. `null` для адреса назначения, созданного
                      с помощью API-ключа.
                  created_by_name:
                    type: string
                    nullable: true
                    description: >-
                      Имя участника Business Console, создавшего адрес
                      назначения. `null` для адреса назначения, созданного с
                      помощью API-ключа.
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  health_status:
                    type: string
                    enum:
                      - healthy
                      - degraded
                      - failing
                    description: >-
                      Состояние доставки. `failing`: 3 или более
                      последовательных событий завершились неудачей при первой
                      попытке доставки с момента последнего успешного ответа
                      адреса назначения (см. `failing_streak`). `degraded`: не
                      failing, но за последние 24 часа произошла неудачная
                      попытка доставки, и ни одна последующая попытка пока не
                      доставила это событие; повторная попытка или повторная
                      отправка, которая доставит его, сбрасывает этот статус.
                      `healthy`: ни то, ни другое. Не зависит от `enabled`.
                      Неудачной считается попытка, получившая ответ HTTP 400 или
                      выше, либо оставшаяся вовсе без ответа.
                  failing_streak:
                    type: integer
                    description: >-
                      Количество последовательных событий, первая попытка
                      доставки которых завершилась неудачно с момента последнего
                      успешного ответа адреса назначения за последние 30 дней.
                      Повторные попытки не учитываются, и любая успешная
                      попытка, включая повторную попытку или повторную отправку,
                      прерывает серию. Значение равно `0`, если с момента
                      последнего успеха не было ни одного сбоя.
                  failing_since:
                    type: string
                    format: date-time
                    nullable: true
                    description: >-
                      Когда была совершена первая неудачная попытка из текущей
                      серии ошибок `failing_streak`. `null`, если
                      `failing_streak` равен `0`.
                  last_success_at:
                    type: string
                    format: date-time
                    nullable: true
                    description: >-
                      Когда адрес назначения в последний раз ответил на доставку
                      с HTTP-статусом ниже 400 за последние 30 дней. `null`,
                      если ответов в этот период не было.
                  environment:
                    type: string
                    enum:
                      - live
                      - sandbox
                    description: Среда приложения, которому принадлежит адрес назначения.
                  summary:
                    type: object
                    description: >-
                      Метрики доставки за последние `metrics_window_days` (30)
                      дней. `last_delivery_at` представляет собой самую
                      последнюю попытку, когда бы она ни выполнялась.
                    properties:
                      total_deliveries:
                        type: integer
                      failed_deliveries:
                        type: integer
                      error_rate_percentage:
                        type: integer
                      min_response_time_ms:
                        type: integer
                        nullable: true
                      avg_response_time_ms:
                        type: integer
                        nullable: true
                      max_response_time_ms:
                        type: integer
                        nullable: true
                      last_delivery_at:
                        type: string
                        format: date-time
                        nullable: true
                      metrics_window_days:
                        type: integer
                        description: >-
                          Длина окна в днях, охватываемого остальными сводными
                          метриками. Всегда `30`.
              examples:
                Paused:
                  value:
                    uuid: 11111111-2222-3333-4444-555555555555
                    label: Production session webhooks
                    url: https://yourapp.com/webhooks/didit
                    enabled: false
                    webhook_version: v3
                    secret_shared_key: tno2NTeRC1ZK3sBOYlBJDyEzBVENl3pQ1AcZyAW0xnQ
                    secret_last4: 0xnQ
                    previous_secret_expires_at: null
                    subscribed_events:
                      - status.updated
                      - data.updated
                    created_by_email: null
                    created_by_name: null
                    created_at: '2026-01-04T08:00:00Z'
                    updated_at: '2026-05-17T11:02:55Z'
                    health_status: healthy
                    failing_streak: 0
                    failing_since: null
                    last_success_at: '2026-05-17T09:21:18Z'
                    environment: live
                    summary:
                      total_deliveries: 12453
                      failed_deliveries: 14
                      error_rate_percentage: 0
                      min_response_time_ms: 41
                      avg_response_time_ms: 187
                      max_response_time_ms: 2103
                      last_delivery_at: '2026-05-17T09:21:18Z'
                      metrics_window_days: 30
        '400':
          description: >-
            Ошибка валидации (дубликат URL, пустой или неизвестный список
            событий, некорректное тело запроса).
          content:
            application/json:
              examples:
                Duplicate URL:
                  value:
                    url:
                      - >-
                        This webhook destination already exists for the
                        application.
                Empty events:
                  value:
                    subscribed_events:
                      - At least one subscribed event is required.
        '403':
          description: >-
            API-ключ отсутствует, сформирован некорректно, истёк или относится к
            другому приложению. При отсутствии ключа возвращается `403`; при
            неверном, отозванном или истёкшем ключе возвращается `401`.
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            Адрес назначения с таким UUID не существует (или удалён, или
            принадлежит другому приложению).
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Webhook destination not found.
        '429':
          description: >-
            Лимит запросов превышен; снизьте частоту запросов и повторите
            попытку.
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X PATCH
            'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "subscribed_events": [
                  "status.updated",
                  "data.updated",
                  "transaction.created"
                ]
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.webhooks.destinations.update(
                "11111111-2222-3333-4444-555555555555",
                enabled=False,
            )
            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.webhooks.destinations.update("11111111-2222-3333-4444-555555555555",
            {
              enabled: false,
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsUpdateParams{\n\tEnabled: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.WebhooksDestinationsUpdateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.webhooks().destinations().update("11111111-2222-3333-4444-555555555555",
            WebhooksDestinationsUpdateParams.builder()
                    .enabled(false)
                    .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->webhooks->destinations->update('11111111-2222-3333-4444-555555555555',
            [
                'enabled' => false,
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.webhooks.destinations.update(
              "11111111-2222-3333-4444-555555555555",
              enabled: false
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.Webhooks.Destinations.UpdateAsync("11111111-2222-3333-4444-555555555555",
            new WebhooksDestinationsUpdateParams

            {
                Enabled = false,
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    WebhookSubscribedEvents:
      type: array
      description: >-
        Фильтр событий для этого адреса назначения webhook. Didit доставляет
        только те webhook, чей тип события точно совпадает с одним из этих
        значений — подписка по маске отсутствует. При отправке список должен
        содержать как минимум одно допустимое событие (явный пустой массив `[]`
        отклоняется с кодом 400); адрес назначения с пустым списком (поле
        пропущено при создании) ничего не получает. При обновлении список
        заменяется целиком, а не объединяется.
      minItems: 1
      uniqueItems: true
      items:
        $ref: '#/components/schemas/WebhookEvent'
      example:
        - status.updated
        - data.updated
    WebhookEvent:
      type: string
      description: >-
        Поддерживаемое имя события webhook. Используйте именно эти строки в
        `subscribed_events`; неподдерживаемые значения отклоняются.
      enum:
        - status.updated
        - data.updated
        - user.status.updated
        - user.data.updated
        - business.status.updated
        - business.data.updated
        - activity.created
        - transaction.created
        - transaction.status.updated
        - travel_rule.status.updated
        - workflow.compliance_changed
        - transaction_rule_suggestions.created
        - auth.signup
        - auth.login
        - auth.login_failed
        - auth.password_reset_requested
        - auth.password_reset_completed
        - auth.mfa_changed
        - auth.new_device
        - auth.account_locked
        - investigator.report.ready
        - investigator.decision.automated
        - investigator.decision.overridden
        - investigator.decision.contested
        - investigator.question.raised
        - investigator.automation.paused
        - investigator.rfi.answered
        - investigator.rfi.overdue
        - investigator.drift.detected
        - investigator.sla.breached
        - investigator.qa.failed
        - investigator.external.report.ready
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API-ключ вашего приложения из раздела «Разработчикам» -> «API-ключи» в
        Business Console. Основной ключ имеет полный доступ. Именованный ключ
        может иметь ограниченную область действия: без доступа, чтение или
        запись для каждого ресурса, ограничение определенными сценариями или
        одобренными сессиями, списком IP-адресов и сроком действия. 401
        означает, что ключ неверен, отозван или его срок действия истек; 403
        означает, что ключ не был передан, у ключа нет доступа к этому ресурсу
        или действию, либо запрос поступил с адреса вне его списка IP-адресов;
        404 на маршруте сессии означает, что сессия не входит в сценарии или
        статусы ключа. Ключ без доступа к медиа получает URL изображений, видео
        и PDF как null, а ключ без прав на запись сессий получает ссылки на
        сессии и токены как null. См. https://docs.didit.me/console/api-keys.

````

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