> ## 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.

# List contacts

> Get a paginated and filtered list of contacts. Each contact includes name, company, email, phone/phone_type, tags, notes, created_at, and association counts (n_plans, n_employers, n_companies, n_deals).



## OpenAPI

````yaml /api-reference/cx/swagger.json post /contacts/_list
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/_list:
    post:
      tags:
        - contacts
      summary: List contacts
      description: >-
        Get a paginated and filtered list of contacts. Each contact includes
        name, company, email, phone/phone_type, tags, notes, created_at, and
        association counts (n_plans, n_employers, n_companies, n_deals).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pkg_routes_contacts.ListContactsRequest'
        description: Filters, sort, pagination, and export options
      responses:
        '200':
          description: List of contacts with pagination info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg_routes_contacts.ListContactsResponse'
        '400':
          description: Bad request - failed to parse request body
          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:
  schemas:
    pkg_routes_contacts.ListContactsRequest:
      type: object
      properties:
        export:
          type: boolean
        filters:
          $ref: '#/components/schemas/pkg_routes_contacts.ListContactsFilters'
        ids_only:
          type: boolean
        page:
          $ref: '#/components/schemas/types.ListPagination'
        report:
          type: string
        sort:
          $ref: '#/components/schemas/types.ListSort'
    pkg_routes_contacts.ListContactsResponse:
      type: object
      properties:
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/types.Contact'
        total:
          type: integer
    pkg_routes_contacts.ListContactsFilters:
      type: object
      properties:
        client:
          type: array
          items:
            type: string
        company:
          type: array
          items:
            type: string
        contact_type:
          type: array
          items:
            type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/types.ListFilterData'
        plan:
          type: array
          items:
            type: string
        role:
          type: array
          items:
            type: string
        search:
          type: string
        state:
          type: array
          items:
            type: string
        status:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
    types.ListPagination:
      type: object
      properties:
        limit:
          type: integer
        skip:
          type: integer
    types.ListSort:
      type: object
      properties:
        field:
          type: string
        last: {}
        order:
          type: integer
    types.Contact:
      type: object
      properties:
        _id:
          description: Unique identifier
          type: string
        address:
          $ref: '#/components/schemas/types.Address'
        client:
          $ref: '#/components/schemas/types.ShortClient'
        clients:
          description: For searching
          type: array
          items:
            $ref: '#/components/schemas/types.ClientRole'
        company:
          type: string
        confirmed:
          type: boolean
        created_at:
          type: string
        email:
          type: array
          items:
            type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/types.Field'
        n_companies:
          type: integer
        n_deals:
          type: integer
        n_employers:
          type: integer
        n_plans:
          type: integer
        name:
          type: string
        notes:
          type: string
        phone:
          type: array
          items:
            $ref: '#/components/schemas/types.Phone'
        phone_number:
          description: >-
            Resolved list/table cells (not stored). PhoneNumber/PhoneType are
            the

            first phone on the record. The n_* counts are association totals.
          type: string
        phone_type:
          type: string
        preferred_name:
          type: string
        suffix:
          type: string
        tags:
          type: array
          items:
            type: string
        team:
          description: What team does this contact belong to?
          type: string
        title:
          type: string
    types.ListFilterData:
      type: object
      properties:
        key:
          type: string
        op:
          type: string
        value: {}
    types.Address:
      type: object
      properties:
        attn:
          type: string
        city:
          type: string
        country:
          type: string
        desc:
          type: string
        state:
          type: string
        street:
          type: string
        street2:
          type: string
        unit:
          type: string
        zip:
          type: string
    types.ShortClient:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
    types.ClientRole:
      type: object
      properties:
        _id:
          type: string
        inactive:
          type: boolean
        name:
          type: string
        role:
          type: string
    types.Field:
      type: object
      properties:
        key:
          type: string
        value: {}
    types.Phone:
      type: object
      properties:
        number:
          type: string
        type:
          type: string
  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.