> ## 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 الخاص بالجلسة
        نسخ الموجّه إلى الحافظة



      
      

\<pre>

\`Resend a webhook delivery of a Didit verification session through the API.

Endpoint:
POST https://verification.didit.me/v3/session/{session_id}/webhook/{webhook_uuid}/resend
(no trailing slash, no request body)

Authentication:
Send my Didit API key in the x-api-key header. A scoped key needs webhooks: write and decisions: read.

Goal:
\- Replay a webhook my endpoint missed or rejected, after I fixed the endpoint.

Behavior:
\- {webhook_uuid} is the uuid of an entry from GET /v3/session/{session_id}/webhooks/, and it must belong to the session in the path.
\- Didit sends the recorded payload again to the URL the delivery was first sent to. The payload keeps its event_id; Didit refreshes the timestamp field, the X-Timestamp header and the signatures, using the destination's current signing secret (the application-level secret for a delivery sent to the legacy webhook_url).
\- Synchronous: Didit waits up to 5 seconds for my endpoint, records the attempt as a new delivery and returns it. The original delivery is not changed.
\- The call returns 200 even when my endpoint answered with an error: read response_status in the returned delivery.
\- A failed resend is not retried automatically. Every call sends one more request to my endpoint, so my handler must be idempotent on event_id.

Example call:
curl -X POST "https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/webhook/9f8e7d6c-5b4a-4321-8fed-cba987654321/resend" \
-H "x-api-key: YOUR_API_KEY"

What to read from the response:
\- uuid: the new delivery id.
\- response_status: what my endpoint answered this time (504 timeout, 503 connection failure, 400 URL refused as unsafe).
\- request_header and request_body: the headers and body actually sent.

Failure modes:
\- 400 with code webhook_url_missing: the delivery has no recorded URL.
\- 400 with code webhook_resend_error: the recorded payload could not be re-signed or sent.
\- 401: the API key has expired.
\- 403: missing key (a wrong, revoked or expired key gets 401), a key of another application, a scoped key without the permissions above, or a request from outside the key's IP allowlist.
\- 404: the session does not exist, was deleted, or is outside a scoped key's limits, or the delivery does not belong to this session ({ "detail": "Webhook log not found" }).
\- 429: more than 300 writes per minute for this API key; honor Retry-After.

Side effects: sends one HTTP request to my webhook endpoint and adds one delivery to the session's webhook log.

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

\</pre>



      
      

الصق في

> [!NOTE]
>
> تُرسَل إعادة الإرسال إلى عنوان URL المخزَّن في التسليم، حتى لو غيّرت عنوان URL الخاص بالوجهة بعد ذلك. لأن payload يحتفظ بالقيمة `event_id` الخاصة به، فإن المستقبِل الذي [يُزيل التكرار استناداً إلى `event_id`](https://docs.didit.me/ar/integration/webhooks#الهيكل-العام) يعامل إعادة الإرسال على أنها الحدث الذي يعرفه مسبقاً.ابحث عن التسليم المراد إعادة إرساله باستخدام [سرد تسليمات webhook الخاصة بالجلسة](https://docs.didit.me/ar/management-api/sessions/list-webhooks.md).


## OpenAPI

````yaml ar/openapi-25.json POST /v3/session/{sessionId}/webhook/{webhook_uuid}/resend
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/session/{sessionId}/webhook/{webhook_uuid}/resend:
    post:
      tags:
        - Sessions
      summary: إعادة إرسال تسليم webhook للجلسة
      description: >-
        أعد إرسال webhook جلسة مسجّل إلى الرابط الذي أُرسل إليه في البداية، مع
        نفس payload و`event_id` و`timestamp` جديد ورأس `X-Timestamp` جديد
        وتوقيعات جديدة. توقّع Didit الطلب باستخدام السر الحالي للوجهة التي يتبع
        لها التسليم (أو السر على مستوى التطبيق للتسليم إلى رابط webhook القديم)،
        وتنتظر حتى 5 ثوانٍ لاستجابة endpoint الخاص بك، وتسجل المحاولة كتسليم
        جديد وتعيده برمز `200` بصرف النظر عما أجاب به endpoint الخاص بك: راجع
        `response_status`. لا تتم إعادة محاولة إعادة الإرسال تلقائياً، وكل
        استدعاء يرسل مرة أخرى، لذا اجعل endpoint الخاص بك يدعم idempotency
        بالاعتماد على `event_id`. لا يحتوي المسار على شرطة مائلة لاحقة ولا يحتوي
        الطلب على جسم. يحتاج مفتاح API ذو الصلاحيات المحددة إلى `webhooks:
        write` و`decisions: read`.
      operationId: post_v3_session_webhook_resend
      parameters:
        - name: sessionId
          in: path
          required: true
          description: >-
            معرّف UUID لجلسة التحقق، للمستخدمين (KYC) أو للشركات (KYB):
            `session_id` الذي تم إرجاعه بواسطة `POST /v3/session/`. يطابق الخادم
            المعرّف عبر كلا نوعي الجلسات.


            **يجب أن يكون UUID صالحًا.** يطابق المسار قيم UUID صالحة البنية فقط،
            لذا يتم رفض أي قيمة غير صالحة البنية بواسطة موجه URL قبل تشغيل أي
            كود برمجي للتطبيق وتكون الاستجابة صفحة **HTML** برمز `404` بدلاً من
            تنسيق JSON لـ `{"detail": ...}` الموضح أدناه.
          schema:
            type: string
            format: uuid
          example: 22222222-3333-4444-5555-666666666666
        - name: webhook_uuid
          in: path
          required: true
          description: >-
            معرّف UUID لعملية التسليم المراد إعادة إرسالها: وهو الـ `uuid` لمدخل
            تم إرجاعه بواسطة `GET /v3/session/{sessionId}/webhooks/`. يجب أن
            ينتمي إلى الجلسة الموجودة في المسار.
          schema:
            type: string
            format: uuid
          example: 66666666-7777-8888-9999-000000000001
      responses:
        '200':
          description: >-
            التسليم الجديد، الذي جرت محاولته بالفعل. تمثل `response_status` ما
            أجاب به endpoint الخاص بك هذه المرة. يظل التسليم الأصلي دون تغيير.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionWebhookDelivery'
              examples:
                Accepted on resend:
                  value:
                    uuid: 66666666-7777-8888-9999-000000000004
                    session_id: 22222222-3333-4444-5555-666666666666
                    request_url: https://yourapp.com/webhooks/didit
                    response_status: 200
                    status: In Progress
                    webhook_type: status.updated
                    request_header: >-
                      {"Content-Type": "application/json", "X-Signature":
                      "b8eb1e376517ee0cad8ba98ff7f8fd35fc72eca231000963a96a335f82328835",
                      "X-Signature-V2":
                      "9efd2ce9ed1303e1d05273ef9608a59363ed9789a05253db4748b3e8e50cb109",
                      "X-Signature-Simple":
                      "bf3a9dc04b2c20ab539203b0cd5cca2a10f630bf62d8feb6d68d82af80f64774",
                      "X-Timestamp": "1792159542", "User-Agent":
                      "DiditWebhook/2.0 +https://didit.me"}
                    request_body: >-
                      {"application_id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","created_at":1792056057,"environment":"live","event_id":"33333333-4444-5555-6666-777777777777","sandbox_scenario":null,"session_id":"22222222-3333-4444-5555-666666666666","status":"In
                      Progress","timestamp":1792159542,"vendor_data":"user-123","webhook_type":"status.updated","workflow_id":"44444444-5555-6666-7777-888888888888","workflow_version":3}
                    created_at: '2026-10-16T14:05:42.330981Z'
        '400':
          description: >-
            تعذرت إعادة إرسال التسليم. حدد المسار بناءً على `code`: يعني
            `webhook_url_missing` أن التسليم لا يحتوي على عنوان URL مسجل ولم
            يُرسل أي شيء؛ ويعني `webhook_resend_error` تعذر إعادة توقيع التسليم
            المخزن أو تعذر إكمال المحاولة. بعد `webhook_resend_error`، يبدأ
            الحقل `detail` بـ `Error processing webhook resend:` متبوعًا بنص
            تشخيصي يمكن أن يتغير.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
                  code:
                    type: string
                    description: >-
                      رمز خطأ ثابت قابل للقراءة آلياً. اعتمد في تفريع منطقك
                      البرمجي على هذا الرمز، وليس على `detail`.
              examples:
                No recorded URL:
                  value:
                    detail: >-
                      The webhook delivery does not have a request URL
                      configured
                    code: webhook_url_missing
                Resend failed:
                  value:
                    detail: >-
                      Error processing webhook resend: Invalid webhook data
                      format
                    code: webhook_resend_error
        '401':
          description: >-
            انتهت صلاحية مفتاح API: تم إنشاؤه مع تاريخ انتهاء قد مضى. يتلقى
            المفتاح الخاطئ أو الملغى أيضاً `401`؛ ويتلقى المفتاح المفقود `403`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            الطلب غير مسموح به. يؤدي عدم وجود `x-api-key`، أو استخدام مفتاح غير
            صالح أو ملغى، إلى تلقي `Authentication credentials were not provided
            or are invalid.`. يتلقى مفتاح تطبيق آخر `You do not have permission
            to perform this action.`. يحصل المفتاح ذو النطاق المحدود الذي يفتقر
            إلى الوصول الذي يتطلبه هذا الـ endpoint على رسالة تذكر نوع الوصول
            المفقود، والمفتاح المستخدم من خارج قائمة العناوين المسموح بها الخاصة
            به يتلقى `This API key can't be used from this IP address.`. يؤدي
            وجود `sessionId` غير معروف إلى إرجاع `404` قبل التحقق من بيانات
            الاعتماد.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              examples:
                Missing or invalid key:
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Key of another application:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without webhooks write:
                  value:
                    detail: This API key has no write access to webhooks.
                Scoped key without decisions read:
                  value:
                    detail: This API key has no read access to decisions.
                Outside the IP allowlist:
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: >-
            الجلسة غير موجودة أو تم حذفها (`Not found.`، تُعاد قبل التحقق من
            بيانات الاعتماد)، أو أنها خارج حدود سير العمل أو حدود الحالة الخاصة
            بمفتاح ذي نطاق محدد (`Session not found.`). عملية التسليم غير
            الموجودة، أو التابعة لجلسة أخرى، أو التي لم تعد متاحة تُعيد `Webhook
            log not found`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              examples:
                Unknown session:
                  value:
                    detail: Not found.
                Outside the key's limits:
                  value:
                    detail: Session not found.
                Delivery not in this session:
                  value:
                    detail: Webhook log not found
        '429':
          description: >-
            تم تجاوز حد المعدل: أكثر من 300 طلب كتابة (POST، PATCH، PUT، DELETE)
            في نافذة الدقيقة الواحدة الحالية لمفتاح API هذا. انتظر لعدد الثواني
            المحدد في `Retry-After` قبل إعادة المحاولة.
          headers:
            Retry-After:
              description: عدد الثواني الواجب انتظارها قبل إعادة المحاولة.
              schema:
                type: integer
                minimum: 1
                example: 30
            X-RateLimit-Limit:
              description: الطلبات المسموح بها خلال نافذة الدقيقة الواحدة (300).
              schema:
                type: integer
                example: 300
            X-RateLimit-Remaining:
              description: الطلبات المتبقية في النافذة الحالية.
              schema:
                type: integer
                example: 0
            X-RateLimit-Reset:
              description: توقيت Unix (بالثواني) عند إعادة تعيين النافذة الحالية.
              schema:
                type: integer
                example: 1792056120
            X-RateLimit-Scope:
              description: اسم الميزانية التي تم تجاوزها.
              schema:
                type: string
                example: generic-write
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              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/session/22222222-3333-4444-5555-666666666666/webhook/66666666-7777-8888-9999-000000000001/resend'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.webhooks.resend(
                "22222222-3333-4444-5555-666666666666",
                "66666666-7777-8888-9999-000000000001",
            )
            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.sessions.webhooks.resend(
              "22222222-3333-4444-5555-666666666666",
              "66666666-7777-8888-9999-000000000001",
            );
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.Resend(ctx, \"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().webhooks().resend("22222222-3333-4444-5555-666666666666",
            "66666666-7777-8888-9999-000000000001");

            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->sessions->webhooks->resend('22222222-3333-4444-5555-666666666666',
            '66666666-7777-8888-9999-000000000001');

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

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

            result = didit.sessions.webhooks.resend(
              "22222222-3333-4444-5555-666666666666",
              "66666666-7777-8888-9999-000000000001"
            )
            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.Sessions.Webhooks.ResendAsync("22222222-3333-4444-5555-666666666666",
            "66666666-7777-8888-9999-000000000001");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    SessionWebhookDelivery:
      type: object
      description: >-
        محاولة تسليم webhook واحدة مسجلة لجلسة تحقق، مع رؤوس الطلب ومتنه الدقيقة
        التي أرسلتها Didit.
      required:
        - uuid
        - session_id
        - request_url
        - response_status
        - status
        - webhook_type
        - request_header
        - request_body
        - created_at
      properties:
        uuid:
          type: string
          format: uuid
          description: >-
            معرّف التسليم. استخدمه كـ `{webhook_uuid}` للحصول على عملية التسليم
            هذه أو إعادة إرسالها.
        session_id:
          type: string
          format: uuid
          description: الجلسة التي تنتمي إليها عملية التسليم (الجلسة الموجودة في المسار).
        request_url:
          type: string
          format: uri
          nullable: true
          description: رابط URL الذي أُرسل إليه التسليم.
        response_status:
          type: integer
          nullable: true
          description: >-
            حالة HTTP التي أرجعها الـ endpoint الخاص بك. `null` طالما أن التسليم
            في قائمة الانتظار ولم تتم محاولته بعد. عندما لا يتم تلقي أي استجابة
            HTTP، تسجل Didit حالة خاصة بها: `504` عندما لم يُجب الـ endpoint
            الخاص بك في غضون 5 ثوانٍ، و`503` لفشل الاتصال، و`400` عندما تم رفض
            عنوان URL لعدم أمانه (على سبيل المثال عنوان خاص أو داخلي)، و`404`
            لأي خطأ آخر في الطلب. يُعتبر الرمز `400` أو أعلى تسليمًا فاشلاً.
        status:
          type: string
          nullable: true
          description: >-
            حالة الجلسة عند إنشاء الحدث، على سبيل المثال `In Progress` أو
            `Approved` أو `Declined`.
        webhook_type:
          $ref: '#/components/schemas/WebhookEvent'
        request_header:
          type: string
          description: >-
            نص JSON (سلسلة نصية) لرؤوس الطلب التي أرسلتها Didit: وهي
            `Content-Type` و`X-Signature` و`X-Signature-V2`
            و`X-Signature-Simple` و`X-Timestamp` و`User-Agent`. قم بتحليله
            باستخدام محلل JSON. يحتوي على التوقيعات، ولا يحتوي أبداً على سر
            التوقيع.
        request_body:
          type: string
          description: >-
            نص JSON (سلسلة نصية) للـ payload الدقيق الذي أرسلته Didit، مع فرز
            المفاتيح، بما في ذلك `event_id` و`timestamp`. قم بتحليله باستخدام
            محلل JSON؛ راجع [شكل الـ
            Payload](https://docs.didit.me/ar/integration/webhooks#بنية-الحمولة).
            بالنسبة لمفتاح محدد النطاق بدون `media: read`، تكون عناوين URL
            للوسائط بداخله `null`؛ وبدون `sessions: write`، تكون رموز الجلسات
            وروابط التحقق المستضافة `null`. محتوى الطلب الذي تم تغييره بهذه
            الطريقة لا يعود مطابقاً لتوقيعاته. لا تسجل Didit محتوى الاستجابة
            الذي أرجعه الـ endpoint الخاص بك.
        created_at:
          type: string
          format: date-time
          description: وقت إنشاء التسليم.
    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 الخاص بتطبيقك، من 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.