fattain-naime/cwp-superpowers/cwp-api
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "use CWP API", "create API key", "manage accounts via API", "automate CWP tasks", "list API endpoints", "integrate with CWP", "use cwp_api script", "configure API access", "create account via API", "manage databases via API", "set up billing integration", "configure WHMCS", or needs to interact with the CWP API or automate CWP operations.
Install
npx vskill@latest install fattain-naime/cwp-superpowers/cwp-apiSKILL.md
CWP API Integration
Interact with the CWP REST API and shell-based API for automation, account management, and third-party integrations. Handle API endpoints, authentication, and common automation workflows.
If the user provides specific details via "$ARGUMENTS", focus the response on that API task. For example: /cwp-pro-centos:cwp-api create account for example.com will focus on the account creation API endpoint.
API Overview
Use two API interfaces for CWP automation:
| Interface | Port | Protocol | |
|---|---|---|---|
| REST API | 2304 | HTTPS | |
| Shell API | N/A | CLI via /scripts/cwp_api |
API Configuration
Setup
- Navigate to CWP Settings -> API Manager
- Generate an API key
- Whitelist allowed IP addresses
- Note the API base URL
Base URL
Authentication
All API requests require the key parameter with your API key.
Request Format
- Method: POST for all endpoints
- Response: JSON or XML
REST API Endpoints
Account Management
| Endpoint | Operations | |
|---|---|---|
/v1/account | add, update, delete, list, suspend, unsuspend | |
/v1/accountdetail | list | |
/v1/accountquota | list | |
/v1/account_metadata | list | |
/v1/changepack | update | |
/v1/changepass | update |
Database Management
| Endpoint | Operations | |
|---|---|---|
/v1/databasemysql | add, delete, list | |
/v1/usermysql | add, delete, list |
SSL Management
| Endpoint | Operations | |
|---|---|---|
/v1/autossl | add, list, delete, renew |
Domain Management
| Endpoint | Operations | |
|---|---|---|
/v1/admindomains | add, delete, list |
Email Management
| Endpoint | Operations | |
|---|---|---|
/v1/emailadmin | list |
Cron Jobs
| Endpoint | Operations | |
|---|---|---|
/v1/cronjobsusers | add, delete, list |
Packages
| Endpoint | Operations | |
|---|---|---|
/v1/packages | add, update, delete, list |
Server Information
| Endpoint | Operations | |
|---|---|---|
/v1/typeserver | list | |
/v1/quotalimit | list |
API Usage Examples
Create Account
List Accounts
Suspend Account
Create Database
Shell API (/scripts/cwp_api)
The shell API provides command-line access to CWP functions.
Account Operations
Web Server Operations
Application Operations
Database Operations
PHP API Client
Installation
Usage
Action Hooks
Hooks allow executing custom code on CWP events.
DNS Hooks
Location: /usr/local/cwpsrv/htdocs/resources/admin/hooks/dns/
| Hook | Trigger | |
|---|---|---|
dns_serial_update | Zone additions, subdomain changes | |
dns_new_zone_add | New DNS zone created | |
dns_new_subdomain_add | New subdomain created | |
dns_zone_remove | Domain deleted | |
dns_subdomain_remove | Subdomain deleted |
Account Hooks
Location: /usr/local/cwpsrv/htdocs/resources/admin/hooks/account/
| Hook | Trigger | |
|---|---|---|
account_new | Account created | |
account_remove | Account deleted | |
account_suspend | Account suspended | |
account_unsuspend | Account reactivated | |
account_new_domain | Domain added | |
account_remove_domain | Domain removed | |
account_new_subdomain | Subdomain added | |
account_remove_subdomain | Subdomain removed |
Hook Example
Billing Integration
WHMCS Integration
WHMCS Configuration:
- Setup -> Products/Services -> Servers
- Type: Cwp7
- Enter CWP server IP and API key
Other Supported Systems
- WiseCP
- HostBill
- Blesta
- Clientexec
Automation Workflows
New Server Provisioning
Backup Script
API Security
- Whitelist only necessary IP addresses
- Use strong API keys
- Rotate API keys periodically
- Monitor API access logs
- Use HTTPS only (port 2304)
- Never expose API key in client-side code
Troubleshooting
| Issue | Solution | |
|---|---|---|
| API connection refused | Verify port 2304 is open in CSF | |
| Authentication failed | Verify API key and IP whitelist | |
| Timeout errors | Check server load, increase timeout | |
| JSON parse error | Check response format, verify endpoint | |
| Hook not executing | Check file permissions, verify PHP syntax |
Diagnostic Commands
Additional Resources
references/api-endpoints.md-- Complete API endpoint referencereferences/api-examples.md-- API request/response examplesreferences/hooks-reference.md-- All available action hooks
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cwp-api/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fattain-naime/cwp-superpowers/cwp-api)