> ## 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: نموذج KYC مخصص

> أنشئ استبيانات KYC والامتثال المخصصة برمجياً من Didit، مع أسئلة مرتبة وخيارات و54 ترجمة لغوية. الدفع لكل استدعاء من Didit.



موجّه API لإنشاء الاستبيان
        نسخ الموجّه إلى الحافظة



      
      

\<pre>

\`Create a simple Didit questionnaire through the Management API.

Endpoint:
POST https://verification.didit.me/v3/questionnaires/

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

Requirements:
\- Use the simple v3 API shape with form_elements.
\- Do not send graph, branches, next, required_if, or conditional logic.
\- Include languages with en and default_language set to en.
\- Use customer-friendly element_type values such as short_text, multiple_choice, email, file_upload, or date_picker.
\- For choice questions, send options with value and label.
\- Store the questionnaire_id from the response because I will use it later as questionnaire_uuid in workflows.

Example request body:
\{
"title": "Customer Onboarding",
"languages": ["en"],
"default_language": "en",
"form_elements": [
\{
  "id": "occupation",
  "element_type": "short_text",
  "label": { "en": "What is your occupation?" },
  "is_required": true
},
\{
  "id": "source_of_funds",
  "element_type": "multiple_choice",
  "label": { "en": "Source of funds" },
  "is_required": true,
  "options": [
    \{ "value": "employment", "label": { "en": "Employment" } },
    \{ "value": "business", "label": { "en": "Business" } },
    \{ "value": "investments", "label": { "en": "Investments" } }
  ]
}
]
}

Build the API call, handle validation errors, and return the questionnaire_id from the response.`

\</pre>



      
      

الصق في

