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

# إنشاء دعوة

> إنشاء دعوة للحساب

<script src="/locale-bridge.js" />


## OpenAPI

````yaml /openapi.ar.json POST /v1/public/accounts/{account_id}/auth/invitations
openapi: 3.1.0
info:
  title: Code API (Public)
  version: 1.0.0
servers:
  - url: https://api.hybridbox.io
security: []
paths:
  /v1/public/accounts/{account_id}/auth/invitations:
    post:
      tags:
        - public-accounts
        - public-account-auth
      summary: إنشاء دعوة للحساب
      description: ينشئ دعوة ضمن نطاق الحساب.
      operationId: >-
        create_public_account_invitation_v1_public_accounts__account_id__auth_invitations_post
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InviteResponse'
                  - $ref: '#/components/schemas/MaterializedInvitationAccessResponse'
                title: >-
                  Response Create Public Account Invitation V1 Public Accounts 
                  Account Id  Auth Invitations Post
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: خطأ في التحقق
      security:
        - PublicBearerAuth: []
components:
  schemas:
    InviteRequest:
      description: مخطط الطلب لإنشاء دعوة مستخدم جديد.
      properties:
        assignments:
          items:
            $ref: '#/components/schemas/InvitationAssignmentRequest'
          minItems: 1
          title: تعيينات
          type: array
        email:
          description: عنوان البريد الإلكتروني الهدف
          title: البريد الإلكتروني
          type: string
        locale:
          anyOf:
            - type: string
            - type: 'null'
          description: إعداد لغة اختياري لبريد الدعوة الإجرائي
          title: اللغة
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: ملحوظة
      required:
        - email
        - assignments
      title: InviteRequest
      type: object
    InviteResponse:
      properties:
        accepted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: وقت القبول
        accepted_subject_id:
          anyOf:
            - type: string
            - type: 'null'
          title: معرّف الموضوع المقبول
        assignments:
          items:
            $ref: '#/components/schemas/InvitationAssignmentResponse'
          title: تعيينات
          type: array
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: تاريخ الإنشاء
        email:
          title: البريد الإلكتروني
          type: string
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: تنتهي وقت
        id:
          format: uuid
          title: المعرّف
          type: string
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: ملحوظة
        permission_context:
          $ref: '#/components/schemas/PermissionInspectabilitySnapshot'
        status:
          title: الحالة
          type: string
      required:
        - id
        - email
        - status
        - assignments
        - permission_context
      title: InviteResponse
      type: object
    MaterializedInvitationAccessResponse:
      properties:
        accepted_subject_id:
          title: معرّف الموضوع المقبول
          type: string
        assignment_count:
          title: عدد التعيينات
          type: integer
        email:
          title: البريد الإلكتروني
          type: string
        grant_count:
          title: عدد المنح
          type: integer
        group_membership_count:
          title: عدد عضويات المجموعة
          type: integer
        mode:
          default: materialized
          title: وضع
          type: string
        permission_context:
          $ref: '#/components/schemas/PermissionInspectabilitySnapshot'
        role_assignment_count:
          title: عدد تعيينات الدور
          type: integer
        status:
          default: accepted
          title: الحالة
          type: string
      required:
        - email
        - accepted_subject_id
        - assignment_count
        - group_membership_count
        - grant_count
        - role_assignment_count
        - permission_context
      title: MaterializedInvitationAccessResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: التفاصيل
          type: array
      title: HTTPخطأ تحقق
      type: object
    InvitationAssignmentRequest:
      description: مخطط لتعيين إذن واحد ضمن دعوة.
      properties:
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          title: مفتاح الإمكانية
        grant_kind:
          anyOf:
            - $ref: '#/components/schemas/GrantKind'
            - type: 'null'
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: معرّف المجموعة
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: معرّف المورد
        resource_type:
          anyOf:
            - $ref: '#/components/schemas/ResourceType'
            - type: 'null'
        role_key:
          anyOf:
            - type: string
            - type: 'null'
          title: مفتاح الدور
      title: InvitationAssignmentRequest
      type: object
    InvitationAssignmentResponse:
      description: مخطط لتعيين إذن واحد ضمن استجابة الدعوة.
      properties:
        assignment_kind:
          title: نوع التعيين
          type: string
        capability_key:
          anyOf:
            - type: string
            - type: 'null'
          title: مفتاح الإمكانية
        grant_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: نوع المنح
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: معرّف المجموعة
        id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: المعرّف
        position:
          title: موضع
          type: integer
        resource_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: معرّف المورد
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: نوع المورد
        role_key:
          anyOf:
            - type: string
            - type: 'null'
          title: مفتاح الدور
      required:
        - assignment_kind
        - position
      title: InvitationAssignmentResponse
      type: object
    PermissionInspectabilitySnapshot:
      description: لقطة مشتركة لإمكانية الفحص لإدارة المستخدمين والمجموعة والدعوات.
      properties:
        assigned_bundle_keys:
          items:
            type: string
          title: مفاتيح الحزم المعيّنة
          type: array
        direct_capability_keys:
          items:
            type: string
          title: مفاتيح الإمكانيات المباشرة
          type: array
        owner_assignments:
          items:
            $ref: '#/components/schemas/OwnerAssignmentSnapshot'
          title: تعيينات المالك
          type: array
        resolved_capability_keys:
          items:
            type: string
          title: مفاتيح الإمكانيات المحلولة
          type: array
        status:
          default: active
          title: الحالة
          type: string
        subject_id:
          default: ''
          title: معرّف الموضوع
          type: string
        subject_type:
          default: unknown
          title: نوع الموضوع
          type: string
      title: PermissionInspectabilitySnapshot
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: الموقع
          type: array
        msg:
          title: الرسالة
          type: string
        type:
          title: نوع الخطأ
          type: string
      required:
        - loc
        - msg
        - type
      title: خطأ تحقق
      type: object
    GrantKind:
      description: أنواع منح التفويض.
      enum:
        - capability
        - account_owner
        - super_admin
      title: GrantKind
      type: string
    ResourceType:
      description: أنواع مورد التفويض ونطاقه.
      enum:
        - client
        - account
        - workspace
        - domain
        - dns_record
        - mailbox
        - redirect
        - forwarding
        - credential
        - tenant
        - route
        - proxy
      title: ResourceType
      type: string
    OwnerAssignmentSnapshot:
      description: مخطط يشير إلى علاقة مالك الحساب.
      properties:
        account_id:
          format: uuid
          title: معرف الحساب
          type: string
      required:
        - account_id
      title: OwnerAssignmentSnapshot
      type: object
  securitySchemes:
    PublicBearerAuth:
      bearerFormat: JWT or Hybridbox Service account token
      description: >-
        Public API bearer credential sent as `Authorization: Bearer <token>`.
        Use either an OAuth access token or a Hybridbox Service account token.
      scheme: bearer
      type: http

````