> ## 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.ru.json POST /v1/public/accounts/{account_id}/mailboxes
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:
    post:
      tags:
        - public-accounts
        - public-mailboxes
      summary: Создать почтовый ящик
      description: Создает клиентский почтовый ящик без возврата его пароля.
      operationId: create_public_mailbox_v1_public_accounts__account_id__mailboxes_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/MailboxCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MailboxDTO'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Ошибка валидации
      security:
        - PublicBearerAuth: []
components:
  schemas:
    MailboxCreateRequest:
      additionalProperties: false
      description: Тело запроса для создания почтового ящика.
      properties:
        domain:
          description: UUID домена или имя домена для почтового ящика
          title: Домен
          type: string
        first_name:
          title: Имя
          type: string
        last_name:
          title: Фамилия
          type: string
        local_part:
          title: Локальная часть
          type: string
      required:
        - domain
        - local_part
        - first_name
        - last_name
      title: MailboxCreateRequest
      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: Id домена
          type: string
        domain_name:
          description: Доменное имя для почтового ящика
          title: Имя домена
          type: string
        first_name:
          description: Имя пользователя почтового ящика
          title: Имя
          type: string
        id:
          description: Почтовый ящик UUID
          format: uuid
          title: ID
          type: string
        last_name:
          description: Фамилия пользователя почтового ящика
          title: Фамилия
          type: string
        local_part:
          description: Локальная часть почтового ящика перед знаком at
          title: Локальная часть
          type: string
        primary_email:
          description: Адрес электронной почты основного почтового ящика
          title: Основной email
          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: Id рабочей области
        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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Сведения
          type: array
      title: HTTPОшибка проверки
      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
    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
  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

````