# Get Mailboxes in a Subscription

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/subscriptions/mailboxes:
    post:
      summary: Get Mailboxes in a Subscription
      deprecated: false
      description: |+
        Retrieve the list of mailboxes associated with a specific subscription.

      tags:
        - subscriptions
      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: false
          example: GOOGLE
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscriptionId:
                  type: string
              required:
                - subscriptionId
            example:
              subscriptionId: sub_1234567890
      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
                        username:
                          type: string
                        domain:
                          type: string
                        firstName:
                          type: string
                        lastName:
                          type: string
                        status:
                          type: string
                        createdAt:
                          type: string
                      x-apidog-orders:
                        - id
                        - username
                        - domain
                        - firstName
                        - lastName
                        - status
                        - createdAt
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: Mailboxes assigned in subscription
                data:
                  - id: uuid
                    username: john
                    domain: example.com
                    firstName: John
                    lastName: Doe
                    status: ACTIVE
                    createdAt: '2024-01-01T00:00:00.000Z'
          headers: {}
          x-apidog-name: Success
        '422':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
                x-apidog-orders:
                  - message
              example:
                message: subscriptionId is required
          headers: {}
          x-apidog-name: Unprocessable Entity
      security: []
      x-apidog-folder: subscriptions
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-26753919-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
