---
title: "Search all contacts"
method: POST
path: "/contacts/search"
tags: ["Contacts"]
---

# Search all contacts

`POST /contacts/search`

Search a contact by any field.

## Query parameters

- `after` string, nullable
- `before` string, nullable
- `limit` integer

## Request body

- PASearchContactDTO
  - `query` PASearchContactQueryDTO
    - `value` union[] — The list of search expressions to evaluate
      - union
        - SEARCHCONTACTQUERYMAIL
          - `column` string
          - `field` 'mail'
          - `operator` string — The comparison operator for the search expression
          - `type` 'phone' | 'mail' | 'facebook_messenger' | 'instagram' | 'telegram' | 'live_chat' | 'google_business_messaging' | 'whats_app_bsuid'
          - `value` unknown
        - SEARCHCONTACTQUERYPHONE
          - `column` string
          - `field` 'phone'
          - `operator` string — The comparison operator for the search expression
          - `type` 'phone' | 'mail' | 'facebook_messenger' | 'instagram' | 'telegram' | 'live_chat' | 'google_business_messaging' | 'whats_app_bsuid'
          - `value` unknown
        - SEARCHCONTACTQUERYINSTAGRAM
          - `column` string
          - `field` 'instagram'
          - `operator` string — The comparison operator for the search expression
          - `type` 'phone' | 'mail' | 'facebook_messenger' | 'instagram' | 'telegram' | 'live_chat' | 'google_business_messaging' | 'whats_app_bsuid'
          - `value` unknown
        - SEARCHCONTACTQUERYCUSTOMATTRIBUTE
          - `field` 'custom_attribute'
          - `identifier` string — The custom attribute identifier or built-in attribute name to search on
          - `operator` string — The comparison operator for the search expression
          - `value` unknown

## Response `200`

OK

- PASearchContactPagedDocsExample
  - `url` string
  - `results` PAListContactDTO[]
    - `id` string — The unique identifier of the contact
    - `first_name` string, nullable — The first name of the contact
    - `last_name` string, nullable — The last name of the contact
    - `gender` 'male' | 'female' | 'diverse' | 'unknown', nullable — The gender of the contact
    - `handles` PAContactHandleDTO[] — The contact handles of this contact
      - `id` string — The unique identifier of the contact handle
      - `type` 'phone' | 'mail' | 'facebook_messenger' | 'instagram' | 'telegram' | 'live_chat' | 'google_business_messaging' | 'whats_app_username'
      - `value` string — The phone number, email address or username stored in this contact handle
    - `custom_attributes` union[] — The contact attributes of this contact
      - union
        - CONTACTATTRIBUTEVALUETEXT
          - `id` string — The unique identifier of the contact attribute
          - `name` string — The name of the contact attribute
          - `type` 'number' | 'text' | 'datetime' | 'dateonly' | 'single_select' | 'multi_select'
          - `url` string — The URL of the contact attribute resource
          - `value` string — The text value of the contact attribute
        - CONTACTATTRIBUTEVALUENUMBER
          - `id` string — The unique identifier of the contact attribute
          - `name` string — The name of the contact attribute
          - `type` 'number' | 'text' | 'datetime' | 'dateonly' | 'single_select' | 'multi_select'
          - `url` string — The URL of the contact attribute resource
          - `value` number, double — The numeric value of the contact attribute
        - CONTACTATTRIBUTEVALUEDATEONLY
          - `id` string — The unique identifier of the contact attribute
          - `name` string — The name of the contact attribute
          - `type` 'number' | 'text' | 'datetime' | 'dateonly' | 'single_select' | 'multi_select'
          - `url` string — The URL of the contact attribute resource
          - `value` string, date — The date value of the contact attribute
        - CONTACTATTRIBUTEVALUEDATETIME
          - `id` string — The unique identifier of the contact attribute
          - `name` string — The name of the contact attribute
          - `type` 'number' | 'text' | 'datetime' | 'dateonly' | 'single_select' | 'multi_select'
          - `url` string — The URL of the contact attribute resource
          - `value` string, date-time — The datetime value of the contact attribute
        - CONTACTATTRIBUTEVALUESINGLESELECT
          - `id` string — The unique identifier of the contact attribute
          - `name` string — The name of the contact attribute
          - `type` 'number' | 'text' | 'datetime' | 'dateonly' | 'single_select' | 'multi_select'
          - `url` string — The URL of the contact attribute resource
          - `value` string — The selected option value of the contact attribute
        - CONTACTATTRIBUTEVALUEMULTISELECT
          - `id` string — The unique identifier of the contact attribute
          - `name` string — The name of the contact attribute
          - `type` 'number' | 'text' | 'datetime' | 'dateonly' | 'single_select' | 'multi_select'
          - `url` string — The URL of the contact attribute resource
          - `value` string[] — The selected option values of the contact attribute
    - `url` string — The URL of the contact resource
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `pagination` Pagination
    - `next_cursor` string, nullable
    - `previous_cursor` string, nullable
    - `next_url` string, nullable
    - `previous_url` string, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/superchat/apis/superchat-api.md) · [All operations](https://skmtc.dev/superchat/apis/superchat-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/superchat/superchat-api/revisions/3bc557a0072f/schema)
