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

# Lookup contact (client portal)

> Lookup a contact by email address and return whether it exists, is used by other clients, and how many clients it's associated with



## OpenAPI

````yaml /api-reference/cx/swagger.json post /cp/{client}/contacts/_lookup
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:
  /cp/{client}/contacts/_lookup:
    post:
      tags:
        - client-portal
      summary: Lookup contact (client portal)
      description: >-
        Lookup a contact by email address and return whether it exists, is used
        by other clients, and how many clients it's associated with
      parameters:
        - description: Client ID
          name: client
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
        description: Lookup request (email required)
        required: true
      responses:
        '200':
          description: Contact lookup result
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_cp_contacts.LookupContactResponse
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Contact not found
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_cp_contacts.LookupContactResponse:
      type: object
      properties:
        clientCount:
          type: integer
        contact:
          $ref: '#/components/schemas/types.Contact'
        exists:
          type: boolean
        usedByOthers:
          type: boolean
    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.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.