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

> أرسل ملاحظة مراجعة يدوية أو تغيير حالة إلى جلسة تحقق في Didit. مراجعة امتثال برمجية وسجل تدقيق، بالدفع لكل استدعاء.



إنشاء موجّه لمراجعة الجلسة
        نسخ الموجّه إلى الحافظة



      
      

\<pre>

\``Goal: Push a manual decision (Approve / Decline / mark In Review) onto a Didit verification session and write an immutable audit-trail row. Programmatic equivalent of the Console manual-review buttons.

Endpoint: POST https://verification.didit.me/v3/sessions/{session_id}/reviews/
Auth header: x-api-key: YOUR_API_KEY
Content-Type: application/json

Path param:
\- session_id (UUID, REQUIRED) — verification session UUID. Must belong to the same application as the API key (cross-application writes return 404).

Request body:
\- new_status (string, REQUIRED) — one of "Approved" | "Declined" | "In Review". Workflow-internal statuses ("In Progress", "Awaiting User", "Resubmitted", "Expired", "Kyc Expired", "Abandoned", "Not Started") are NOT accepted (400).
\- comment (string, optional, max 10,000 chars) — reviewer rationale. Supports @email mentions which trigger Console notifications.

curl:
curl -s -X POST 'https://verification.didit.me/v3/sessions/8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d/reviews/' \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"new_status": "Approved", "comment": "POA cross-checked against utility bill; matches address on file."}'

Response 201 (compact ReviewSerializer shape — different from the GET response):
\{
"user": "API Client",                       // actor display label
"new_status": "Approved",
"comment": "POA cross-checked...",
"created_at": "2026-04-21T16:42:50.445Z"
}
To fetch the full activity row (uuid, activity_type, previous_status, ...) call GET /v3/sessions/{session_id}/reviews/ afterwards. See /reference/data-models for the full ReviewItem shape.

Side effects:
1\. Inserts a Review row with activity_type=STATUS_UPDATED, actor_type=API_KEY.
2\. Updates Session.status to new_status if it differs from the current status.
3\. Fires the status.updated webhook on configured destinations (see /integration/webhooks).
4\. Notifies previous reviewers and @email-mentioned Console users.
NOT idempotent — every call writes a new audit row. Re-posting the same new_status when it equals the current status is a no-op for Session.status but still writes an audit entry.

Failure modes (envelope {"detail": "..."} unless noted):
\- 400 — { "new_status": ["\\"Expired\\" is not a valid choice."] } (or missing new_status)
\- 401 — missing/invalid `x-api-key` header.
\- 403 — API key valid but wrong app or revoked.
\- 404 — session UUID not found / deleted / wrong app.
\- 429 — rate-limited.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.``

\</pre>



      
      

الصق في



## OpenAPI

