npx skills add https://github.com/vm0-ai/vm0-skills --skill chatwoot通过直接使用 curl 调用 Chatwoot,跨多个渠道(网站、电子邮件、WhatsApp 等)管理客户支持。
官方文档:
https://developers.chatwoot.com/api-reference/introduction
在需要以下操作时使用此技能:
/app/accounts/1/...)export CHATWOOT_API_TOKEN="your-api-access-token"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
export CHATWOOT_ACCOUNT_ID="1"
export CHATWOOT_BASE_URL="https://app.chatwoot.com" # 或您的自托管 URL
| API 类型 | 认证方式 | 使用场景 |
|---|---|---|
| 应用 API | 用户访问令牌 | 客服/管理员自动化 |
| 客户端 API | 收件箱标识符 | 自定义聊天界面 |
| 平台 API | 平台应用令牌 | 多租户管理(仅限自托管) |
所有示例均使用带有用户访问令牌的应用 API。
在您的账户中创建一个新联系人:
写入 /tmp/chatwoot_request.json:
{
"inbox_id": 1,
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+1234567890",
"identifier": "customer_123",
"additional_attributes": {
"company": "Acme Inc",
"plan": "premium"
}
}
然后运行:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/contacts" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
通过电子邮件、电话或姓名搜索联系人:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/contacts/search?q=john@example.com" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.payload[] | {id, name, email}'
通过 ID 获取特定联系人。将 <contact-id> 替换为来自"搜索联系人"或"创建联系人"响应的实际联系人 ID:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/contacts/<contact-id>" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)"
与联系人创建新对话:
写入 /tmp/chatwoot_request.json:
{
"source_id": "api_conversation_123",
"inbox_id": 1,
"contact_id": 123,
"status": "open",
"message": {
"content": "Hello! How can I help you today?"
}
}
然后运行:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
获取所有对话,支持可选过滤器:
# 列出打开的对话
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations?status=open" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.data.payload[] | {id, status, contact: .meta.sender.name}'
获取特定对话的详情。将 <conversation-id> 替换为来自"列出对话"或"创建对话"响应的实际对话 ID:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)"
在对话中发送消息。将 <conversation-id> 替换为来自"列出对话"响应的实际对话 ID:
写入 /tmp/chatwoot_request.json:
{
"content": "Thank you for contacting us! Let me help you with that.",
"message_type": "outgoing",
"private": false
}
然后运行:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/messages" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
添加内部备注(对客户不可见)。将 <conversation-id> 替换为来自"列出对话"响应的实际对话 ID:
写入 /tmp/chatwoot_request.json:
{
"content": "Customer is a VIP - handle with priority",
"message_type": "outgoing",
"private": true
}
然后运行:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/messages" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
将对话分配给客服人员。将 <conversation-id> 替换为实际对话 ID,将 <agent-id> 替换为来自"列出客服人员"响应的客服人员 ID:
写入 /tmp/chatwoot_request.json:
{
"assignee_id": 1
}
然后运行:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/assignments" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
更改对话状态(打开、已解决、待处理)。将 <conversation-id> 替换为来自"列出对话"响应的实际对话 ID:
写入 /tmp/chatwoot_request.json:
{
"status": "resolved"
}
然后运行:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/toggle_status" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
获取账户中的所有客服人员:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/agents" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.[] | {id, name, email, role, availability_status}'
获取账户中的所有收件箱(渠道):
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/inboxes" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.payload[] | {id, name, channel_type}'
获取按状态分类的计数,用于仪表板:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/meta" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.meta.all_count, .meta.mine_count'
| 状态 | 描述 |
|---|---|
open | 活跃对话 |
resolved | 已关闭/已完成 |
pending | 等待回复 |
snoozed | 暂时暂停 |
| 类型 | 值 | 描述 |
|---|---|---|
| 发送 | outgoing | 客服人员发送给客户 |
| 接收 | incoming | 客户发送给客服人员 |
| 私有 | private: true | 内部备注(对客户不可见) |
| 字段 | 描述 |
|---|---|
id | 联系人 ID |
name | 联系人姓名 |
email | 电子邮件地址 |
phone_number | 电话号码 |
identifier | 外部系统 ID |
custom_attributes | 自定义字段 |
| 字段 | 描述 |
|---|---|
id | 对话 ID |
inbox_id | 渠道/收件箱 ID |
status | 当前状态 |
assignee | 分配的客服人员 |
contact | 客户信息 |
| 字段 | 描述 |
|---|---|
id | 消息 ID |
content | 消息文本 |
message_type | 接收/发送 |
private | 是否为内部备注 |
status | 已发送/已送达/已读/失败 |
/app/accounts/{id}/...private: true 用于内部备注CHATWOOT_BASE_URL 更改为您的实例 URL每周安装次数
75
代码仓库
GitHub 星标数
49
首次出现
2026年1月24日
安全审计
安装于
gemini-cli66
opencode64
codex63
github-copilot62
amp60
kimi-cli59
Use Chatwoot via direct curl calls to manage customer support across multiple channels (website, email, WhatsApp, etc.).
Official docs:
https://developers.chatwoot.com/api-reference/introduction
Use this skill when you need to:
/app/accounts/1/...)export CHATWOOT_API_TOKEN="your-api-access-token"
export CHATWOOT_ACCOUNT_ID="1"
export CHATWOOT_BASE_URL="https://app.chatwoot.com" # or your self-hosted URL
| API Type | Auth | Use Case |
|---|---|---|
| Application API | User access_token | Agent/admin automation |
| Client API | inbox_identifier | Custom chat interfaces |
| Platform API | Platform App token | Multi-tenant management (self-hosted only) |
All examples use the Application API with user access token.
Create a new contact in your account:
Write to /tmp/chatwoot_request.json:
{
"inbox_id": 1,
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+1234567890",
"identifier": "customer_123",
"additional_attributes": {
"company": "Acme Inc",
"plan": "premium"
}
}
Then run:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/contacts" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
Search contacts by email, phone, or name:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/contacts/search?q=john@example.com" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.payload[] | {id, name, email}'
Get a specific contact by ID. Replace <contact-id> with the actual contact ID from the "Search Contacts" or "Create a Contact" response:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/contacts/<contact-id>" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)"
Create a new conversation with a contact:
Write to /tmp/chatwoot_request.json:
{
"source_id": "api_conversation_123",
"inbox_id": 1,
"contact_id": 123,
"status": "open",
"message": {
"content": "Hello! How can I help you today?"
}
}
Then run:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
Get all conversations with optional filters:
# List open conversations
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations?status=open" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.data.payload[] | {id, status, contact: .meta.sender.name}'
Get details of a specific conversation. Replace <conversation-id> with the actual conversation ID from the "List Conversations" or "Create a Conversation" response:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)"
Send a message in a conversation. Replace <conversation-id> with the actual conversation ID from the "List Conversations" response:
Write to /tmp/chatwoot_request.json:
{
"content": "Thank you for contacting us! Let me help you with that.",
"message_type": "outgoing",
"private": false
}
Then run:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/messages" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
Add an internal note (not visible to customer). Replace <conversation-id> with the actual conversation ID from the "List Conversations" response:
Write to /tmp/chatwoot_request.json:
{
"content": "Customer is a VIP - handle with priority",
"message_type": "outgoing",
"private": true
}
Then run:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/messages" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
Assign a conversation to an agent. Replace <conversation-id> with the actual conversation ID and <agent-id> with the agent ID from the "List Agents" response:
Write to /tmp/chatwoot_request.json:
{
"assignee_id": 1
}
Then run:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/assignments" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
Change conversation status (open, resolved, pending). Replace <conversation-id> with the actual conversation ID from the "List Conversations" response:
Write to /tmp/chatwoot_request.json:
{
"status": "resolved"
}
Then run:
curl -s -X POST "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/<conversation-id>/toggle_status" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" -H "Content-Type: application/json" -d @/tmp/chatwoot_request.json
Get all agents in the account:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/agents" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.[] | {id, name, email, role, availability_status}'
Get all inboxes (channels) in the account:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/inboxes" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.payload[] | {id, name, channel_type}'
Get counts by status for dashboard:
curl -s -X GET "$(printenv CHATWOOT_BASE_URL)/api/v1/accounts/$(printenv CHATWOOT_ACCOUNT_ID)/conversations/meta" -H "api_access_token: $(printenv CHATWOOT_API_TOKEN)" | jq '.meta.all_count, .meta.mine_count'
| Status | Description |
|---|---|
open | Active conversation |
resolved | Closed/completed |
pending | Waiting for response |
snoozed | Temporarily paused |
| Type | Value | Description |
|---|---|---|
| Outgoing | outgoing | Agent to customer |
| Incoming | incoming | Customer to agent |
| Private | private: true | Internal note (not visible to customer) |
| Field | Description |
|---|---|
id | Contact ID |
name | Contact name |
email | Email address |
phone_number | Phone number |
identifier | External system ID |
custom_attributes | Custom fields |
| Field | Description |
|---|---|
id | Conversation ID |
inbox_id | Channel/inbox ID |
status | Current status |
assignee | Assigned agent |
contact | Customer info |
| Field | Description |
|---|---|
id | Message ID |
content | Message text |
message_type | incoming/outgoing |
private | Is internal note |
status | sent/delivered/read/failed |
/app/accounts/{id}/... in your browserprivate: true for internal notesCHATWOOT_BASE_URL to your instance URLWeekly Installs
75
Repository
GitHub Stars
49
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykWarn
Installed on
gemini-cli66
opencode64
codex63
github-copilot62
amp60
kimi-cli59
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
44,900 周安装
排版系统设计指南:模块化比例、字体配对与Tailwind实现
75 周安装
Zod 验证工具集:TypeScript 类型安全数据验证与表单集成方案
166 周安装
Readwise Reader 读者画像构建技能 - 基于阅读历史分析,实现个性化内容推荐与体验优化
168 周安装
OMC Doctor:Claude代码助手安装诊断与修复工具 - 解决OMC插件问题
175 周安装
微信文章转Markdown工具 - 高效抓取公众号文章并转换为Markdown格式,支持存档与AI处理
215 周安装
Mantine Combobox 组件:React 下拉选择与自动完成的底层原语 | 构建自定义 UI
241 周安装