# Get Allocated Domains for Subscription

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/dns-shield/allocated-domains:
    get:
      summary: Get Allocated Domains for Subscription
      deprecated: false
      description: >-
        Retrieve all domains that are currently allocated to a specific DNS
        Shield subscription. This endpoint provides detailed information about
        each domain including its status, mailboxes, and registration details.
      tags:
        - dns shield
      parameters:
        - name: subscriptionId
          in: query
          description: ''
          required: true
          schema:
            type: string
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: x-workspace-key
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
        - name: x-service-provider
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        domainName:
                          type: string
                        domainId:
                          type: string
                        status:
                          type: string
                        purchaseType:
                          type: string
                        domain:
                          type: string
                        createdAt:
                          type: string
                        registeredOn:
                          type: string
                        expireOn:
                          type: string
                        mailboxes:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              username:
                                type: string
                              firstName:
                                type: string
                              lastName:
                                type: string
                              status:
                                type: string
                              createdAt:
                                type: string
                              updatedAt:
                                type: string
                            required:
                              - id
                              - username
                              - firstName
                              - lastName
                              - status
                              - createdAt
                              - updatedAt
                            x-apidog-orders:
                              - id
                              - username
                              - firstName
                              - lastName
                              - status
                              - createdAt
                              - updatedAt
                        mailboxCount:
                          type: integer
                      required:
                        - domainName
                        - domainId
                        - status
                        - purchaseType
                        - domain
                        - createdAt
                        - registeredOn
                        - expireOn
                        - mailboxes
                        - mailboxCount
                      x-apidog-orders:
                        - domainName
                        - domainId
                        - status
                        - purchaseType
                        - domain
                        - createdAt
                        - registeredOn
                        - expireOn
                        - mailboxes
                        - mailboxCount
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: DNS Shield allocated domains retrieved
                data:
                  - domainName: example.com
                    domainId: a66ccca7-d465-464a-887b-90bce6d09bbb
                    status: ACTIVE
                    purchaseType: PAID
                    domain: example.com
                    createdAt: '2024-01-15T10:30:00.000Z'
                    registeredOn: '2024-01-15'
                    expireOn: '2025-01-15'
                    mailboxes:
                      - id: mailbox-uuid-1
                        username: john
                        firstName: John
                        lastName: Doe
                        status: ACTIVE
                        createdAt: '2024-01-15T11:00:00.000Z'
                        updatedAt: '2024-02-01T09:15:00.000Z'
                      - id: mailbox-uuid-2
                        username: jane
                        firstName: Jane
                        lastName: Smith
                        status: ACTIVE
                        createdAt: '2024-01-16T14:30:00.000Z'
                        updatedAt: '2024-01-20T16:45:00.000Z'
                    mailboxCount: 2
                  - domainName: example2.com
                    domainId: b77dddb8-e576-575b-998c-01cdf7e10ccc
                    status: ACTIVE
                    purchaseType: PAID
                    domain: example2.com
                    createdAt: '2024-01-20T08:00:00.000Z'
                    registeredOn: '2024-01-20'
                    expireOn: '2025-01-20'
                    mailboxes: []
                    mailboxCount: 0
                  - domainName: example3.com
                    domainId: c88eeeec9-f687-686c-aa9d-12def8f21ddd
                    status: ACTIVE
                    purchaseType: PAID
                    domain: example3.com
                    createdAt: '2024-01-25T12:00:00.000Z'
                    registeredOn: '2024-01-25'
                    expireOn: '2025-01-25'
                    mailboxes:
                      - id: mailbox-uuid-3
                        username: admin
                        firstName: Admin
                        lastName: User
                        status: ACTIVE
                        createdAt: '2024-01-25T12:30:00.000Z'
                        updatedAt: '2024-01-25T12:30:00.000Z'
                    mailboxCount: 1
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      errorId:
                        type: string
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          x-apidog-orders:
                            - field
                            - message
                    required:
                      - errorId
                      - errors
                    x-apidog-orders:
                      - errorId
                      - errors
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 400
                message: Validation error
                data:
                  errorId: unique-error-id
                  errors:
                    - field: limit
                      message: limit must be a positive integer between 1 and 100
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      errorId:
                        type: string
                    required:
                      - errorId
                    x-apidog-orders:
                      - errorId
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 401
                message: Invalid API key
                data:
                  errorId: unique-error-id
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      errorId:
                        type: string
                    required:
                      - errorId
                    x-apidog-orders:
                      - errorId
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 500
                message: Internal server error
                data:
                  errorId: unique-error-id
          headers: {}
          x-apidog-name: Internal Server Error
      security: []
      x-apidog-folder: dns shield
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-25781672-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
