> ## 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 في واجهة برمجة Didit

> غيّر webhook على مستوى التطبيق في Didit، ودوّر سره المشترك، واضبط الاحتفاظ بالبيانات والقالب البيومتري، وسجّل نطاقات محفظة الهوية.



مطالبة واجهة برمجة التطبيقات لتحديث إعدادات webhook
        نسخ الموجّه إلى الحافظة



      
      

\<pre>

\`Update my Didit application's webhook configuration through the Management API.

Endpoint:
PATCH https://verification.didit.me/v3/webhook/

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

Goal:
\- Change application-level settings: the legacy webhook URL and version, the application secret, the data-retention and biometric-template retention policy, the Digital ID wallet return hosts, or the allowed origins of the hosted flow.

Behavior:
\- Partial update: send only the fields to change. The response is the full configuration, the same shape as GET /v3/webhook/.
\- webhook_url and webhook_version change the application-level (legacy) webhook only. Didit uses it only while the application has no enabled destination, and only for status.updated and data.updated. It does not create a destination, and the next create, update or delete of a destination replaces webhook_url. To receive webhooks, create a destination with POST /v3/webhook/destinations/ instead.
\- rotate_secret_key: true replaces the application-level secret_shared_key immediately. Destination secrets are not changed. Each call generates a new secret, so it is not idempotent.
\- data_retention_months (1 to 120, or null for no automatic deletion): user verification sessions older than this many 30-day months are deleted automatically. Business verification sessions are not affected.
\- face_retention_policy (delete_with_session or retain_until_user_deleted) and face_retention_days (1 to 3650). retain_until_user_deleted needs face_retention_days in the same request or already set.
\- allowed_return_hosts replaces the registered list: up to 20 bare hostnames such as app.example.com (no scheme, port, path or wildcard). Send [] to clear it.
\- allowed_domains replaces the list of web origins (for example https://app.example.com; http only for localhost) that the hosted verification flow may be embedded in and may send the user back to with a session callback: up to 50 entries of at most 300 characters. Send [] to remove the restriction. Server-to-server calls are not affected. An invalid entry returns 400 on allowed_domains.
\- Manage destinations with the /v3/webhook/destinations/ endpoints, not here. Never send an endpoints field to this call: it is not part of this contract.

Example call:
curl -X PATCH "https://verification.didit.me/v3/webhook/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"face_retention_policy": "retain_until_user_deleted", "face_retention_days": 365}'

What to read from the response:
\- The updated fields, and secret_shared_key when you rotated it: store the new value before you discard the response.

Failure modes:
\- 400: field errors, each field mapped to a list of messages, for example { "face_retention_days": ["A finite retention duration is required when face retention is enabled."] }. Nothing is changed.
\- 401: { "detail": "This API key has expired." }
\- 403: { "detail": "You do not have permission to perform this action." } or { "detail": "This API key has no write access to webhooks." }
\- 429: more than 300 write requests per minute with this key; wait for Retry-After.

Side effects:
\- Rotating the secret changes how deliveries to the legacy webhook_url are signed from then on, retries included.
\- A data_retention_months change applies to existing sessions too: every session older than the new window is deleted automatically, and that deletion is irreversible.
\- A face_retention_policy change applies to session deletions from then on; it creates or purges no existing biometric template.

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

\</pre>



      
      

الصق في

> [!NOTE]
>
> `rotate_secret_key` يُدوّر السر على مستوى التطبيق فقط، وهو السر الذي يوقّع عمليات التسليم إلى `webhook_url` القديم. أما كل [وجهة webhook](https://docs.didit.me/ar/management-api/webhook/list-destinations.md) فتوقّع بالسر المشترك الخاص بها `secret_shared_key`، وهذا الاستدعاء لا يغيّره.حقول الاحتفاظ بالبيانات هي نفس السياسة التي تضبطها في **Business Console → App Settings → Data retention**. اقرأ [الاحتفاظ بالبيانات](https://docs.didit.me/ar/console/data-retention.md) قبل تغييرها، وخصوصاً [الاحتفاظ بالقالب البيومتري](https://docs.didit.me/ar/console/data-retention.md#الاحتفاظ-بالقالب-البيومتري). يُشرح `allowed_return_hosts` في [تسجيل وجهة الإرجاع الخاصة بك](https://docs.didit.me/ar/standalone-apis/digital-id-wallets.md#سجّل-وجهة-العودة-الخاصة-بك).يحدد `biometric_consent_mode` (`auto` أو `always` أو `never`) متى يطلب سير التحقق الموافقة البيومترية الصريحة قبل التقاط الوجه. راجع [الموافقة البيومترية](https://docs.didit.me/ar/getting-started/biometric-consent.md).لقراءة القيم الحالية أولاً، استدعِ [الحصول على إعدادات webhook](https://docs.didit.me/ar/management-api/webhook/get-config.md).


## OpenAPI

````yaml ar/openapi-25.json PATCH /v3/webhook/
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/:
    patch:
      tags:
        - Webhook
      summary: تحديث تهيئة webhook
      description: >-
        تحديث جزئي لإعدادات مستوى التطبيق: رابط webhook القديم وإصداره وسره،
        وسياسة الاحتفاظ بالبيانات والقوالب البيومترية، ومضيفي العودة لمحفظة
        Digital ID. أرسل الحقول المراد تغييرها فقط؛ تكون الاستجابة هي التكوين
        الكامل، بنفس بنية `GET /v3/webhook/`. لا تُدار الوجهات هنا: يمكنك
        إنشاؤها وتحديثها وحذفها باستخدام endpoints `/v3/webhook/destinations/`،
        ولا ترسل حقل `endpoints` إلى هذا الـ endpoint. ينطبق أي تغيير في
        `data_retention_months` أيضاً على الجلسات الحالية، ولا يمكن استعادة
        الجلسات التي تُحذف بسببه؛ راجع [الاحتفاظ
        بالبيانات](https://docs.didit.me/ar/console/data-retention) أولاً. يحتاج
        مفتاح API محدود النطاق إلى `webhooks: write`.
      operationId: update_webhook_config
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: أرسل الحقول المراد تغييرها فقط. لا تتم إدارة الوجهات هنا.
              properties:
                webhook_url:
                  type: string
                  format: uri
                  nullable: true
                  maxLength: 2000
                  description: >-
                    رابط webhook قديم على مستوى التطبيق. يستخدمه Didit فقط في
                    حال لم يكن لدى التطبيق أي وجهة مُمكَّنة، وحينها فقط للحدثين
                    `status.updated` و`data.updated`. وهو لا يُنشئ وجهة، وأي
                    عملية إنشاء أو تحديث أو حذف لوجهة لاحقة ستحل محله. لتلقي
                    إشعارات webhook، أنشئ وجهة باستخدام `POST
                    /v3/webhook/destinations/` بدلاً من ذلك.
                webhook_version:
                  type: string
                  enum:
                    - v1
                    - v2
                    - v3
                  description: إصدار payload لـ `webhook_url` القديم.
                rotate_secret_key:
                  type: boolean
                  default: false
                  description: >-
                    تستبدل القيمة `true` المفتاح `secret_shared_key` على مستوى
                    التطبيق بقيمة عشوائية جديدة على الفور؛ وتكون القيمة الجديدة
                    في الاستجابة. ولا تتغير أسرار الوجهات. كل استدعاء يتضمن
                    `true` يُنشئ سراً جديداً، لذا فإن العملية ليست idempotent.
                capture_method:
                  type: string
                  enum:
                    - MOBILE
                    - MOBILE_AND_DESKTOP
                  description: إعداد تطبيق قديم. لا يقرأه سير التحقق.
                data_retention_months:
                  type: integer
                  nullable: true
                  minimum: 1
                  maximum: 120
                  description: >-
                    نافذة الحذف التلقائي بالأشهر (يُحتسب الشهر على أنه 30
                    يوماً)، أو `null` لعدم وجود حذف تلقائي. ينطبق التغيير على
                    الجلسات الحالية أيضاً: يتم حذف كل جلسة تحقق من المستخدمين
                    أقدم من النافذة الجديدة تلقائياً، وهذا الحذف غير قابل
                    للتراجع.
                face_retention_policy:
                  type: string
                  enum:
                    - delete_with_session
                    - retain_until_user_deleted
                  description: >-
                    ما يحدث لتضمين الوجه الخاص بالجلسة عند حذف الجلسة. يتطلب
                    `retain_until_user_deleted` وجود `face_retention_days` في
                    الطلب نفسه أو تعيينه مسبقاً. ينطبق أي تغيير على عمليات حذف
                    الجلسات من ذلك الحين فصاعداً؛ ولا ينشئ أو يمسح أي قالب
                    بيومتري موجود.
                face_retention_days:
                  type: integer
                  nullable: true
                  minimum: 1
                  maximum: 3650
                  description: >-
                    فترة الاحتفاظ، بالأيام، بالقوالب البيومترية بموجب
                    `retain_until_user_deleted`.
                biometric_consent_mode:
                  type: string
                  enum:
                    - auto
                    - always
                    - never
                  description: >-
                    متى يطلب التدفق المستضاف وحزم SDK الأصلية من الشخص الموافقة
                    البيومترية الصريحة قبل التقاط الوجه. يطلب `auto` (الافتراضي)
                    فقط عند انطباق مُشغِّل: ولاية مُعلنة، أو عنوان IP الخاص
                    بالشخص، أو جهة إصدار مستند الهوية في إلينوي أو تكساس أو
                    كولورادو، أو يبدو أن الشخص في الولايات المتحدة دون ولاية
                    معروفة. يطلب `always` من كل شخص يلتقط سير العمل الخاص به
                    وجهاً. لا يعرض `never` الخطوة أبداً، وتقوم بجمع الموافقة
                    بنفسك قبل التقاط صورة سيلفي. يتم تسجيل كل تغيير في سجل
                    التدقيق. راجع [الموافقة
                    البيومترية](https://docs.didit.me/ar/getting-started/biometric-consent).
                allowed_return_hosts:
                  type: array
                  maxItems: 20
                  description: >-
                    يستبدل القائمة الكاملة لمضيفي العودة لمحفظة الهوية الرقمية
                    (Digital ID). أسماء مضيفين مجردة فقط، مثل
                    `shop.example.com`: بدون بروتوكول أو منفذ أو مسار أو محارف
                    بديلة. يتم تحويل القيم إلى أحرف صغيرة وتجاهل التكرارات. أرسل
                    `[]` لمسح القائمة.
                  items:
                    type: string
                    maxLength: 253
                allowed_domains:
                  type: array
                  maxItems: 50
                  items:
                    type: string
                    maxLength: 300
                  description: >-
                    يستبدل القائمة الكاملة للأصول المسموح بها. الأصول (على سبيل
                    المثال `https://app.example.com`؛ و`http` مسموح به فقط لـ
                    `localhost`) التي يمكن تضمين سير عمل التحقق المستضاف فيها
                    والتي يمكنها إعادة المستخدم إليها عبر callback للجلسة. لا
                    تتأثر الاستدعاءات بين الخوادم. القائمة الفارغة تعني عدم وجود
                    أي قيود. تقوم Didit بتخزين كل أصل بأحرف صغيرة دون منفذ
                    افتراضي. يفشل الإدخال غير الصالح بالرمز `400` في
                    `allowed_domains`. أرسل `[]` لإزالة القيد.
                  example:
                    - https://app.example.com
            examples:
              Enable biometric template retention:
                value:
                  face_retention_policy: retain_until_user_deleted
                  face_retention_days: 365
                  biometric_consent_mode: auto
              Rotate the legacy secret:
                value:
                  rotate_secret_key: true
              Set data retention:
                value:
                  data_retention_months: 24
              Register return hosts:
                value:
                  allowed_return_hosts:
                    - shop.example.com
                    - app.example.com
      responses:
        '200':
          description: >-
            التكوين الكامل بعد التحديث، بنفس بنية `GET /v3/webhook/`. عندما تقوم
            بتدوير السر، قم بتخزين `secret_shared_key` الجديد قبل التخلص من
            الاستجابة.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfig'
              examples:
                Retention enabled:
                  value:
                    webhook_url: https://yourapp.com/webhooks/didit
                    webhook_version: v3
                    secret_shared_key: dGhpcy1pcy10aGUtYXBwLWxldmVsLXNlY3JldC0wMDA
                    capture_method: MOBILE
                    data_retention_months: 24
                    face_retention_policy: retain_until_user_deleted
                    face_retention_days: 365
                    biometric_consent_mode: auto
                    available_events:
                      - value: status.updated
                        label: Session status updated
                      - value: data.updated
                        label: Session data updated
                      - value: user.status.updated
                        label: User status updated
                      - value: user.data.updated
                        label: User data updated
                      - value: business.status.updated
                        label: Business status updated
                      - value: business.data.updated
                        label: Business data updated
                      - value: activity.created
                        label: Activity created
                      - value: transaction.created
                        label: Transaction created
                      - value: transaction.status.updated
                        label: Transaction status updated
                      - value: travel_rule.status.updated
                        label: Travel Rule Status Updated
                      - value: workflow.compliance_changed
                        label: Workflow Compliance Changed
                    allowed_return_hosts:
                      - shop.example.com
                    endpoints:
                      - uuid: 11111111-2222-3333-4444-555555555555
                        label: Production session webhooks
                        url: https://yourapp.com/webhooks/didit
                        enabled: true
                        webhook_version: v3
                        secret_shared_key: dGhpcy1pcy1hbi1leGFtcGxlLXNlY3JldC0wMDAwMDA
                        subscribed_events:
                          - status.updated
                          - data.updated
                        created_at: '2026-01-04T08:00:00.000000Z'
                        updated_at: '2026-04-22T14:09:11.523671Z'
        '400':
          description: >-
            فشل التحقق: يتم تعيين كل حقل غير صالح إلى قائمة من الرسائل، ولا يتم
            تغيير أي شيء. نص الطلب الذي لا يمثل JSON صالحاً يُرجع `{"detail":
            "JSON parse error - ..."}`.
          content:
            application/json:
              schema:
                type: object
                description: كل حقل غير صالح مقترن بقائمة من الرسائل.
                additionalProperties:
                  type: array
                  items:
                    type: string
              examples:
                Retention days missing:
                  value:
                    face_retention_days:
                      - >-
                        A finite retention duration is required when face
                        retention is enabled.
                    biometric_consent_mode: auto
                Retention window out of range:
                  value:
                    data_retention_months:
                      - Ensure this value is less than or equal to 120.
                Invalid return host:
                  value:
                    allowed_return_hosts:
                      - >-
                        'https://shop.example.com' is not a hostname. Register
                        the bare host (e.g. shop.example.com): no scheme, port,
                        path or wildcard.
                Invalid choice:
                  value:
                    face_retention_policy:
                      - '"forever" is not a valid choice.'
        '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` أو عدم صلاحيته أو إلغائه،
            تتلقى `You do not have permission to perform this action.`. يحصل
            المفتاح ذو النطاق المحدود الذي يفتقر إلى الوصول الذي يتطلبه هذا الـ
            endpoint على رسالة تذكر نوع الوصول المفقود، والمفتاح المستخدم من
            خارج قائمة العناوين المسموح بها الخاصة به يتلقى `This API key can't
            be used from this IP address.`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              examples:
                Missing or invalid key:
                  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.
                Outside the IP allowlist:
                  value:
                    detail: This API key can't be used from this IP address.
        '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 PATCH 'https://verification.didit.me/v3/webhook/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"face_retention_policy": "retain_until_user_deleted", "face_retention_days": 365}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.webhooks.update_config(
                face_retention_policy="retain_until_user_deleted",
                face_retention_days=365,
                biometric_consent_mode="auto",
            )
            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.updateConfig({
              face_retention_policy: "retain_until_user_deleted",
              face_retention_days: 365,
              biometric_consent_mode: "auto",
            });
            console.log(result);
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.WebhooksUpdateConfigParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.webhooks().updateConfig(WebhooksUpdateConfigParams.builder()
                    .faceRetentionPolicy(WebhooksUpdateConfigParams.FaceRetentionPolicy.of("retain_until_user_deleted"))
                    .faceRetentionDays(365L)
                    .biometricConsentMode(WebhooksUpdateConfigParams.BiometricConsentMode.of("auto"))
                    .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->updateConfig([
                'face_retention_policy' => 'retain_until_user_deleted',
                'face_retention_days' => 365,
                'biometric_consent_mode' => 'auto',
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.webhooks.update_config(
              face_retention_policy: "retain_until_user_deleted",
              face_retention_days: 365,
              biometric_consent_mode: "auto"
            )
            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.UpdateConfigAsync(new
            WebhooksUpdateConfigParams

            {
                FaceRetentionPolicy = new WebhooksUpdateConfigParamsFaceRetentionPolicy("retain_until_user_deleted"),
                FaceRetentionDays = 365,
                BiometricConsentMode = new WebhooksUpdateConfigParamsBiometricConsentMode("auto"),
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    WebhookConfig:
      type: object
      description: >-
        تكوين webhook على مستوى التطبيق، وسياسة الاحتفاظ بالبيانات، ومضيفو إرجاع
        محفظة الهوية الرقمية، مع كل وجهة webhook.
      required:
        - webhook_url
        - webhook_version
        - secret_shared_key
        - capture_method
        - data_retention_months
        - face_retention_policy
        - face_retention_days
        - available_events
        - allowed_return_hosts
        - endpoints
      properties:
        webhook_url:
          type: string
          format: uri
          nullable: true
          description: >-
            رابط webhook على مستوى التطبيق (القديم). يرسل Didit إليه فقط في حال
            عدم وجود وجهة مفعّلة للتطبيق، وحينها يرسل `status.updated`
            و`data.updated` فقط. كل عملية إنشاء أو تحديث أو حذف لوجهة تضبطه على
            عنوان URL لأقدم وجهة مفعّلة، أو `null` عند عدم وجود أي وجهة مفعّلة.
        webhook_version:
          type: string
          enum:
            - v1
            - v2
            - v3
          description: >-
            إصدار payload لـ `webhook_url` القديم. لكل وجهة `webhook_version`
            خاص بها.
        secret_shared_key:
          type: string
          description: >-
            سر التوقيع على مستوى التطبيق (token آمن لعناوين URL مكوّن من 43
            حرفاً). يقوم بتوقيع عمليات التسليم المرسلة إلى `webhook_url` القديم
            فقط؛ بينما توقّع كل وجهة باستخدام `secret_shared_key` الخاص بها.
            يستلمه مستدعو مفتاح API دائماً بالكامل؛ بينما يتلقى مستخدمو Console
            الذين لا يملكون إذن `read:webhooks` سلسلة فارغة.
        capture_method:
          type: string
          enum:
            - MOBILE
            - MOBILE_AND_DESKTOP
          description: >-
            إعداد تطبيق قديم. لا يقرأه سير التحقق: خيارات الالتقاط يتم تكوينها
            لكل سير عمل.
        data_retention_months:
          type: integer
          nullable: true
          minimum: 1
          maximum: 120
          description: >-
            نافذة الحذف التلقائي. تُحذف جلسات التحقق من المستخدمين التي تم
            إنشاؤها قبل أكثر من هذا العدد من الأشهر (الشهر يُحسب كـ 30 يومًا)
            تلقائيًا، وهذا الحذف لا يمكن التراجع عنه. تعني القيمة `null` أنه لا
            يتم حذف الجلسات تلقائيًا أبدًا. راجع [الاحتفاظ
            بالبيانات](https://docs.didit.me/ar/console/data-retention).
        face_retention_policy:
          type: string
          enum:
            - delete_with_session
            - retain_until_user_deleted
          description: >-
            ما يحدث لتضمين الوجه الخاص بالجلسة عند حذف الجلسة.
            `delete_with_session` (افتراضي) يحذفه مع الجلسة.
            `retain_until_user_deleted` هو خيار الاشتراك في [الاحتفاظ بالقالب
            البيومتري](https://docs.didit.me/ar/console/data-retention#الاحتفاظ-بالقالب-البيومتري):
            تتم إدارة قالب بيومتري خالٍ من الصور مرتبط بالمستخدم (User) بشكل
            منفصل حتى تنتهي فترة الاحتفاظ به، أو يُحذف المستخدم، أو تقوم بمسحه.
        face_retention_days:
          type: integer
          nullable: true
          minimum: 1
          maximum: 3650
          description: >-
            فترة الاحتفاظ، بالأيام، بالقوالب البيومترية بموجب
            `retain_until_user_deleted`. مطلوبة عند تعيين تلك السياسة.
        biometric_consent_mode:
          type: string
          enum:
            - auto
            - always
            - never
          description: >-
            متى يطلب التدفق المستضاف وحزم SDK الأصلية من الشخص الموافقة
            البيومترية الصريحة قبل التقاط الوجه. يطلب `auto` (الافتراضي) فقط عند
            انطباق مُشغِّل: ولاية مُعلنة، أو عنوان IP الخاص بالشخص، أو جهة إصدار
            مستند الهوية في إلينوي أو تكساس أو كولورادو، أو يبدو أن الشخص في
            الولايات المتحدة دون ولاية معروفة. يطلب `always` من كل شخص يلتقط سير
            العمل الخاص به وجهاً. لا يعرض `never` الخطوة أبداً، وتقوم بجمع
            الموافقة بنفسك قبل التقاط صورة سيلفي. يتم تسجيل كل تغيير في سجل
            التدقيق. راجع [الموافقة
            البيومترية](https://docs.didit.me/ar/getting-started/biometric-consent).
        available_events:
          type: array
          description: كل نوع حدث يمكن للوجهة الاشتراك فيه، مع تسمية للعرض.
          items:
            type: object
            required:
              - value
              - label
            properties:
              value:
                $ref: '#/components/schemas/WebhookEvent'
              label:
                type: string
                description: تسمية العرض، على سبيل المثال `Session status updated`.
        allowed_return_hosts:
          type: array
          maxItems: 20
          description: >-
            أسماء المضيفين (تطابق تام، عبر HTTPS فقط) التي يجوز لعملية تحقق
            مستقلة من محفظة الهوية الرقمية إعادة المستخدم إليها عبر
            `return_url`. يُسمح دائماً بنطاق العلامة البيضاء الخاص بك أيضاً.
            راجع [تسجيل وجهة الإرجاع الخاصة
            بك](https://docs.didit.me/ar/standalone-apis/digital-id-wallets#سجّل-وجهة-العودة-الخاصة-بك).
          items:
            type: string
            maxLength: 253
        endpoints:
          type: array
          description: >-
            كل وجهة webhook للتطبيق، الأقدم أولاً، مع سر التوقيع الخاص بكل منها.
            للقراءة فقط هنا: يمكنك إدارة الوجهات باستخدام endpoints الخاصة بـ
            `/v3/webhook/destinations/`.
          items:
            $ref: '#/components/schemas/WebhookConfigDestination'
        allowed_domains:
          type: array
          maxItems: 50
          items:
            type: string
            maxLength: 300
          description: >-
            الأصول (على سبيل المثال `https://app.example.com`؛ و`http` لـ
            `localhost` فقط) التي قد يتم تضمين سير عمل التحقق المستضاف فيها، وقد
            يُعاد إرسال المستخدم إليها عبر استدعاء رجوعي للجلسة. لا تتأثر
            الاستدعاءات بين الخوادم. تعني القائمة الفارغة عدم وجود أي قيود. يخزن
            Didit كل أصل بأحرف صغيرة دون منفذ افتراضي. أي إدخال غير صالح يفشل
            بخطأ `400` في `allowed_domains`.
          example:
            - https://app.example.com
    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
    WebhookConfigDestination:
      type: object
      description: >-
        وجهة webhook كما هي مدرجة في إعدادات webhook، بدون مقاييس التسليم. يضيف
        `GET /v3/webhook/destinations/{destination_uuid}/` ملخص التسليم الخاص
        بها.
      required:
        - uuid
        - label
        - url
        - enabled
        - webhook_version
        - secret_shared_key
        - subscribed_events
        - created_at
        - updated_at
      properties:
        uuid:
          type: string
          format: uuid
          description: معرّف الوجهة.
        label:
          type: string
          maxLength: 255
          description: اسم مقروء للبشر.
        url:
          type: string
          format: uri
          maxLength: 2000
          description: HTTPS endpoint ترسل Didit الأحداث إليه.
        enabled:
          type: boolean
          description: تؤدي القيمة `false` إلى إيقاف عمليات التسليم مؤقتاً إلى هذه الوجهة.
        webhook_version:
          type: string
          enum:
            - v1
            - v2
            - v3
          description: إصدار payload المرسل إلى هذه الوجهة.
        secret_shared_key:
          type: string
          description: >-
            سر توقيع هذه الوجهة (token آمن للاستخدام في عناوين URL بطول 43
            حرفاً). تحقق من كل webhook باستخدام سر الوجهة التي أُرسل إليها.
            يتلقاه المستدعون باستخدام مفتاح API دائماً بالكامل؛ بينما يتلقى
            مستخدمو Console غير الحاصلين على إذن `read:webhooks` سلسلة فارغة.
        subscribed_events:
          type: array
          uniqueItems: true
          description: >-
            أنواع الأحداث المُسلّمة إلى هذه الوجهة. تكون فارغة عندما تم إنشاء
            الوجهة بدون أحداث، وفي هذه الحالة لا تتلقى أي شيء.
          items:
            $ref: '#/components/schemas/WebhookEvent'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  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.