# schedule mailbox creation

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/mailboxes/schedule:
    post:
      summary: schedule mailbox creation
      deprecated: true
      description: >-
        Schedule mailbox creation for single or bulk mailboxes. Mailboxes are
        scheduled to be created on the next subscription renewal date. Supports
        bulk scheduling by passing multiple domains with multiple mailboxes in
        the payload.
      tags:
        - mailbox
      parameters:
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: YOUR_API_KEY
          schema:
            type: string
        - name: x-service-provider
          in: header
          description: ''
          required: true
          example: GOOGLE
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                <domainId1>:
                  type: array
                  items:
                    type: object
                    properties:
                      domainName:
                        type: string
                      mailboxUsername:
                        type: string
                      firstName:
                        type: string
                      lastName:
                        type: string
                    required:
                      - domainName
                      - mailboxUsername
                      - firstName
                      - lastName
                <domainId2>:
                  type: array
                  items:
                    type: object
                    properties:
                      domainName:
                        type: string
                      mailboxUsername:
                        type: string
                      firstName:
                        type: string
                      lastName:
                        type: string
              required:
                - <domainId1>
                - <domainId2>
            example:
              <domainId1>:
                - domainName: example1.com
                  mailboxUsername: john
                  firstName: John
                  lastName: Doe
                - domainName: example1.com
                  mailboxUsername: jane
                  firstName: Jane
                  lastName: Smith
              <domainId2>:
                - domainName: example2.com
                  mailboxUsername: bob
                  firstName: Bob
                  lastName: Wilson
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        userId:
                          type: string
                        workspaceId:
                          type: string
                        domainId:
                          type: string
                        status:
                          type: string
                        creationTime:
                          type: string
                      x-apidog-orders:
                        - id
                        - userId
                        - workspaceId
                        - domainId
                        - status
                        - creationTime
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: Mailboxes scheduled for creation
                data:
                  - id: ...
                    userId: ...
                    workspaceId: ...
                    domainId: ...
                    status: PENDING
                    creationTime: '2024-02-01T00:00:00.000Z'
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
                x-apidog-orders:
                  - message
              example:
                message: No active subscriptions with available mailboxes found
          headers: {}
          x-apidog-name: Bad Request
      security: []
      x-apidog-folder: mailbox
      x-apidog-status: deprecated
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-26753639-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
