> ## 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 نهائياً، مع سر التوقيع الخاص بها وسجل التسليم. عمليات webhook تُدفع لكل استدعاء، دون أي عقود.



موجّه API لحذف وجهة webhook
        نسخ الموجّه إلى الحافظة



      
      

\<pre>

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

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

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

Goal:
\- Delete a destination so Didit stops pushing webhooks to its URL. Use this when retiring an integration, rotating to a new URL, or cleaning up test destinations.

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

Important semantics:
\- After this call, no new webhook is sent to this destination's URL. Other destinations subscribed to the same events keep receiving deliveries.
\- The destination, its signing secret and its entire delivery log are deleted permanently and cannot be recovered; its deliveries, delivery detail and resend routes answer 404.
\- The destination disappears from GET /v3/webhook/destinations/ and subsequent GET /v3/webhook/destinations/{destination_uuid}/ calls return 404.
\- Didit also updates the application's legacy webhook_url: it becomes the URL of the oldest remaining enabled destination, or is cleared when no enabled destination is left, so other tooling sees "no webhook configured".
\- Returns 204 No Content with an empty body on success.
\- Idempotent in effect: calling DELETE again on the same UUID returns 404.

Workflow when rotating endpoints:
1\. POST /v3/webhook/destinations/ to create the new destination and capture its secret_shared_key.
2\. Verify the new endpoint is receiving and validating webhooks correctly.
3\. DELETE the old destination.

Example call:
curl -X DELETE "https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/" \
-H "x-api-key: YOUR_API_KEY"

Failure modes:
\- 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 (or already deleted).

Side effects:
\- The destination, its signing secret and its delivery log are deleted permanently. This cannot be undone.
\- No new webhook is sent to its URL.

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

\</pre>



      
      

الصق في

> [!WARNING]
>
> حذف الوجهة إجراء دائم.
> تُحذف الوجهة وسر التوقيع الخاص بها وسجل التسليم الكامل، ولا يمكن استعادتها.


## OpenAPI

````yaml ar/openapi-25.json DELETE /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}/:
    delete:
      tags:
        - Webhook
      summary: حذف وجهة webhook
      description: >-
        حذف وجهة webhook ومفتاح التوقيع السري الخاص بها وسجل التسليم بالكامل
        نهائياً. لا يمكن التراجع عن هذا الإجراء. لن يُرسل أي webhook جديد إلى
        عنوان URL الخاص بالوجهة؛ وتستمر الوجهات الأخرى المشتركة في الأحداث نفسها
        بتلقيها. بعد ذلك لا تعود الوجهة تظهر في `GET /v3/webhook/destinations/`،
        ويستجيب كل مسار ضمن `/v3/webhook/destinations/{destination_uuid}/`
        بالرمز 404، بما في ذلك عمليات التسليم وتفاصيل التسليم وإعادة إرساله.
        يُعيَّن `webhook_url` القديم للتطبيق إلى عنوان URL الخاص بأقدم وجهة
        مفعلة متبقية، أو يتم مسحه في حال لم يتبق أي وجهة مفعلة. يؤدي استدعاء
        DELETE مرة أخرى إلى إرجاع 404.
      operationId: delete_webhook_destination
      parameters:
        - name: destination_uuid
          in: path
          required: true
          description: معرّف UUID للوجهة المراد حذفها.
          schema:
            type: string
            format: uuid
          example: 11111111-2222-3333-4444-555555555555
      responses:
        '204':
          description: تم حذف الوجهة وسر التوقيع وسجل التسليم نهائياً. لا يوجد نص استجابة.
        '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 DELETE
            'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            client.webhooks.destinations.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.webhooks.destinations.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.Webhooks.Destinations.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.webhooks().destinations().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->webhooks->destinations->delete('11111111-2222-3333-4444-555555555555');
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            didit.webhooks.destinations.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.Webhooks.Destinations.DeleteAsync("11111111-2222-3333-4444-555555555555");
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        مفتاح API الخاص بتطبيقك، من Developers -> API keys في Business Console.
        يمتلك المفتاح الأساسي وصولاً كاملاً. يمكن تحديد نطاق المفتاح المسمى: لا
        شيء، أو قراءة، أو كتابة لكل مورد، ومحدوداً ببعض مسارات العمل أو بالجلسات
        المقبولة، وبقائمة من عناوين IP، وبتاريخ انتهاء الصلاحية. يشير 401 إلى أن
        المفتاح غير صحيح أو ملغى أو منتهي الصلاحية؛ ويشير 403 إلى أنه لم يتم
        إرسال أي مفتاح، أو أن المفتاح ليس لديه حق الوصول إلى هذا المورد أو
        الإجراء، أو أن الطلب جاء من عنوان خارج قائمة عناوين IP الخاصة به؛ ويشير
        404 في مسار جلسة إلى أن الجلسة خارج مسارات العمل أو الحالات الخاصة
        بالمفتاح. يتلقى المفتاح الذي لا يمتلك حق الوصول إلى الوسائط عناوين URL
        للصور ومقاطع الفيديو وملفات PDF كـ 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.