استخدم هذا endpoint لإنشاء استبيانات بسيطة عبر واجهة API. أرسل مصفوفة `form_elements` بالترتيب الذي يجب أن يجيب به المستخدمون عن الأسئلة. يبني Didit رسم الاستبيان الداخلي نيابةً عنك.لا تدعم الواجهة إلا الاستبيانات الخطية البسيطة. لا ترسل `graph` أو `branches` أو `next` أو القواعد الشرطية.## الحقول المطلوبة- `title` هو اسم الاستبيان الداخلي.
- يجب أن تتضمن `languages` القيمة `en`.
- يجب أن تحتوي `form_elements` على سؤال واحد على الأقل.
- يحتاج كل عنصر في النموذج إلى `element_type` و`label` مترجمة.يمكنك أيضاً إضافة `description` مترجمة اختيارية إلى أي عنصر في النموذج لتكون نصًا مساعدًا له. تُقبل هذه الخاصية في كل أنواع العناصر ما عدا `separator`، وتُعاد كقيمة `description` للعنصر في [تقرير الاستبيان](https://docs.didit.me/ar/core-technology/questionnaires/report-questionnaire.md).## أنواع العناصراستخدم قيماً بأحرف صغيرة مثل `short_text` أو `multiple_choice` أو `email` أو `file_upload` أو `date_picker`. كما تُقبل قيم التعداد بأحرف كبيرة مثل `SHORT_TEXT`.بالنسبة إلى `dropdown` و`single_choice` و`multiple_choice`، أضف `options`. إذا حذفت `value` لأحد الخيارات، يولّد Didit قيمة له من التسمية.```json theme={null}
{
  "title": "Customer Onboarding",
  "languages": ["en"],
  "default_language": "en",
  "form_elements": [
    {
      "id": "occupation",
      "element_type": "short_text",
      "label": { "en": "What is your occupation?" },
      "is_required": true
    },
    {
      "id": "source_of_funds",
      "element_type": "multiple_choice",
      "label": { "en": "Source of funds" },
      "is_required": true,
      "options": [
        { "value": "employment", "label": { "en": "Employment" } },
        { "value": "business", "label": { "en": "Business" } },
        { "value": "investments", "label": { "en": "Investments" } }
      ]
    }
  ]
}
```## التحقق من صحة الحقولأضف كائن `validation` اختيارياً إلى عنصر `short_text` أو `long_text` أو `number` لفرض تنسيق معين على إجابة المستخدم. ويفيد ذلك في المعرّفات ذات التنسيقات الصارمة، مثل الأرقام الضريبية وأرقام الهوية الوطنية وأرقام البطاقات. يعمل التحقق أثناء ملء المستخدم للحقل (لا يستطيع المستخدم المتابعة حتى يجتاز الحقل التحقق)، وتعيد واجهة API فرضه عند الإرسال.| الحقل | ينطبق على | الوصف |
| - | - | - |
| `pattern` | `short_text`, `long_text` | تعبير نمطي يجب أن تطابق القيمة كاملةً. استخدم المجموعة الفرعية المحمولة من ECMA-262، ولا تضف مرساتَي `^`/`$` (تُطابَق القيمة كاملةً). |
| `min_length` | `short_text`, `long_text` | الحد الأدنى لعدد الأحرف. |
| `max_length` | `short_text`, `long_text` | الحد الأقصى لعدد الأحرف. |
| `min` | `number` | الحد الأدنى للقيمة العددية. |
| `max` | `number` | الحد الأقصى للقيمة العددية. |
| `error_message` | جميع ما سبق | الرسالة المترجمة التي تظهر عندما لا تجتاز القيمة التحقق. إذا حُذفت، تُستخدم رسالة عامة. |```json theme={null}
{
  "title": "Customer Onboarding",
  "languages": ["en"],
  "default_language": "en",
  "form_elements": [
    {
      "id": "tax_id",
      "element_type": "short_text",
      "label": { "en": "Tax ID" },
      "is_required": true,
      "validation": {
        "pattern": "[A-Z]{2}[0-9]{9}",
        "min_length": 11,
        "max_length": 11,
        "error_message": { "en": "Enter a valid Tax ID (2 letters followed by 9 digits)." }
      }
    }
  ]
}
```تتضمن الاستجابة `questionnaire_id`. احفظه، لأنك ستستخدمه كقيمة `questionnaire_uuid` عند إضافة الاستبيان إلى سير العمل.


## OpenAPI

````yaml ar/openapi-25.json POST /v3/questionnaires/
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/questionnaires/:
    post:
      tags:
        - Questionnaires
      summary: إنشاء استبيان
      description: >-
        أنشئ استبياناً خطياً بسيطاً. أرسل `form_elements` بترتيب العرض؛ تتطلب
        المجموعات المتفرعة والقابلة للتكرار استخدام لوحة التحكم. القيمة
        الافتراضية هي الإصدار الأول v1 `published`.
      operationId: create_questionnaire
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimpleQuestionnaireRequest'
            examples:
              Simple:
                summary: استبيان أساسي
                value:
                  title: Customer Onboarding
                  description: Additional information needed for verification
                  default_language: en
                  languages:
                    - en
                  is_active: true
                  form_elements:
                    - id: occupation
                      element_type: short_text
                      label:
                        en: What is your occupation?
                      is_required: true
                      placeholder:
                        en: Software engineer
                    - id: source_of_funds
                      element_type: multiple_choice
                      label:
                        en: Source of funds
                      is_required: true
                      options:
                        - value: employment
                          label:
                            en: Employment
                        - value: business
                          label:
                            en: Business
                        - value: investments
                          label:
                            en: Investments
                        - value: other
                          label:
                            en: Other
      responses:
        '201':
          description: >-
            تم إنشاء الاستبيان. تتضمن الاستجابة `questionnaire_id` — قم بتخزينه
            للإشارة إلى هذا الاستبيان من سير العمل أو استدعاءات التحديث/الحذف
            المستقبلية.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionnaireDetail'
              examples:
                Created:
                  value:
                    questionnaire_id: 11111111-2222-3333-4444-555555555555
                    title: Customer Onboarding
                    description: Additional information needed for verification
                    languages:
                      - en
                    default_language: en
                    is_active: true
                    is_simple_questionnaire: true
                    graph:
                      start_node: occupation
                      nodes:
                        occupation:
                          element_type: SHORT_TEXT
                          is_required: true
                          title:
                            en: What is your occupation?
                          next: source_of_funds
                        source_of_funds:
                          element_type: MULTIPLE_CHOICE
                          is_required: true
                          title:
                            en: Source of funds
                          choices:
                            - value: employment
                              label:
                                en: Employment
                            - value: business
                              label:
                                en: Business
                          next: null
                    sections: []
                    questionnaire_group_id: 11111111-2222-3333-4444-555555555555
                    version: 1
                    status: published
                    published_at: '2026-04-23T10:00:00Z'
                    is_editable: false
        '400':
          description: >-
            خطأ في التحقق. الأسباب الشائعة: قيمة `element_type` غير معروفة، أو
            حقل قابل للترجمة تنقصه الترجمة لإحدى لغات `languages`، أو
            `languages` لا تتضمن `en`، أو `default_language` غير موجود في
            `languages`، أو خيار بدون `label`، أو سؤال يحتوي على
            `branches`/`required_if`/`repeatable_config` (غير مدعومة من قِبل هذا
            الـ endpoint)، أو إرسال `graph` أولي بدلاً من `form_elements`. نص
            الاستجابة عبارة عن خطأ في التحقق من DRF مفهرس بحسب اسم الحقل.
          content:
            application/json:
              examples:
                Graph not accepted:
                  value:
                    graph: >-
                      The v3 questionnaire API only accepts simple
                      `form_elements`, not `graph`.
                Missing label:
                  value:
                    form_elements:
                      - label:
                          - This field is required.
        '403':
          description: مفتاح API مفقود أو غير صالح أو منتهي الصلاحية أو مخصص لتطبيق مختلف.
          content:
            application/json:
              examples:
                Invalid token:
                  value:
                    detail: You do not have permission to perform this action.
        '415':
          description: >-
            نوع وسائط غير مدعوم. عيّن `Content-Type: application/json` وأرسل نص
            طلب بصيغة JSON.
        '429':
          description: تم تجاوز حد المعدل. أعد المحاولة مع تراجع أسي.
        '500':
          description: >-
            خطأ غير متوقع في الخادم أثناء إنشاء الاستبيان. يمكن إعادة المحاولة
            بأمان.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -X POST 'https://verification.didit.me/v3/questionnaires/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "title": "Customer Onboarding",
                "default_language": "en",
                "languages": ["en"],
                "form_elements": [
                  {
                    "id": "occupation",
                    "element_type": "short_text",
                    "label": {"en": "What is your occupation?"},
                    "is_required": true
                  }
                ]
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.questionnaires.create(
                title="Customer Onboarding",
                description="Additional information needed for verification",
                languages=["en"],
                default_language="en",
                is_active=True,
                form_elements=[{
                    "id": "occupation",
                    "element_type": "short_text",
                    "label": {"en": "What is your occupation?"},
                    "placeholder": {"en": "Software engineer"},
                    "is_required": True,
                }, {
                    "id": "source_of_funds",
                    "element_type": "multiple_choice",
                    "label": {"en": "Source of funds"},
                    "is_required": True,
                    "options": [{
                        "value": "employment",
                        "label": {"en": "Employment"},
                    }, {
                        "value": "business",
                        "label": {"en": "Business"},
                    }, {
                        "value": "investments",
                        "label": {"en": "Investments"},
                    }, {
                        "value": "other",
                        "label": {"en": "Other"},
                    }],
                }],
            )
            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.questionnaires.create({
              title: "Customer Onboarding",
              description: "Additional information needed for verification",
              languages: ["en"],
              default_language: "en",
              is_active: true,
              form_elements: [{
                id: "occupation",
                element_type: "short_text",
                label: { en: "What is your occupation?" },
                placeholder: { en: "Software engineer" },
                is_required: true,
              }, {
                id: "source_of_funds",
                element_type: "multiple_choice",
                label: { en: "Source of funds" },
                is_required: true,
                options: [{
                  value: "employment",
                  label: { en: "Employment" },
                }, {
                  value: "business",
                  label: { en: "Business" },
                }, {
                  value: "investments",
                  label: { en: "Investments" },
                }, {
                  value: "other",
                  label: { en: "Other" },
                }],
              }],
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Create(ctx, didit.SimpleQuestionnaireRequest{\n\tTitle:           \"Customer Onboarding\",\n\tDescription:     didit.String(\"Additional information needed for verification\"),\n\tLanguages:       []string{\"en\"},\n\tDefaultLanguage: didit.String(\"en\"),\n\tIsActive:        didit.Bool(true),\n\tFormElements: []didit.SimpleQuestionnaireElement{{\n\t\tID:          didit.String(\"occupation\"),\n\t\tElementType: \"short_text\",\n\t\tLabel:       map[string]string{\"en\": \"What is your occupation?\"},\n\t\tPlaceholder: didit.Some(map[string]string{\"en\": \"Software engineer\"}),\n\t\tIsRequired:  didit.Bool(true),\n\t}, {\n\t\tID:          didit.String(\"source_of_funds\"),\n\t\tElementType: \"multiple_choice\",\n\t\tLabel:       map[string]string{\"en\": \"Source of funds\"},\n\t\tIsRequired:  didit.Bool(true),\n\t\tOptions: didit.Some([]didit.SimpleQuestionnaireElementOptions{{\n\t\t\tValue: didit.String(\"employment\"),\n\t\t\tLabel: map[string]string{\"en\": \"Employment\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"business\"),\n\t\t\tLabel: map[string]string{\"en\": \"Business\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"investments\"),\n\t\t\tLabel: map[string]string{\"en\": \"Investments\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"other\"),\n\t\t\tLabel: map[string]string{\"en\": \"Other\"},\n\t\t}}),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.util.List;

            import java.util.Map;

            import me.didit.Didit;

            import me.didit.types.SimpleQuestionnaireElement;

            import me.didit.types.SimpleQuestionnaireRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.questionnaires().create(SimpleQuestionnaireRequest.builder()
                    .title("Customer Onboarding")
                    .description("Additional information needed for verification")
                    .languages(List.of("en"))
                    .defaultLanguage("en")
                    .isActive(true)
                    .formElements(List.of(
                            SimpleQuestionnaireElement.builder()
                                    .id("occupation")
                                    .elementType(SimpleQuestionnaireElement.ElementType.of("short_text"))
                                    .label(Map.of("en", "What is your occupation?"))
                                    .placeholder(Map.of("en", "Software engineer"))
                                    .isRequired(true)
                                    .build(),
                            SimpleQuestionnaireElement.builder()
                                    .id("source_of_funds")
                                    .elementType(SimpleQuestionnaireElement.ElementType.of("multiple_choice"))
                                    .label(Map.of("en", "Source of funds"))
                                    .isRequired(true)
                                    .options(List.of(
                                            SimpleQuestionnaireElement.Options.builder()
                                                    .value("employment")
                                                    .label(Map.of("en", "Employment"))
                                                    .build(),
                                            SimpleQuestionnaireElement.Options.builder()
                                                    .value("business")
                                                    .label(Map.of("en", "Business"))
                                                    .build(),
                                            SimpleQuestionnaireElement.Options.builder()
                                                    .value("investments")
                                                    .label(Map.of("en", "Investments"))
                                                    .build(),
                                            SimpleQuestionnaireElement.Options.builder()
                                                    .value("other")
                                                    .label(Map.of("en", "Other"))
                                                    .build()))
                                    .build()))
                    .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->questionnaires->create([
                'title' => 'Customer Onboarding',
                'description' => 'Additional information needed for verification',
                'languages' => ['en'],
                'default_language' => 'en',
                'is_active' => true,
                'form_elements' => [[
                    'id' => 'occupation',
                    'element_type' => 'short_text',
                    'label' => ['en' => 'What is your occupation?'],
                    'placeholder' => ['en' => 'Software engineer'],
                    'is_required' => true,
                ], [
                    'id' => 'source_of_funds',
                    'element_type' => 'multiple_choice',
                    'label' => ['en' => 'Source of funds'],
                    'is_required' => true,
                    'options' => [[
                        'value' => 'employment',
                        'label' => ['en' => 'Employment'],
                    ], [
                        'value' => 'business',
                        'label' => ['en' => 'Business'],
                    ], [
                        'value' => 'investments',
                        'label' => ['en' => 'Investments'],
                    ], [
                        'value' => 'other',
                        'label' => ['en' => 'Other'],
                    ]],
                ]],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.questionnaires.create(
              title: "Customer Onboarding",
              description: "Additional information needed for verification",
              languages: ["en"],
              default_language: "en",
              is_active: true,
              form_elements: [{
                id: "occupation",
                element_type: "short_text",
                label: { en: "What is your occupation?" },
                placeholder: { en: "Software engineer" },
                is_required: true,
              }, {
                id: "source_of_funds",
                element_type: "multiple_choice",
                label: { en: "Source of funds" },
                is_required: true,
                options: [{
                  value: "employment",
                  label: { en: "Employment" },
                }, {
                  value: "business",
                  label: { en: "Business" },
                }, {
                  value: "investments",
                  label: { en: "Investments" },
                }, {
                  value: "other",
                  label: { en: "Other" },
                }],
              }]
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Collections.Generic;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.Questionnaires.CreateAsync(new
            SimpleQuestionnaireRequest

            {
                Title = "Customer Onboarding",
                Description = "Additional information needed for verification",
                Languages = new string[] { "en" },
                DefaultLanguage = "en",
                IsActive = true,
                FormElements = new SimpleQuestionnaireElement[]
                {
                    new()
                    {
                        Id = "occupation",
                        ElementType = "short_text",
                        Label = new Dictionary<string, string> { ["en"] = "What is your occupation?" },
                        Placeholder = new Dictionary<string, string> { ["en"] = "Software engineer" },
                        IsRequired = true,
                    },
                    new()
                    {
                        Id = "source_of_funds",
                        ElementType = "multiple_choice",
                        Label = new Dictionary<string, string> { ["en"] = "Source of funds" },
                        IsRequired = true,
                        Options = new SimpleQuestionnaireElementOptions[]
                        {
                            new()
                            {
                                Value = "employment",
                                Label = new Dictionary<string, string> { ["en"] = "Employment" },
                            },
                            new()
                            {
                                Value = "business",
                                Label = new Dictionary<string, string> { ["en"] = "Business" },
                            },
                            new()
                            {
                                Value = "investments",
                                Label = new Dictionary<string, string> { ["en"] = "Investments" },
                            },
                            new()
                            {
                                Value = "other",
                                Label = new Dictionary<string, string> { ["en"] = "Other" },
                            },
                        },
                    },
                },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    SimpleQuestionnaireRequest:
      type: object
      description: >-
        أنشئ استبياناً خطياً بسيطاً. تحوّل API عناصر `form_elements` إلى المخطط
        الداخلي للاستبيان.
      required:
        - title
        - languages
        - form_elements
      properties:
        title:
          type: string
          description: اسم داخلي للاستبيان.
        description:
          type: string
          nullable: true
        languages:
          type: array
          description: اللغات المضمنة في كل تسمية. يجب أن تتضمن `en`.
          items:
            type: string
          example:
            - en
        default_language:
          type: string
          description: اللغة الافتراضية. يجب تضمينها في `languages`.
          example: en
        is_active:
          type: boolean
          default: true
        status:
          type: string
          enum:
            - draft
            - published
          description: احذف هذا الحقل لإنشاء استبيان منشور وجاهز لمهام سير العمل.
        form_elements:
          type: array
          minItems: 1
          description: >-
            الأسئلة بالترتيب الدقيق الذي يجب أن يراها المستخدمون به. التفريع
            والحقول المشروطة غير مدعومة.
          items:
            $ref: '#/components/schemas/SimpleQuestionnaireElement'
    QuestionnaireDetail:
      type: object
      description: >-
        تفاصيل الاستبيان الكاملة المرجعة من endpoint الخاصة بـ GET وPOST (إنشاء)
        وPATCH (تحديث).
      properties:
        questionnaire_id:
          type: string
          format: uuid
          description: >-
            المعرّف الفريد للاستبيان. استخدم هذا المعرّف عند الإشارة إلى
            الاستبيان من سير العمل أو في طلبات التحديث/الحذف اللاحقة.
        title:
          type: string
        description:
          type: string
          nullable: true
        languages:
          type: array
          items:
            type: string
        default_language:
          type: string
        is_active:
          type: boolean
        is_simple_questionnaire:
          type: boolean
        graph:
          type: object
          description: هيكل المخطط مع start_node وخريطة العقد.
        sections:
          type: array
          description: محتوى الاستبيان مجمّعاً في أقسام (مستمد من المخطط).
          items:
            type: object
        questionnaire_group_id:
          type: string
          format: uuid
          description: معرّف ثابت يجمع جميع إصدارات الاستبيان نفسه.
        version:
          type: integer
        status:
          type: string
          enum:
            - draft
            - published
        published_at:
          type: string
          format: date-time
          nullable: true
        is_editable:
          type: boolean
          description: >-
            تكون القيمة True عندما يكون من الممكن تعديل الاستبيان مباشرة في
            مكانه (إصدارات المسودة).
    SimpleQuestionnaireElement:
      type: object
      required:
        - element_type
        - label
      properties:
        id:
          type: string
          description: >-
            معرّف سؤال ثابت واختياري. إذا تم حذفه، تنشئ API المعرّفات `q1` و
            `q2` وما إلى ذلك. استخدم أحرفاً صغيرة وأرقاماً وشرطات سفلية لسهولة
            القراءة.
          example: source_of_funds
        element_type:
          type: string
          description: >-
            نوع السؤال. تقبل الـ API هذه القيم بالأحرف الصغيرة وما يعادلها
            بالأحرف الكبيرة.
          enum:
            - short_text
            - long_text
            - dropdown
            - single_choice
            - multiple_choice
            - number
            - image
            - file_upload
            - time
            - email
            - address
            - phone
            - country
            - date_picker
            - consent
            - section_header
            - separator
            - heading
            - paragraph
        label:
          type: object
          description: >-
            تسمية السؤال حسب رمز اللغة، على سبيل المثال `{ "en": "Source of
            funds" }`.
          additionalProperties:
            type: string
        description:
          type: object
          nullable: true
          additionalProperties:
            type: string
        placeholder:
          type: object
          nullable: true
          additionalProperties:
            type: string
        is_required:
          type: boolean
          default: false
        options:
          type: array
          description: >-
            يُستخدم مع `dropdown` و`single_choice` و`multiple_choice`. إذا تم
            حذف `value`، تنشئ واجهة API قيمة استناداً إلى تسمية الخيار.
          items:
            type: object
            required:
              - label
            properties:
              value:
                type: string
              label:
                type: object
                additionalProperties:
                  type: string
        max_files:
          type: integer
          minimum: 1
          maximum: 5
          description: يُستخدم مع `file_upload` أو `image`.
        validation:
          type: object
          nullable: true
          description: >-
            التحقق الاختياري من التنسيق لـ `short_text` أو `long_text` أو
            `number`. يُفرَض أثناء ملء المستخدم للحقل (لا يمكنه المتابعة حتى
            يجتازه) وتتم إعادة التحقق منه بواسطة API عند الإرسال.
          properties:
            pattern:
              type: string
              description: >-
                تعبير نمطي (مجموعة فرعية من ECMA-262) يجب أن تتطابق القيمة معه
                بالكامل. لـ `short_text` و`long_text`. لا تضف محددات البداية
                والنهاية ^/$؛ حيث تتم مطابقة القيمة بالكامل.
            min_length:
              type: integer
              minimum: 0
              description: الحد الأدنى لعدد الأحرف. لكل من `short_text` و`long_text`.
            max_length:
              type: integer
              minimum: 0
              description: الحد الأقصى لعدد الأحرف. خاص بـ `short_text` و`long_text`.
            min:
              type: number
              description: الحد الأدنى للقيمة الرقمية. لـ `number`.
            max:
              type: number
              description: الحد الأقصى للقيمة العددية. خاص بـ `number`.
            error_message:
              type: object
              description: رسالة مترجمة تظهر عند فشل التحقق، مفهرسة برمز اللغة.
              additionalProperties:
                type: string
  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.