> ## 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}/mailboxes/bulk
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}/mailboxes/bulk:
    post:
      tags:
        - public-accounts
        - public-mailboxes
      summary: إنشاء صناديق بريد دفعة واحدة
      description: ينشئ صناديق بريد دفعة واحدة دون إرجاع كلمات المرور.
      operationId: >-
        bulk_create_public_mailboxes_v1_public_accounts__account_id__mailboxes_bulk_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/MailboxBulkCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MailboxBulkCreateResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: خطأ في التحقق
      security:
        - PublicBearerAuth: []
components:
  schemas:
    MailboxBulkCreateRequest:
      additionalProperties: false
      description: متن طلب إنشاء صناديق بريد دفعة واحدة.
      properties:
        domain:
          description: UUID النطاق أو اسم النطاق لعلب البريد
          title: النطاق
          type: string
        items:
          items:
            $ref: '#/components/schemas/MailboxBulkCreateItem'
          minItems: 1
          title: العناصر
          type: array
      required:
        - domain
        - items
      title: MailboxBulkCreateRequest
      type: object
    MailboxBulkCreateResponse:
      properties:
        created:
          items:
            $ref: '#/components/schemas/MailboxBulkCreatedItem'
          title: تم الإنشاء
          type: array
        failed:
          items:
            $ref: '#/components/schemas/MailboxBulkFailedItem'
          title: فشل
          type: array
      required:
        - created
        - failed
      title: MailboxBulkCreateResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: التفاصيل
          type: array
      title: HTTPخطأ تحقق
      type: object
    MailboxBulkCreateItem:
      additionalProperties: false
      description: عنصر متن طلب لإنشاء صناديق بريد دفعة واحدة.
      properties:
        first_name:
          title: الاسم الأول
          type: string
        last_name:
          title: اسم العائلة
          type: string
        local_part:
          title: الجزء المحلي
          type: string
      required:
        - local_part
        - first_name
        - last_name
      title: MailboxBulkCreateItem
      type: object
    MailboxBulkCreatedItem:
      description: نتيجة إنشاء صندوق بريد دفعة واحدة ناجحة.
      properties:
        index:
          title: الفهرس
          type: integer
        mailbox:
          $ref: '#/components/schemas/MailboxDTO'
      required:
        - index
        - mailbox
      title: MailboxBulkCreatedItem
      type: object
    MailboxBulkFailedItem:
      description: نتيجة إنشاء صندوق بريد دفعة واحدة فاشلة.
      properties:
        code:
          title: الرمز
          type: string
        index:
          title: الفهرس
          type: integer
        message:
          title: الرسالة
          type: string
      required:
        - index
        - code
        - message
      title: MailboxBulkFailedItem
      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
    MailboxDTO:
      properties:
        aliases:
          description: الأسماء المستعارة لصندوق البريد
          items:
            $ref: '#/components/schemas/MailboxAliasDTO'
          title: الأسماء المستعارة
          type: array
        created_at:
          description: الطابع الزمني لإنشاء صندوق البريد
          title: تاريخ الإنشاء
          type: string
        domain_id:
          description: المجال UUID لصندوق البريد
          format: uuid
          title: معرف المجال
          type: string
        domain_name:
          description: اسم المجال لصندوق البريد
          title: اسم النطاق
          type: string
        first_name:
          description: الاسم الأول لمستخدم صندوق البريد
          title: الاسم الأول
          type: string
        id:
          description: صندوق البريد UUID
          format: uuid
          title: المعرّف
          type: string
        last_name:
          description: الاسم الأخير لمستخدم صندوق البريد
          title: اسم العائلة
          type: string
        local_part:
          description: الجزء المحلي لصندوق البريد قبل علامة التوقيع
          title: الجزء المحلي
          type: string
        primary_email:
          description: عنوان البريد الإلكتروني لصندوق البريد الأساسي
          title: البريد الإلكتروني الأساسي
          type: string
        quota:
          $ref: '#/components/schemas/MailboxQuotaDTO'
          description: استخدام الحصة النسبية لصندوق البريد
        status:
          description: حالة دورة حياة صندوق البريد
          title: الحالة
          type: string
        updated_at:
          description: الطابع الزمني لآخر تحديث لصندوق البريد
          title: تاريخ التحديث
          type: string
        workspace_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: مساحة العمل UUID لصندوق البريد
          title: معرف مساحة العمل
        workspace_name:
          anyOf:
            - type: string
            - type: 'null'
          description: اسم عرض مساحة العمل
          title: اسم مساحة العمل
      required:
        - id
        - domain_id
        - primary_email
        - domain_name
        - local_part
        - first_name
        - last_name
        - status
        - quota
        - created_at
        - updated_at
      title: MailboxDTO
      type: object
    MailboxAliasDTO:
      properties:
        alias:
          description: عنوان البريد الإلكتروني المستعار لصندوق البريد
          title: الاسم المستعار
          type: string
        is_catch_all:
          default: false
          description: >-
            ما إذا كان هذا الاسم المستعار يلتقط جميع الأجزاء المحلية التي لا
            مثيل لها
          title: هل هو catch-all
          type: boolean
      required:
        - alias
      title: MailboxAliasDTO
      type: object
    MailboxQuotaDTO:
      description: DTO حصة صندوق بريد موجهة للعميل.
      properties:
        allowed:
          description: بدل تخزين صندوق البريد
          title: مسموح
          type: integer
        used:
          description: تخزين صندوق البريد المستخدم
          title: مستخدم
          type: integer
      required:
        - used
        - allowed
      title: MailboxQuotaDTO
      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

````