````yaml ar/openapi-25.json POST /v3/sessions/{session_id}/reviews/
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/sessions/{session_id}/reviews/:
    post:
      tags:
        - Sessions
      summary: إضافة ملاحظة مراجعة إلى سجل التدقيق للجلسة
      description: >-
        إلحاق ملاحظة بموجز المراجعة / النشاط الخاص بجلسة التحقق من المستخدمين
        (KYC). **تسجل نقطة النهاية هذه إدخالاً فقط — ولا تغيّر الجلسة بأي حال.**
        تبقى `status` الجلسة دون تغيير، ولا يتم تشغيل أي تحقق من صحة انتقال
        الحالة، ولا يتم إطلاق أي webhook. للموافقة الفعلية على جلسة أو رفضها أو
        إعادة فتحها (وهو ما يكتب أيضاً إدخال `STATUS_UPDATED` منسوباً بالكامل
        إلى هذا الموجز)، استخدم `PATCH /v3/session/{session_id}/update-status/`
        بدلاً من ذلك.


        كلا حقلي النص اختياريان ويُقبل كائن JSON فارغ. يتم تخزين `new_status`
        فقط كتسمية على الإدخال ويقبل أياً من قيم حالات الجلسة العشر (حساس لحالة
        الأحرف). يتم تخزين إشارات `@email` داخل `comment` كنص عادي فقط — ولا
        تؤدي إلى إطلاق أي إشعارات على نقطة النهاية هذه، ويظل `mentioned_emails`
        للإدخال فارغاً.


        ملاحظة حول الإسناد: الإدخالات المنشأة هنا لا تحمل أي معلومات عن الفاعل.
        تظهر في الموجز كالتالي: `actor_display: "Unknown"`، و`actor_type:
        "CONSOLE_USER"`، و`activity_type: "STATUS_UPDATED"` (القيم الافتراضية
        للتخزين)، وحقل `user` في نص استجابة `201` هو `"Unknown"`.
      operationId: create_session_review
      parameters:
        - name: Content-Type
          in: header
          required: false
          description: يُضبط على `application/json` عند إرسال نص طلب بتنسيق JSON.
          schema:
            type: string
            example: application/json
        - name: session_id
          in: path
          required: true
          description: >-
            معرّف UUID لجلسة التحقق من المستخدمين (KYC). يجب أن تنتمي إلى
            التطبيق نفسه الخاص بمفتاح API — تُرجع معرّفات UUID من تطبيقات أخرى
            والجلسات المحذوفة ومعرّفات جلسات التحقق من الشركات (KYB) الرمز
            `404`.
          schema:
            type: string
            format: uuid
            example: 8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                new_status:
                  type: string
                  nullable: true
                  enum:
                    - Not Started
                    - In Progress
                    - Approved
                    - Declined
                    - In Review
                    - Expired
                    - Abandoned
                    - Kyc Expired
                    - Resubmitted
                    - Awaiting User
                  description: >-
                    تسمية حالة اختيارية لتسجيلها في المدخل. تقبل أي قيمة لحالة
                    الجلسة، وهي حساسة لحالة الأحرف (يتم رفض `"approved"` برمز
                    `400`). تسجيل حالة هنا **لا** يغير الحالة الفعلية للجلسة —
                    استخدم endpoint تحديث الحالة لذلك.
                  example: In Review
                comment:
                  type: string
                  nullable: true
                  description: >-
                    ملاحظة اختيارية بنص حر (بدون حد مفروض للطول). يتم تخزينها
                    حرفياً؛ لا تتم معالجة إشارات `@email` على هذا الـ endpoint.
                  example: Flagging for manual document re-check.
            examples:
              NoteWithStatusLabel:
                summary: ملاحظة تحمل تصنيف حالة (حالة الجلسة لم تتغير)
                value:
                  new_status: In Review
                  comment: Flagging for manual document re-check.
              CommentOnly:
                summary: ملاحظة نصية بدون تسمية حالة
                value:
                  comment: Customer emailed an updated utility bill; awaiting upload.
      responses:
        '201':
          description: >-
            مُدخل مسجل في مسار التدقيق الخاص بالجلسة. تظل الجلسة نفسها دون تغيير
            — وتحتفظ `status` بقيمتها السابقة ولا يتم إرسال أي webhook. يظهر
            المُدخل الجديد أيضاً في أعلى `GET …/reviews/` (مع `actor_display:
            "Unknown"`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: string
                    description: >-
                      اسم العرض لمؤلف الإدخال. دائماً `"Unknown"` للإدخالات التي
                      تم إنشاؤها عبر هذا الـ endpoint، لأنه لا يسجل إسناد
                      الإدخال إلى فاعل.
                    example: Unknown
                  new_status:
                    type: string
                    nullable: true
                    enum:
                      - Not Started
                      - In Progress
                      - Approved
                      - Declined
                      - In Review
                      - Expired
                      - Abandoned
                      - Kyc Expired
                      - Resubmitted
                      - Awaiting User
                    description: >-
                      تسمية الحالة المسجلة في المدخل، أو `null` إذا لم يتم إرسال
                      أي منها. لا تتأثر الحالة الفعلية للجلسة.
                    example: In Review
                  comment:
                    type: string
                    nullable: true
                    description: >-
                      الملاحظة المسجّلة على المدخلة، أو `null` إذا لم يتم إرسال
                      أي ملاحظة.
                    example: Flagging for manual document re-check.
                  created_at:
                    type: string
                    format: date-time
                    description: وقت كتابة المُدخل، بتنسيق ISO 8601 UTC.
                    example: '2026-06-12T00:18:44.466537Z'
              examples:
                NoteWithStatusLabel:
                  summary: ملاحظة مع تصنيف حالة
                  value:
                    user: Unknown
                    new_status: In Review
                    comment: Flagging for manual document re-check.
                    created_at: '2026-06-12T00:18:44.466537Z'
                CommentOnly:
                  summary: ملاحظة نصية
                  value:
                    user: Unknown
                    new_status: null
                    comment: Note without status.
                    created_at: '2026-06-12T00:18:44.504157Z'
        '400':
          description: >-
            خطأ في التحقق، يتم إرجاعه كخريطة رسائل لكل حقل. السبب المعتاد هو أن
            قيمة `new_status` ليست واحدة من الحالات العشر المسموح بها — الفحص
            حساس لحالة الأحرف.
          content:
            application/json:
              schema:
                type: object
                properties:
                  new_status:
                    type: array
                    items:
                      type: string
                    example:
                      - '"approved" is not a valid choice.'
              examples:
                InvalidStatusChoice:
                  summary: قيمة حالة بأحرف صغيرة / غير معروفة
                  value:
                    new_status:
                      - '"approved" is not a valid choice.'
        '403':
          description: >-
            رمز `x-api-key` مفقود أو مشوه أو منتهي الصلاحية أو ملغى. يتم التحقق
            من المصادقة قبل البحث عن الجلسة، لذلك يعيد المفتاح المفقود `403` حتى
            في حال عدم وجود UUID للجلسة.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: You do not have permission to perform this action.
              examples:
                InvalidKey:
                  summary: رأس x-api-key مفقود أو غير صالح
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            لا توجد جلسة تحقق من المستخدمين (KYC) بهذا الـ UUID مرئية لتطبيقك:
            إما أن الـ UUID غير موجود، أو تم حذف الجلسة، أو أنها تنتمي إلى تطبيق
            مختلف. كما تُرجع معرّفات جلسات التحقق من الشركات (KYB) رمز `404` هنا
            — موجز المراجعات مخصص لجلسات KYC فقط.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Session not found.
              examples:
                NotFound:
                  summary: ‏UUID لجلسة غير معروف، أو محذوف، أو تابع لتطبيق آخر
                  value:
                    detail: Session not found.
        '429':
          description: >-
            تم تجاوز حد المعدل. تحقق من رؤوس الاستجابة `Retry-After`
            و`X-RateLimit-*`. راجع [تحديد
            المعدل](/ar/integration/rate-limiting).
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            # Records an audit-trail note only -- the session's status does NOT
            change.

            curl -s -X POST
            https://verification.didit.me/v3/sessions/8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d/reviews/
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "new_status": "In Review",
                "comment": "Flagging for manual document re-check."
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.reviews.create(
                "8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d",
                new_status="In Review",
                comment="Flagging for manual document re-check.",
            )
            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.reviews.create("8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d",
            {
              new_status: "In Review",
              comment: "Flagging for manual document re-check.",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Reviews.Create(ctx, \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", didit.SessionsReviewsCreateParams{\n\tNewStatus: didit.Some(didit.SessionsReviewsCreateParamsNewStatus(\"In Review\")),\n\tComment:   didit.String(\"Flagging for manual document re-check.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.SessionsReviewsCreateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().reviews().create("8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d",
            SessionsReviewsCreateParams.builder()
                    .newStatus(SessionsReviewsCreateParams.NewStatus.of("In Review"))
                    .comment("Flagging for manual document re-check.")
                    .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->sessions->reviews->create('8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d',
            [
                'new_status' => 'In Review',
                'comment' => 'Flagging for manual document re-check.',
            ]);

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

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

            result = didit.sessions.reviews.create(
              "8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d",
              new_status: "In Review",
              comment: "Flagging for manual document re-check."
            )
            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.Reviews.CreateAsync("8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d",
            new SessionsReviewsCreateParams

            {
                NewStatus = new SessionsReviewsCreateParamsNewStatus("In Review"),
                Comment = "Flagging for manual document re-check.",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        مفتاح API الخاص بتطبيقك، من Developers -> API keys في Business Console.
        يمتلك المفتاح الأساسي وصولاً كاملاً. يمكن تحديد نطاق المفتاح المسمى: لا
        شيء، أو قراءة، أو كتابة لكل مورد، ومحدوداً ببعض مسارات العمل أو بالجلسات
        المقبولة، وبقائمة من عناوين IP، وبتاريخ انتهاء الصلاحية. يشير 401 إلى أن
        المفتاح غير صحيح أو ملغى أو منتهي الصلاحية؛ ويشير 403 إلى أنه لم يتم
        إرسال أي مفتاح، أو أن المفتاح ليس لديه حق الوصول إلى هذا المورد أو
        الإجراء، أو أن الطلب جاء من عنوان خارج قائمة عناوين IP الخاصة به؛ ويشير
        404 في مسار جلسة إلى أن الجلسة خارج مسارات العمل أو الحالات الخاصة
        بالمفتاح. يتلقى المفتاح الذي لا يمتلك حق الوصول إلى الوسائط عناوين URL
        للصور ومقاطع الفيديو وملفات PDF كـ null، ويتلقى المفتاح الذي لا يمتلك
        إذن كتابة للجلسات روابط الجلسة وtoken كـ null. راجع
        https://docs.didit.me/console/api-keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.