canonical: https://jentic.com/apis/pachca.com/pachca

# Pachca API

The Pachca API sends and manages messages in the Pachca corporate messenger: it posts to conversations, channels, threads, and direct messages, edits and pins messages, adds reactions, and searches messages, chats, and users. It also creates and archives chats, manages chat members and roles, assigns tasks with due dates and performers, and administers employees, group tags, and statuses for the workspace. Bot owners can configure webhooks, read and delete webhook events, open forms with views, unfurl link previews, and order a message export for a period.

## For AI agents

Post messages and threads in Pachca, search messages and employees, create chats and add members, assign tasks with due dates, and manage bots and their webhooks in a Pachca workspace.

## Scope

Does not place voice or video calls, send email or SMS, or manage calendars. Use for messaging, chats, tasks, and workspace administration in Pachca only.

## Capabilities

- Send a message to a conversation, channel, thread, or user by setting entity_type and entity_id on POST /messages, with optional files and buttons
- Search messages by text with filters such as chat_ids, user_ids, created_from, and created_to through `/search/messages`
- Create a conversation or channel with member_ids and group_tag_ids, then add or remove members and change their roles
- Create tasks with kind, content, due_at, priority, and performer_ids, optionally linked to a chat_id
- Pin, edit, react to, and start threads on messages, and list which members have read a message
- Invite employees with first_name, last_name, email, department, and role, and set their status
- Order an export of workspace messages between start_at and end_at with an optional webhook_url for completion

## Use cases

### Agent posts and replies in Pachca through Jentic

A team assistant agent posts summaries, alerts, and answers into Pachca chats. Through Jentic it finds the createMessage operation by intent, sets entity_type and entity_id for the target chat or thread, and sends the content, while your own Jentic One instance injects the Pachca bearer token at call time so the agent never sees it.

Example prompt: POST /messages with message.entity_type 'discussion', message.entity_id 334455, and message.content 'Release 2.4 is live', then pin it with POST `/messages/{id}/pin`

### Searching team conversations

When someone asks where a decision was made, an agent searches the workspace instead of scrolling. GET `/search/messages` matches message text and attachment names in the chats the token can access, and can be narrowed with chat_ids, user_ids, and a created_from to created_to window; `/search/chats` and `/search/users` find the right chat or person first.

Example prompt: GET `/search/messages` with query 'invoice 1042', created_from '2026-11-01', and created_to '2026-11-08', then return the matching messages with their chat names

### Task assignment from chat

Pachca tasks carry a kind, content, due_at, priority, and the performer_ids responsible, and can be linked to a chat. An agent that turns a chat request into a task creates it with POST /tasks, then lists or updates tasks as work progresses, so assignments stay inside the messenger the team already uses.

Example prompt: POST /tasks with task.kind 'reminder', task.content 'Send the contract to the client', task.due_at '2026-11-14T15:00:00Z', and task.performer_ids [12345]

### Workspace administration and onboarding

Admins add new employees with POST /users, which sends an email invitation, assign group tags that grant chat access, and create channels for the new team. Audit events at /audit_events and member lists per chat let the same agent confirm who has access after the change.

Example prompt: POST /users with user.first_name 'Olga', user.last_name 'Petrova', user.email 'olga@example.com', and user.department 'Sales', then add her to chat 556677 with POST `/chats/{id}/members`

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/messages` | Send a message |
| GET | `/messages` | List chat messages |
| GET | `/search/messages` | Search messages |
| POST | `/chats` | Create a conversation or channel |
| POST | `/chats/{id}/members` | Add chat members |
| POST | `/tasks` | Create a task |
| POST | `/users` | Create an employee |
| POST | `/chats/exports` | Order a message export |

## Key resources

- **Messages** — Send, edit, delete, pin, react to, and thread messages, and list who read them
- **Chats** — Create, update, archive, and export chats and manage their members and group tags
- **Tasks** — Create, list, update, and delete tasks with performers and due dates
- **Users** — Create and manage employees, their avatars, and statuses
- **Search** — Search messages, chats, and users
- **Bots and webhooks** — Manage bots, tokens, client secrets, webhook settings, and webhook events

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 46 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 66 / 100
  - Developer Experience & Jentic Compatibility: 74 / 100
  - AI-Readiness & Agent Experience: 21 / 100
  - Agent Usability: 85 / 100
  - Security: 60 / 100
  - AI Discoverability: 75 / 100
- **View full report:** https://jentic.com/apis/pachca.com/pachca/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Pachca by hand means managing bearer tokens for users and bots, building nested message and task objects, and following cursor pagination across chat feeds. Through Jentic you install once, import Pachca from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Pachca puts chat, task, and user ids in the URL path for reads and changes, such as `/chats/{id}/members` and `/tasks/{id}`, so a rule can pin your agent to one chat's members or one task. New messages carry their target in the request body, so for posting, rules bound the operation, not the chat. You choose the operations, so destructive ones like deleting users or bots are not included unless you add them.
- **Credential handling:** Your Pachca token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send a message in Pachca' or 'create a task', and Jentic returns the matching Pachca operation with its input schema so the agent builds the right nested message or task object.

## Related APIs

- **Slack API** — Team messaging with channels, threads, and apps
- **Mattermost API** — Self-hostable team messaging with channels and bots
- **Google Calendar API** — Calendar events and availability

## FAQ

### What authentication does the Pachca API use?

The Pachca API uses HTTP bearer authentication per its OpenAPI spec: a Pachca access token, such as a bot token issued with POST `/bots/{id}/tokens`, sent in the Authorization header. Through Jentic the token is stored encrypted by your own Jentic One instance and injected at call time, so it never enters the agent's prompt or logs.

### How do I send a message to a thread or a user instead of a chat?

POST /messages takes a message object whose entity_type selects the target, one of discussion, thread, or user, and whose entity_id is that target's id. Set parent_message_id to reply to a specific message, and add files or buttons in the same object.

### Can I export Pachca messages with the API?

Yes. POST `/chats/exports` orders an export of workspace messages between start_at and end_at, optionally limited by chat_ids, and can notify a webhook_url when the archive is ready. Download it afterwards with GET `/chats/exports/{id}.`

### How do I post a message in Pachca through Jentic?

Install Jentic One, add the Pachca API from the Jentic API Directory, and store your Pachca token once. Your agent searches for 'send a message in Pachca', gets the createMessage operation with its input schema, and calls POST /messages with entity_type, entity_id, and content. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Pachca MCP server?

You don't need an MCP server to give your agent the Pachca API. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls it, with operations found on demand instead of loaded into its context up front.

### Can I limit what my agent is allowed to do with the Pachca API?

Yes. Write a rule that allows GET `/chats/556677`, GET `/chats/556677/members`, and search only, plus POST /messages, and your agent can read that chat and post replies but cannot delete users, archive chats, or rotate bot tokens. Your own Jentic One instance logs what it calls.
