If profile is not configured — ask for token and use
--token
flag:
npx @pachca/cli auth status --token $PACHCA_TOKEN
If you don't know command parameters — run
pachca --help
.
Step-by-step scenarios
Find message by text
Full-text search across messages:
pachca search list-messages
--query
=
"текст"
limit
(up to 200),
cursor
. Filters:
chat_ids[]
,
user_ids[]
,
active
,
created_from
/
created_to
Searches all accessible chats.
root_chat_id
in response — root chat for threads.
Find chat by name
Full-text search across chats:
pachca search list-chats
--query
=
"название"
limit
(up to 100),
cursor
. Filters:
active
,
chat_subtype
,
personal
,
created_from
/
created_to
Find employee by name
Full-text search across employees:
pachca search list-users
--query
=
"имя"
sort=alphabetical
for alphabetical order,
sort=by_score
(default). Filters:
company_roles[]
,
created_from
/
created_to
Searches by name, email, title and other fields. Supports sorting by relevance.
Constraints and gotchas
Rate limit: ~50 req/sec. On 429 — wait and retry.
limit
max — 100 (GET /search/chats), 200 (GET /search/messages), 200 (GET /search/users)
Pagination: cursor-based (limit + cursor)
Endpoints
Method
Path
Description
GET
/search/chats
Поиск чатов
GET
/search/messages
Поиск сообщений
GET
/search/users
Поиск сотрудников
If you don't know how to complete a task — read the corresponding file from references/ for step-by-step instructions.