Skip to main content
GET
/
api
/
public
/
contacts
/
search
Search contacts by phone or email
curl --request GET \
  --url https://api.example.com/api/public/contacts/search \
  --header 'x-api-key: <x-api-key>'
[
  {
    "id": "df980fc8-b6db-4820-bf22-2969482d106d",
    "name": "John Doe",
    "phone": "+56912345678",
    "email": "john@example.com",
    "platform": "whatsapp",
    "last_message_at": "2024-09-30T10:00:00.000Z",
    "chat_status": "ATTENDED",
    "created_at": "2024-01-15T10:00:00.000Z",
    "client_id": "123e4567-e89b-12d3-a456-426614174000",
    "ai_customer_id": "123e4567-e89b-12d3-a456-426614174000",
    "default_stage_id": "123e4567-e89b-12d3-a456-426614174000",
    "blocked": false,
    "is_chat_read": true
  }
]

Headers

x-api-key
string
required

API key needed to authorize the request

Query Parameters

phone
string

Phone number to search (partial match supported)

Example:

"+56912345678"

email
string<email>

Email address to search (partial match supported)

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"

Response

Contacts found successfully.

id
string
Example:

"df980fc8-b6db-4820-bf22-2969482d106d"

name
string
Example:

"John Doe"

phone
string
Example:

"+56912345678"

email
string
Example:

"john@example.com"

platform
string
Example:

"whatsapp"

last_message_at
string
Example:

"2024-09-30T10:00:00.000Z"

chat_status
string
Example:

"ATTENDED"

created_at
string
Example:

"2024-01-15T10:00:00.000Z"

client_id
string
Example:

"123e4567-e89b-12d3-a456-426614174000"

ai_customer_id
string | null
Example:

"123e4567-e89b-12d3-a456-426614174000"

default_stage_id
string | null
Example:

"123e4567-e89b-12d3-a456-426614174000"

blocked
boolean
Example:

false

is_chat_read
boolean
Example:

true