# Global mailbox-domain search

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/global/mailbox-domain-search:
    get:
      summary: Global mailbox-domain search
      deprecated: false
      description: >-
        Unified dashboard search - retrieve mailbox and workspace details for a
        given domain or mailbox email. Returns mailboxes grouped by domain,
        along with workspace information and service provider type.
      tags:
        - global
      parameters:
        - name: contains
          in: query
          description: ''
          required: false
          example: example.com
          schema:
            type: string
        - name: page
          in: query
          description: ''
          required: true
          example: 1
          schema:
            type: integer
        - name: limit
          in: query
          description: ''
          required: true
          example: 50
          schema:
            type: integer
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: YOUR_API_KEY
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      mailboxPerDomain:
                        type: object
                        properties:
                          example.com:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                first_name:
                                  type: string
                                last_name:
                                  type: string
                                domain:
                                  type: string
                                username:
                                  type: string
                                workspace_id:
                                  type: string
                                service_provider:
                                  type: string
                                mailboxWorkspace:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                  x-apidog-orders:
                                    - id
                                    - name
                              required:
                                - id
                                - first_name
                                - last_name
                                - domain
                                - username
                                - workspace_id
                                - service_provider
                                - mailboxWorkspace
                              x-apidog-orders:
                                - id
                                - first_name
                                - last_name
                                - domain
                                - username
                                - workspace_id
                                - service_provider
                                - mailboxWorkspace
                          another-domain.com:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                first_name:
                                  type: string
                                last_name:
                                  type: string
                                domain:
                                  type: string
                                username:
                                  type: string
                                workspace_id:
                                  type: string
                                service_provider:
                                  type: string
                                mailboxWorkspace:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                  required:
                                    - id
                                    - name
                                  x-apidog-orders:
                                    - id
                                    - name
                              x-apidog-orders:
                                - id
                                - first_name
                                - last_name
                                - domain
                                - username
                                - workspace_id
                                - service_provider
                                - mailboxWorkspace
                        required:
                          - example.com
                          - another-domain.com
                        x-apidog-orders:
                          - example.com
                          - another-domain.com
                      pagination:
                        type: object
                        properties:
                          totalRecords:
                            type: integer
                          totalPages:
                            type: integer
                          currentPage:
                            type: integer
                          limit:
                            type: integer
                          hasNextPage:
                            type: boolean
                          hasPreviousPage:
                            type: boolean
                        required:
                          - totalRecords
                          - totalPages
                          - currentPage
                          - limit
                          - hasNextPage
                          - hasPreviousPage
                        x-apidog-orders:
                          - totalRecords
                          - totalPages
                          - currentPage
                          - limit
                          - hasNextPage
                          - hasPreviousPage
                    required:
                      - mailboxPerDomain
                      - pagination
                    x-apidog-orders:
                      - mailboxPerDomain
                      - pagination
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
              example:
                status: 200
                message: Search completed successfully
                data:
                  mailboxPerDomain:
                    example.com:
                      - id: uuid-1
                        first_name: John
                        last_name: Doe
                        domain: example.com
                        username: john
                        workspace_id: workspace-uuid
                        service_provider: GOOGLE
                        mailboxWorkspace:
                          id: workspace-uuid
                          name: My Workspace
                      - id: uuid-2
                        first_name: Jane
                        last_name: Smith
                        domain: example.com
                        username: jane
                        workspace_id: workspace-uuid
                        service_provider: GOOGLE
                        mailboxWorkspace:
                          id: workspace-uuid
                          name: My Workspace
                    another-domain.com:
                      - id: uuid-3
                        first_name: Bob
                        last_name: Wilson
                        domain: another-domain.com
                        username: bob
                        workspace_id: workspace-uuid-2
                        service_provider: MICROSOFT
                        mailboxWorkspace:
                          id: workspace-uuid-2
                          name: Another Workspace
                  pagination:
                    totalRecords: 3
                    totalPages: 1
                    currentPage: 1
                    limit: 50
                    hasNextPage: false
                    hasPreviousPage: false
          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: contains must be a string
          headers: {}
          x-apidog-name: Unprocesseble Entity
      security: []
      x-apidog-folder: global
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-26754309-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
