> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# طلب موافقة الوكيل

> يسجل طلبًا لمراجعة بشرية مستقلة. لا ينفذ إجراء وكيل، أو يمنح أذونات، أو يوقف أو يستأنف تلقائيًا سير عمل Temporal.

يسجل طلبًا لمراجعة بشرية مستقلة. لا ينفذ إجراء وكيل، أو يمنح أذونات، أو يوقف أو يستأنف تلقائيًا سير عمل Temporal.

راجع [مراجعات الوكيل المستقل](https://docs.truthlocks.com/ar/guides/agent-approvals.md) لحدود التفويض والتنفيذ.


## OpenAPI

````yaml ar/maip-openapi.yaml POST /v1/approvals
openapi: 3.0.3
info:
  title: Truthlocks MAIP receipts and approvals
  version: 2.0.0
servers:
  - url: https://api.truthlocks.com
    description: الإنتاج
  - url: https://sandbox-api.truthlocks.com
    description: بيئة اختبار (Sandbox)
security:
  - apiKey: []
  - bearerAuth: []
paths:
  /v1/approvals:
    post:
      tags:
        - Agent approvals
      summary: طلب موافقة الوكيل
      description: >-
        يسجل طلبًا لمراجعة بشرية مستقلة. لا ينفذ إجراء وكيل، أو يمنح أذونات، أو
        يوقف أو يستأنف تلقائيًا سير عمل Temporal.
      operationId: maipApprovalsCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - agent_id
                - action
                - resource
                - scope
              properties:
                agent_id:
                  type: string
                  description: وكيل نشط وغير مخترق في بيئة مساحة العمل الموثقة هذه.
                action:
                  type: string
                  description: الإجراء المقصود؛ 1-200 بايت UTF-8. إنشاء طلب لا ينفذه.
                resource:
                  type: string
                  description: المورد الهدف المحدد؛ 1-2000 بايت UTF-8.
                scope:
                  type: string
                  description: الإذن المقصود؛ 1-200 بايت UTF-8. لا يمنح حق الوصول.
                justification:
                  type: string
                  description: >-
                    أدلة داعمة وغرض؛ بحد أقصى 4000 بايت UTF-8. لا تضمن أبدًا
                    الأسرار.
                risk_level:
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                    - critical
                  default: medium
                required_approvals:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 1
                  description: مراجعون بشريون معتمدون متميزون؛ المستلم مستبعد.
                ttl_minutes:
                  type: integer
                  minimum: 1
                  maximum: 10080
                  default: 60
      responses:
        '201':
          description: النتيجة المسجلة
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentApproval'
        '400':
          description: معرف غير صالح، حقول طلب، أو سبب قرار
        '401':
          description: المصادقة مطلوبة
        '403':
          description: >-
            نطاق مساحة عمل خاطئ، أو إذن مراجع حالي مفقود، أو مراجعة ذاتية، أو
            إلغاء غير مصرح به
        '404':
          description: الوكيل المطلوب أو النشط غير موجود في بيئة مساحة العمل هذه
        '409':
          description: تم اتخاذ القرار بالفعل، مراجع مكرر، أو طلب منتهي الصلاحية
components:
  schemas:
    AgentApproval:
      type: object
      required:
        - id
        - agent_id
        - status
        - requested_by
        - required_approvals
        - current_approvals
        - expires_at
        - decisions
      properties:
        id:
          type: string
          format: uuid
        tenant_id:
          type: string
          format: uuid
        agent_id:
          type: string
        action:
          type: string
        resource:
          type: string
        scope:
          type: string
        justification:
          type: string
        requested_by:
          type: string
          description: >-
            الطلب المصادق عليه: UUID للمستخدم البشري أو api_key:<stored key ID>؛
            ليس مراجعًا مقدمًا من المتصل أبدًا.
        decision_reason:
          type: string
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - expired
            - cancelled
        risk_level:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        decided_at:
          type: string
          format: date-time
        decided_by:
          type: string
          description: المراجع النهائي أو الطالب يلغي الطلب؛ غائب أثناء الانتظار.
        required_approvals:
          type: integer
          minimum: 1
          maximum: 10
        current_approvals:
          type: integer
          minimum: 0
          maximum: 10
        decisions:
          type: array
          description: >-
            مراجعات فردية غير قابلة للتغيير. تترك استجابة قائمة الانتظار هذا
            فارغًا؛ احصل على الطلب لسجل المراجعة الكامل الخاص به.
          items:
            type: object
            properties:
              reviewer_id:
                type: string
                format: uuid
              decision:
                type: string
                enum:
                  - approved
                  - rejected
              reason:
                type: string
              created_at:
                type: string
                format: date-time
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      type: http
      scheme: bearer

````

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