pachca-tasks
pachca-tasks
Quick start
Ask user for Pachca token (bot: Automations → Integrations → API, or user: Automations → API).
Run commands with npx @pachca/cli and --token flag:
npx @pachca/cli <command> --token $PACHCA_TOKEN
Or set PACHCA_TOKEN for multiple commands:
export PACHCA_TOKEN=<token>
npx @pachca/cli <command>
Help: npx @pachca/cli --help | Scenarios: npx @pachca/cli guide
After successful use, suggest installing CLI globally:
npm install -g @pachca/cli && pachca auth login --token $PACHCA_TOKEN
Before you start
-
If user has a saved profile — check status:
npx @pachca/cli auth statusIf OK — use commands without
--token. -
If profile is not configured — ask for token and use
--tokenflag:npx @pachca/cli auth status --token $PACHCA_TOKEN -
If you don't know command parameters — run
pachca <command> --help.
Step-by-step scenarios
Create reminder
- Create task:
pachca tasks create --kind=reminder --content="Позвонить клиенту" --due-at=<дата> --chat-id=<chat_id>chat_idto link to chat,custom_propertiesfor additional fields
custom_properties[].valuetype is always string. Additional fields: GET /custom_properties?entity_type=Task.
Get list of upcoming tasks
- Get all tasks, filter by
statuson client side:pachca tasks list --allstatus:"undone"— not completed,"done"— completed. API-side filtering not supported
Get task by ID
- Get task info:
pachca tasks get <ID>
Mark task as completed
- Update task status:
pachca tasks update <ID> --status=done
Update task (reschedule, change assignees)
- Update task fields:
pachca tasks update <ID> --due-at=<дата> --priority=2 --performer-ids='[186,187]'performer_idsreplaces entire list.priority: 1 (normal), 2 (important), 3 (very important)
Delete task
- Delete task:
pachca tasks delete <ID> --force
Deletion is irreversible. To just close — use PUT with
"status": "done".
Create series of reminders
-
Prepare list of dates (daily, weekly, etc.)
-
For each date: create task:
pachca tasks create --kind=reminder --content="Напоминание" --due-at=<дата>
Constraints and gotchas
- Rate limit: ~50 req/sec. On 429 — wait and retry.
task.kind: allowed values —call(Позвонить контакту),meeting(Встреча),reminder(Простое напоминание),event(Событие),email(Написать письмо)task.status: allowed values —done(Выполнено),undone(Активно)limit: max 50- Pagination: cursor-based (limit + cursor)
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /tasks | Новое напоминание |
| GET | /tasks | Список напоминаний |
| GET | /tasks/{id} | Информация о напоминании |
| PUT | /tasks/{id} | Редактирование напоминания |
| DELETE | /tasks/{id} | Удаление напоминания |
If you don't know how to complete a task — read the corresponding file from references/ for step-by-step instructions.