Skip to content

Commit 870db66

Browse files
committed
feat: update commands and skills
1 parent 4e5e101 commit 870db66

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

cli/agent-skill.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export CHATWOOT_API_KEY=your_token_here
3636
- **The output contract** — parse `-o json`, never the human-readable text format.
3737
- **Safety rules**`reply` is customer-visible and irreversible, so the agent shows the full text and asks before sending.
3838
- **Common pitfalls**`label` replaces rather than appends, `--query` searches message content (not contacts), `assign --agent <name>` is a case-insensitive substring match, list endpoints paginate.
39-
- **Composable patterns**`-q | xargs` for bulk operations, `jq` chaining for lookups.
39+
- **Composable patterns**`-q | xargs` for bulk operations, `jq` chaining for lookups, and `chatwoot api` for authenticated raw API reads when no first-class command exists.
4040

4141
The full skill source lives at [chatwoot/cli/skills/chatwoot-cli](https://github.com/chatwoot/cli/tree/main/skills/chatwoot-cli) read it directly to see exactly what behavior is shaped.
4242

@@ -51,6 +51,8 @@ Once the skill is installed, prompts like these work without further setup:
5151

5252
The agent composes `chatwoot` commands, parses JSON, and stops to confirm before any write that affects customers.
5353

54+
For raw API calls, agents should check the application Swagger first: [application_swagger.json](https://raw.githubusercontent.com/chatwoot/chatwoot/develop/swagger/tag_groups/application_swagger.json).
55+
5456
## Remove the skill
5557

5658
```bash

cli/commands.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@ chatwoot me # your profile (alias of auth sta
100100
chatwoot whoami # same
101101
```
102102

103+
## Raw API
104+
105+
Use `chatwoot api` for authenticated API calls that do not have a first-class CLI command yet. Account-relative paths are expanded under `/api/v1/accounts/<account_id>`, so do not include the `/api/v1/accounts/...` prefix.
106+
107+
```bash
108+
chatwoot api /conversations/123 # GET /api/v1/accounts/<id>/conversations/123
109+
chatwoot api -X PATCH /conversations/123 --data '{"status":"open"}'
110+
chatwoot api --exact /api/v1/profile # non-account-scoped endpoint
111+
```
112+
113+
Use the application Swagger as the endpoint reference before raw API calls: [application_swagger.json](https://raw.githubusercontent.com/chatwoot/chatwoot/develop/swagger/tag_groups/application_swagger.json).
114+
103115
## Auth & config
104116

105117
```bash

0 commit comments

Comments
 (0)