> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stax.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search contacts by domain

> Find all contacts with email addresses from a specific domain by searching messages



## OpenAPI

````yaml /api-reference/cx/swagger.json get /contacts/_domain
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /contacts/_domain:
    get:
      tags:
        - contacts
      summary: Search contacts by domain
      description: >-
        Find all contacts with email addresses from a specific domain by
        searching messages
      parameters:
        - description: Email domain (e.g., example.com)
          name: q
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Contacts and message count for domain
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.