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

# Search contacts

`GET /contacts/search`

Search and filter contacts using various criteria

## Query parameters

- `query` string
- `tag` string
- `sort` 'first_name' | 'last_name' | 'email' | 'client_id_number' | 'phone'
- `direction` 'asc' | 'desc'
- `query_type` 'and' | 'or'
- `filters` object[]
  - `type` 'enum' | 'string', required — Data type - 'enum' for tags/owner, 'string' for text fields
  - `field` 'tags' | 'owner' | 'phone_number' | 'first_name' | 'last_name' | 'client_id_number', required — Field to filter on
  - `criteria` 'has_any_of' | 'has_all_of' | 'has_none_of' | 'equals' | 'contains' | 'starts_with' | 'ends_with' | 'does_not_equal' | 'does_not_contain' | 'does_not_start_with' | 'does_not_end_with', required — Filter criteria (depends on field type)
  - `value` string — Single value for string/phone_number filters
  - `values` union[] — Array of values for tags, owner filters (use value OR values, not both)
    - union
      - string
      - integer

## Response `200`

Successful response with filtered contacts

- object
  - `data` object[]

---

[API](https://skmtc.net/gettruss/apis/api-v1.md) · [All operations](https://skmtc.net/gettruss/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gettruss/api-v1/versions/7c956b3d1bdf/schema)
