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

> أنشئ قالب حالة في Didit: طريقة التعيين، والتصعيد، والتحويل، وإقران المراجِعين بمبدأ العينين، وملاحظة الحل المطلوبة، والأقسام الستة لمحتوى الحالة.



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



      
      

\<pre>

\`Create a case blueprint through the Management API.

Endpoint:
POST https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/

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

Request body:
\{
"name": "AML investigation",                    // required, max 24 chars
"description": "...",                            // optional
"assignee_pool": ["<user-uuid>"],                 // required, at least 1 - "Pick at least one assignee" otherwise
"assignment_method": "AUTOMATIC",                 // optional, MANUAL|AUTOMATIC, default MANUAL
"max_active_cases": 15,                           // optional - AUTOMATIC threshold
"escalation_enabled": false,                      // optional
"escalation_blueprint": "<blueprint-uuid>",       // optional - set it alongside escalation_enabled; the escalate action fails with 400 until both are set
"transfer_enabled": false,                        // optional
"four_eyes_checker_blueprint": "<blueprint-uuid>", // optional - setting this enables 4-eyes
"require_resolution_note": true,                  // optional
"content_config": {"aml_control": {"enabled": true, "financial": true}},  // optional, six sections
"is_active": true                                 // optional, default true
}

content_config sections: checklist (enabled, optional, items[]), aml_control (enabled, financial, identity), identity (enabled, personal_information, applicant_tags, contact_information, risk_overview, poi_documents, poa_documents), verifications (enabled, summary), reporting (enabled, fiu_reports), financial (enabled, payment_methods, transactions). Unknown sections/keys are rejected with 400.

Example call:
curl -X POST "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "AML investigation", "assignee_pool": ["<uuid>"]}'

Response 201: CaseBlueprintDetail.

Failure modes:
\- 400 - name over 24 chars, empty assignee_pool, unknown content_config key, or escalation_blueprint/four_eyes_checker_blueprint not found in this application or self-referencing.
\- 401/403 - auth/permission errors (requires write:cases).

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

\</pre>



      
      

الصق في

أنشئ مخططًا. يخضع `content_config` للتحقق الصارم، فلا يُقبل إلا الأقسام الستة المعروفة ومفاتيحها الموثقة. لذلك يؤدي الخطأ المطبعي إلى إرجاع خطأ 400 بدلاً من تجاهله بصمت.## ذات صلة- [سرد مخططات الحالات](https://docs.didit.me/ar/management-api/case-blueprints/list.md)
- [تثبيت الإعدادات المسبقة لمخططات الحالات](https://docs.didit.me/ar/management-api/case-blueprints/install-presets.md)
- [مخططات الحالات (Console)](https://docs.didit.me/ar/console/case-management/blueprints.md)


## OpenAPI

````yaml ar/openapi-25.json POST /v3/organization/{organization_id}/application/{application_id}/cases/blueprints/
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/organization/{organization_id}/application/{application_id}/cases/blueprints/:
    post:
      tags:
        - Case Blueprints
      summary: إنشاء مخطط
      description: >-
        أنشئ مخططاً لحالة: الإعدادات العامة (التعيين، التصعيد، النقل، المراجعة
        بأربعة أعين) بالإضافة إلى content_config، وهي الأقسام الستة التي تدير
        صفحة الحالة. عيّن publish=false لإنشاء مسودة غير منشورة؛ ويؤدي النشر إلى
        إنشاء أول إصدار فعّال لها. يؤدي تجاهل مسودة لم تُنشر مطلقاً إلى حذفها.
      operationId: create_case_blueprint
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID الخاص بالمؤسسة.
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: معرّف UUID للتطبيق.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - assignee_pool
              properties:
                name:
                  type: string
                  maxLength: 24
                  description: بحد أقصى 24 حرفاً، على سبيل المثال "تحقيق AML".
                description:
                  type: string
                  nullable: true
                assignee_pool:
                  type: array
                  items:
                    type: string
                    format: uuid
                  minItems: 1
                  description: >-
                    قائمة بمعرّفات UUID للمستخدمين. يتم رفض المصفوفات الفارغة
                    بالرسالة "Pick at least one assignee".
                assignment_method:
                  type: string
                  enum:
                    - MANUAL
                    - AUTOMATIC
                  default: MANUAL
                max_active_cases:
                  type: integer
                  nullable: true
                  minimum: 1
                  description: >-
                    حد الوضع التلقائي: "أقل من N من الحالات المسندة لهذا
                    المخطط".
                escalation_enabled:
                  type: boolean
                  default: false
                escalation_blueprint:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    معرّف UUID للمخطط المستهدف. لا يُفرض ذلك عند الحفظ، ولكن
                    إجراء التصعيد سيفشل بالرمز 400 حتى يتم تعيين كل من
                    escalation_enabled وescalation_blueprint.
                transfer_enabled:
                  type: boolean
                  default: false
                four_eyes_checker_blueprint:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    يؤدي ضبط هذا الخيار إلى تمكين مراجعة بأربعة أعين: تُوضَع
                    القرارات الخاصة بهذا المخطط في قائمة انتظار مخطط المدقِّق.
                require_resolution_note:
                  type: boolean
                  default: false
                content_config:
                  $ref: '#/components/schemas/CaseContentConfig'
                is_active:
                  type: boolean
                  default: true
                default_deadline_hours:
                  type: integer
                  nullable: true
                  minimum: 1
                  maximum: 8760
                  description: >-
                    الموعد النهائي الافتراضي للحالات المفتوحة حديثاً. المواعيد
                    النهائية للحالات الحالية تظل دون تغيير.
                publish:
                  type: boolean
                  writeOnly: true
                  default: true
                  description: >-
                    عَيِّن القيمة إلى false لحفظ مسودة لم تُنشر من قبل. يظل
                    السجل غير نشط في الإصدار 0 حتى يتم نشر المسودة صراحةً. يؤدي
                    إغفال هذا الحقل إلى الحفاظ على الإنشاء الفوري لعمليات
                    التكامل الحالية.
            example:
              name: AML investigation
              assignee_pool:
                - 9a000000-0000-4000-8000-0000000000aa
              assignment_method: AUTOMATIC
              max_active_cases: 15
              require_resolution_note: true
              content_config:
                aml_control:
                  enabled: true
                  financial: true
                  identity: false
      responses:
        '201':
          description: تم إنشاء المخطط الأولي (Blueprint).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseBlueprintDetail'
        '400':
          description: >-
            الاسم يتجاوز 24 حرفاً، أو assignee_pool فارغ، أو لم يتم العثور على
            مخطط مرجعي متداخل (التصعيد/الفاحص).
          content:
            application/json:
              schema:
                type: object
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name": "AML investigation", "assignee_pool": ["9a000000-0000-4000-8000-0000000000aa"], "assignment_method": "AUTOMATIC", "max_active_cases": 15, "require_resolution_note": true, "content_config": {"aml_control": {"enabled": true, "financial": true, "identity": false}}}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            client = Didit()

            result = client.cases.blueprints.create(
                name="AML investigation",
                assignee_pool=["9a000000-0000-4000-8000-0000000000aa"],
                assignment_method="AUTOMATIC",
                max_active_cases=15,
                require_resolution_note=True,
                content_config={
                    "aml_control": {
                        "enabled": True,
                        "financial": True,
                        "identity": False,
                    },
                },
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            // and DIDIT_APPLICATION_ID.
            const didit = new Didit();

            const result = await didit.cases.blueprints.create({
              name: "AML investigation",
              assignee_pool: ["9a000000-0000-4000-8000-0000000000aa"],
              assignment_method: "AUTOMATIC",
              max_active_cases: 15,
              require_resolution_note: true,
              content_config: {
                aml_control: {
                  enabled: true,
                  financial: true,
                  identity: false,
                },
              },
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Create(ctx, didit.CasesBlueprintsCreateParams{\n\tName:                  \"AML investigation\",\n\tAssigneePool:          []string{\"9a000000-0000-4000-8000-0000000000aa\"},\n\tAssignmentMethod:      didit.Some(didit.CasesBlueprintsCreateParamsAssignmentMethod(\"AUTOMATIC\")),\n\tMaxActiveCases:        didit.Int(15),\n\tRequireResolutionNote: didit.Bool(true),\n\tContentConfig: didit.Some(didit.CaseContentConfigParam{\n\t\tAMLControl: didit.Some(didit.CaseContentConfigParamAMLControl{\n\t\t\tEnabled:   didit.Bool(true),\n\t\t\tFinancial: didit.Bool(true),\n\t\t\tIdentity:  didit.Bool(false),\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 me.didit.Didit;

            import me.didit.types.CaseContentConfig;

            import me.didit.types.CasesBlueprintsCreateParams;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            Didit client = new Didit();


            var result =
            client.cases().blueprints().create(CasesBlueprintsCreateParams.builder()
                    .name("AML investigation")
                    .assigneePool(List.of("9a000000-0000-4000-8000-0000000000aa"))
                    .assignmentMethod(CasesBlueprintsCreateParams.AssignmentMethod.of("AUTOMATIC"))
                    .maxActiveCases(15L)
                    .requireResolutionNote(true)
                    .contentConfig(CaseContentConfig.builder()
                            .amlControl(CaseContentConfig.AmlControl.builder()
                                    .enabled(true)
                                    .financial(true)
                                    .identity(false)
                                    .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_ORGANIZATION_ID
            // and DIDIT_APPLICATION_ID.
            $didit = new DiditClient();

            $result = $didit->cases->blueprints->create([
                'name' => 'AML investigation',
                'assignee_pool' => ['9a000000-0000-4000-8000-0000000000aa'],
                'assignment_method' => 'AUTOMATIC',
                'max_active_cases' => 15,
                'require_resolution_note' => true,
                'content_config' => [
                    'aml_control' => [
                        'enabled' => true,
                        'financial' => true,
                        'identity' => false,
                    ],
                ],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            didit = Didit::Client.new

            result = didit.cases.blueprints.create(
              name: "AML investigation",
              assignee_pool: ["9a000000-0000-4000-8000-0000000000aa"],
              assignment_method: "AUTOMATIC",
              max_active_cases: 15,
              require_resolution_note: true,
              content_config: {
                aml_control: {
                  enabled: true,
                  financial: true,
                  identity: false,
                },
              }
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            using var client = new DiditClient();


            var result = await client.Cases.Blueprints.CreateAsync(new
            CasesBlueprintsCreateParams

            {
                Name = "AML investigation",
                AssigneePool = new string[] { "9a000000-0000-4000-8000-0000000000aa" },
                AssignmentMethod = new CasesBlueprintsCreateParamsAssignmentMethod("AUTOMATIC"),
                MaxActiveCases = 15,
                RequireResolutionNote = true,
                ContentConfig = new CaseContentConfig
                {
                    AmlControl = new CaseContentConfigAmlControl
                    {
                        Enabled = true,
                        Financial = true,
                        Identity = false,
                    },
                },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    CaseContentConfig:
      type: object
      description: >-
        الأقسام الستة القابلة للتبديل التي تحدد علامات التبويب والحقول التي تظهر
        في صفحة الحالة. يتم رفض الأقسام أو المفاتيح غير المعروفة.
      properties:
        checklist:
          type: object
          properties:
            enabled:
              type: boolean
            optional:
              type: boolean
              description: >-
                عند التعيين على true، يمكن حل الحالة مع وجود عناصر غير مكتملة في
                قائمة التحقق.
            items:
              type: array
              items:
                type: object
                properties:
                  label:
                    type: string
                    maxLength: 255
                  order:
                    type: integer
        aml_control:
          type: object
          properties:
            enabled:
              type: boolean
            financial:
              type: boolean
            identity:
              type: boolean
        identity:
          type: object
          properties:
            enabled:
              type: boolean
            personal_information:
              type: boolean
            applicant_tags:
              type: boolean
            contact_information:
              type: boolean
            risk_overview:
              type: boolean
            poi_documents:
              type: boolean
            poa_documents:
              type: boolean
        verifications:
          type: object
          properties:
            enabled:
              type: boolean
            summary:
              type: boolean
        reporting:
          type: object
          properties:
            enabled:
              type: boolean
            fiu_reports:
              type: boolean
        financial:
          type: object
          properties:
            enabled:
              type: boolean
            payment_methods:
              type: boolean
            transactions:
              type: boolean
    CaseBlueprintDetail:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 24
        description:
          type: string
          nullable: true
        assignment_method:
          type: string
          enum:
            - MANUAL
            - AUTOMATIC
        assignee_pool:
          type: array
          items:
            type: string
            format: uuid
        max_active_cases:
          type: integer
          nullable: true
        escalation_enabled:
          type: boolean
        transfer_enabled:
          type: boolean
        require_resolution_note:
          type: boolean
        is_active:
          type: boolean
        preset_key:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        escalation_blueprint:
          type: string
          format: uuid
          nullable: true
        escalation_blueprint_name:
          type: string
          nullable: true
        four_eyes_checker_blueprint:
          type: string
          format: uuid
          nullable: true
        four_eyes_checker_blueprint_name:
          type: string
          nullable: true
        content_config:
          type: object
          description: >-
            الأقسام الستة القابلة للتبديل التي تحدد علامات التبويب والحقول التي
            تظهر في صفحة الحالة. يتم رفض الأقسام أو المفاتيح غير المعروفة.
          properties:
            checklist:
              type: object
              properties:
                enabled:
                  type: boolean
                optional:
                  type: boolean
                  description: >-
                    عند التعيين على true، يمكن حل الحالة مع وجود عناصر غير
                    مكتملة في قائمة التحقق.
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      label:
                        type: string
                        maxLength: 255
                      order:
                        type: integer
            aml_control:
              type: object
              properties:
                enabled:
                  type: boolean
                financial:
                  type: boolean
                identity:
                  type: boolean
            identity:
              type: object
              properties:
                enabled:
                  type: boolean
                personal_information:
                  type: boolean
                applicant_tags:
                  type: boolean
                contact_information:
                  type: boolean
                risk_overview:
                  type: boolean
                poi_documents:
                  type: boolean
                poa_documents:
                  type: boolean
            verifications:
              type: object
              properties:
                enabled:
                  type: boolean
                summary:
                  type: boolean
            reporting:
              type: object
              properties:
                enabled:
                  type: boolean
                fiu_reports:
                  type: boolean
            financial:
              type: object
              properties:
                enabled:
                  type: boolean
                payment_methods:
                  type: boolean
                transactions:
                  type: boolean
        creation_sources:
          type: array
          description: الموصلات التي توجّه حالياً حالات جديدة إلى هذا المخطط.
          items:
            type: object
            properties:
              kind:
                type: string
                enum:
                  - aml
                  - rule
                  - workflow
              id:
                type: string
              name:
                type: string
        receives_escalation_from:
          type: array
          description: المخططات الأخرى التي يشير هدف التصعيد الخاص بها إلى هذا المخطط.
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
        updated_at:
          type: string
          format: date-time
        version:
          type: integer
          readOnly: true
        default_deadline_hours:
          type: integer
          nullable: true
          minimum: 1
          maximum: 8760
  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.