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

# Search contacts by phone or email

> Find contacts by phone number or email address. Searches across all channels. At least one search parameter is required.



## OpenAPI

````yaml /openapi.json get /api/public/contacts/search
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/contacts/search:
    get:
      tags:
        - Contact
      summary: Search contacts by phone or email
      description: >-
        Find contacts by phone number or email address. Searches across all
        channels. At least one search parameter is required.
      operationId: PublicContactsController_searchContacts
      parameters:
        - name: phone
          required: false
          in: query
          description: Phone number to search (partial match supported)
          schema:
            type: string
            example: '+56912345678'
        - name: email
          required: false
          in: query
          description: Email address to search (partial match supported)
          schema:
            format: email
            pattern: >-
              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            example: john@example.com
            type: string
        - name: with_utm_events
          required: false
          in: query
          description: >-
            Set to true to include the per-contact utm_events array (marketing
            attribution). Off by default — the key is omitted entirely unless
            requested, since it costs an extra lookup. Opt in only if you
            consume UTM attribution.
          schema:
            type: boolean
            example: true
        - name: x-api-key
          in: header
          description: API key needed to authorize the request
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Contacts found successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      example: df980fc8-b6db-4820-bf22-2969482d106d
                    name:
                      type: string
                      example: John Doe
                    phone:
                      type: string
                      example: '+56912345678'
                    email:
                      type: string
                      example: john@example.com
                    platform:
                      type: string
                      example: whatsapp
                    last_message_at:
                      type: string
                      example: '2024-09-30T10:00:00.000Z'
                    chat_status:
                      type: string
                      example: ATTENDED
                    created_at:
                      type: string
                      example: '2024-01-15T10:00:00.000Z'
                    updated_at:
                      type: string
                      example: '2024-01-16T09:30:00.000Z'
                    client_id:
                      type: string
                      example: 123e4567-e89b-12d3-a456-426614174000
                    ai_customer_id:
                      type: string
                      nullable: true
                      example: 123e4567-e89b-12d3-a456-426614174000
                    default_stage_id:
                      type: string
                      nullable: true
                      example: 123e4567-e89b-12d3-a456-426614174000
                    blocked:
                      type: boolean
                      example: false
                    is_chat_read:
                      type: boolean
                      example: true
                    utm_events:
                      type: array
                      description: >-
                        Marketing attribution events recorded for this contact,
                        oldest first. Only present when with_utm_events=true;
                        otherwise the key is omitted.
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          created_at:
                            type: string
                            nullable: true
                            example: '2024-01-15T10:00:00.000Z'
                          customer_id:
                            type: string
                            nullable: true
                          integration_type:
                            type: string
                            nullable: true
                            example: facebook
                          ad_id:
                            type: string
                            nullable: true
                          referrer_url:
                            type: string
                            nullable: true
                            example: https://example.com/landing
                          search_keyword:
                            type: string
                            nullable: true
        '400':
          description: Bad request - Phone or email required.
        '401':
          description: Unauthorized - Invalid or missing API key.

````