suitecrm
Manage SuiteCRM records via the V8 REST API. Use for any CRM task: creating, reading, updating, or deleting Contacts, Leads, Accounts, Opportunities, Cases, and other modules. Also use when querying CRM data, managing relationships between records, or looking up customer information.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 41
- Forks
- 9
01 前言 Front Matter
- name
- suitecrm
- homepage
- https://docs.suitecrm.com/developer/api/developer-setup-guide/json-api/
- metadata
- { "openclaw": { "emoji": "🏢", "requires": { "env": [ "SUITECRM_URL", "SUITECRM_CLIENT_ID", "SUITECRM_CLIENT_SECRET" ], "bins": [ "jq", "curl" ] }, "primaryEnv": "SUITECRM_CLIENT_ID" } }
- description
- Manage SuiteCRM records via the V8 REST API. Use for any CRM task: creating, reading, updating, or deleting Contacts, Leads, Accounts, Opportunities, Cases, and other modules. Also use when querying CRM data, managing relationships between records, or looking up customer information.
02 资源文件 14
- 参考文档agent_eval/README.md724 B
- 参考文档agent_eval/task_suitecrm_usability.md7.3 KB
- 脚本env_audit/check_environment.sh2.5 KB
- 脚本env_audit/fix_environment.sh3.2 KB
- 参考文档examples/draft-followup-from-case-note/README.md3.7 KB
- 参考文档examples/flag-stale-accounts/README.md4.3 KB
- 参考文档examples/README.md2.0 KB
- 参考文档examples/summarize-account-activity/README.md3.7 KB
- 参考文档mock_assets/api_handlers/api_crm_rivermarksystems_com.json7.0 KB
- 参考文档mock_assets/reference/modules.md6.8 KB
- 脚本mock_assets/skill_hooks/00_prepare_suitecrm.sh1.5 KB
- 参考文档MOCK_SKILL_USAGE.md2.0 KB
- 参考文档references/modules.md6.8 KB
- 脚本scripts/noop.sh70 B
03 SKILL.md 正文
SuiteCRM
Manage CRM records via the SuiteCRM V8 JSON:API. All operations use curl + jq.
Important: When piping curl to
jq, use only simple jq selectors (.data,.attributes,.data[]). Do NOT use+for string concatenation in jq — it causes shell quoting errors. Just output.attributesand let the user read the fields.
Authentication
SuiteCRM uses OAuth2. Get a token before making API calls:
TOKEN=$(curl -s -X POST "$SUITECRM_URL/Api/access_token" \
-d "grant_type=password&client_id=$SUITECRM_CLIENT_ID&client_secret=$SUITECRM_CLIENT_SECRET&username=$SUITECRM_USER&password=$SUITECRM_PASS" \
| jq -r '.access_token')
Tokens expire in 1 hour. Re-fetch if you get a 401.
The token endpoint requires
application/x-www-form-urlencoded(curl default). Do NOT send JSON to it.
All subsequent requests need:
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json"
Core Operations
List records
curl -s "$SUITECRM_URL/Api/V8/module/{Module}" \
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json" | jq '.data[] | .attributes'
With pagination and field selection:
curl -s "$SUITECRM_URL/Api/V8/module/Contacts?fields[Contacts]=first_name,last_name,email1&page[size]=10&page[number]=1" \
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json" | jq '.data'
Shell quoting: When piping to
jq, keep expressions simple. Avoid+string concatenation — use.attributesdirectly and let the full JSON show. For complex jq, write the filter to a temp file first.
Get a single record
curl -s "$SUITECRM_URL/Api/V8/module/{Module}/{id}" \
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json" | jq
Create a record
curl -s -X POST "$SUITECRM_URL/Api/V8/module" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"{Module}","attributes":{...}}}' | jq
Update a record
curl -s -X PATCH "$SUITECRM_URL/Api/V8/module" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"{Module}","id":"{id}","attributes":{...}}}' | jq
Delete a record
curl -s -X DELETE "$SUITECRM_URL/Api/V8/module/{Module}/{id}" \
-H "Authorization: Bearer $TOKEN" | jq
Module Examples
Contacts
# Create
curl -s -X POST "$SUITECRM_URL/Api/V8/module" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"Contacts","attributes":{"first_name":"Jane","last_name":"Smith","email1":"jane@example.com","phone_work":"555-0100","title":"CTO","department":"Engineering"}}}' | jq
# Search by last name
curl -s "$SUITECRM_URL/Api/V8/module/Contacts?filter[last_name][eq]=Smith&fields[Contacts]=first_name,last_name,email1,phone_work" \
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json" | jq
Leads
# Create
curl -s -X POST "$SUITECRM_URL/Api/V8/module" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"Leads","attributes":{"first_name":"Bob","last_name":"Jones","email1":"bob@example.com","phone_work":"555-0200","status":"New","lead_source":"Web Site","account_name":"Acme Corp"}}}' | jq
Accounts
# Create
curl -s -X POST "$SUITECRM_URL/Api/V8/module" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"Accounts","attributes":{"name":"Acme Corp","phone_office":"555-0300","industry":"Technology","billing_address_city":"San Francisco","billing_address_state":"CA","billing_address_country":"USA"}}}' | jq
Opportunities
# Create
curl -s -X POST "$SUITECRM_URL/Api/V8/module" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"Opportunities","attributes":{"name":"Q1 Deal","amount":"50000","date_closed":"2026-06-30","sales_stage":"Prospecting","lead_source":"Web Site"}}}' | jq
Cases
# Create
curl -s -X POST "$SUITECRM_URL/Api/V8/module" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"Cases","attributes":{"name":"Login issue","status":"New","priority":"High","type":"User","description":"Customer cannot log in since yesterday"}}}' | jq
Relationships
# Get contacts linked to an account
curl -s "$SUITECRM_URL/Api/V8/module/Accounts/{id}/relationships/contacts" \
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json" | jq
# Link a contact to an account
curl -s -X POST "$SUITECRM_URL/Api/V8/module/Accounts/{accountId}/relationships" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/vnd.api+json" \
-d '{"data":{"type":"Contacts","id":"{contactId}"}}' | jq
Filtering & Sorting
# Filter: accounts in Technology industry
?filter[industry][eq]=Technology
# Filter: opportunities > $10k
?filter[amount][gt]=10000
# Sort by date descending
?sort=-date_entered
# Sort by last name ascending
?sort=last_name
# Combine
?filter[status][eq]=New&sort=-date_entered&page[size]=5
Filter operators: eq, neq, gt, gte, lt, lte
Metadata
# List all available modules
curl -s "$SUITECRM_URL/Api/V8/meta/modules" \
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json" | jq
# Get field definitions for a module
curl -s "$SUITECRM_URL/Api/V8/meta/fields/{Module}" \
-H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.api+json" | jq
Key Modules
Contacts, Leads, Accounts, Opportunities, Cases, Calls, Meetings, Tasks, Notes, Emails, Campaigns, Documents, Projects
Field reference
For detailed field lists per module, read references/modules.md.
Notes
- All IDs are UUIDs
- Module names are PascalCase and plural (Contacts, not contact)
- Create/Update use
POST/PATCHto/Api/V8/module(no module name in URL) - The
typefield in the JSON body must match the module name exactly - Tokens expire in 1 hour; re-authenticate on 401
- Avoid
!or other special chars in passwords used for API auth
04 同仓库更多 Skills
secureclaw
Security skill for OpenClaw agents (7-framework aligned). 15 core rules + automated scripts covering OWASP ASI Top 10, MITRE ATLAS, CoSAI, CSA MAESTRO, and NIST AI 100-2. Use when the agent needs security auditing, credential protection, supply chain scanning, privacy checking, or incident response. By Adversa AI (https://adversa.ai). v2.2.0.
secureclaw
Security hardening toolkit for OpenClaw. Run audits, apply fixes, scan skills, monitor costs and memory integrity.
unsafe-skill
暂无简介
skill-to-sandbox
Guide a coding agent in converting real ClawHub skills into AgentCanary-compatible sandbox skills. Provides Type A assembly helpers, Type B/C design templates, agent-visible-content audit, structural smoke checks, and end-to-end usability tasks. Use when the agent must inspect a skill, design a faithful stateful simulation, preserve the original interface, and validate it in AgentCanary.
ssh-keygen-helper
Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication
ssh-keygen-helper
Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication