UnderHost
Knowledgebase Docs

CloudPanel API Access: Automate server management

CloudPanel API allows automation of server tasks. Learn about API authentication, available endpoints, and use cases for VPS automation.

On this page

CloudPanel API allows you to automate server management tasks via HTTP requests. Instead of logging into the CloudPanel interface, you can create scripts to manage websites, databases, and users programmatically.

API availability

CloudPanel API is available on:

  • Cloud VPS with CloudPanel installed
  • Dedicated Servers with CloudPanel

Not available on:

  • Shared hosting (no API access)
  • cPanel shared hosting

Contact UnderHost support to verify API availability on your specific VPS plan.

Authentication (API tokens)

CloudPanel API uses token-based authentication:

  1. Log in to CloudPanel control panel
  2. Go to Settings → API
  3. Click Create API Token
  4. Name the token (e.g., "Backup Automation")
  5. Copy the token immediately (you won't see it again)
  6. Store securely (like a password)

Use token in API requests:

curl -H "Authorization: Bearer YOUR_API_TOKEN" \\
  https://your-vps-ip:8080/api/v1/endpoint

Common endpoints

EndpointMethodPurpose
/api/v1/domainsGETList all domains
/api/v1/domainsPOSTCreate new domain
/api/v1/domains/{id}DELETEDelete domain
/api/v1/databasesGETList databases
/api/v1/databasesPOSTCreate database
/api/v1/ssl-certificatesGETList SSL certificates
/api/v1/backupsGETList backups

See CloudPanel's official documentation for complete endpoint list.

Use cases

  • Automated domain creation: Create domains via script when customers sign up
  • Backup automation: Trigger backups from external script
  • Database management: Create/delete databases programmatically
  • Server monitoring: Query server status from external monitoring tool
  • SSL automation: Renew or manage SSL certificates
  • Multi-server management: Control multiple CloudPanel servers from one script

API documentation

CloudPanel official API documentation: Visit CloudPanel's website for complete API reference, including:

  • All available endpoints
  • Request/response formats (JSON)
  • Error codes and handling
  • Rate limits
  • Code examples in various languages
API is for advanced users

CloudPanel API is powerful but requires programming knowledge. For most users, the web interface is simpler and safer. Only use the API if you need automation.

Related: CloudPanel overview | VPS management

Was this article helpful?

Need CloudPanel on a server?

Use CloudPanel on an UnderHost VPS or dedicated server for fast PHP app and WordPress hosting without a heavy panel stack.

Related articles

Back to CloudPanel