Overview
HiPanel has a REST API that returns JSON. The web interface runs on this same API, so anything you do in the panel can be done from a script, CI or an AI agent.
- Base URL:
https://hipanel.cloud/api/v1 - OpenAPI spec: https://hipanel.cloud/api/v1/openapi.json
- Try it in Swagger UI: https://hipanel.cloud/api/v1/docs
Authentication
Create an API token under Settings → API tokens and choose the scopes you need. The token is shown only once; HiPanel only stores a hash. Send it in the Authorization header on every request.
curl https://hipanel.cloud/api/v1/servers \ -H "Authorization: Bearer tc_live_xxxxxxxxxxxxxxxx" \ -H "X-Team-Id: 7f3c2a10-…" # optionalThe X-Team-Id header picks a team when you belong to several; it defaults to the token's team. Revoke a token at any time and requests using it get a 401.
Token scopes
A write scope includes the matching read scope. A token's effective permissions are its scopes intersected with its creator's current role, checked on every request: a token can never do more than the person who created it.
| Scope | Allows |
|---|---|
* | Everything (only use for personal tokens) |
read:servers / write:servers | View / create, edit, reboot servers; databases, firewall, cron, daemons, software |
read:sites / write:sites | View / create, edit, delete sites; SSL, PHP, domains, environment variables |
write:deployments | Deploy, roll back, upload code to deploy |
read:tasks / write:tasks | View / retry, cancel tasks |
read:git / write:git | View / manage Git connections |
read:backups / write:backups | View / run backups, restore, change schedules |
read:monitoring / write:monitoring | View metrics and logs / configure monitoring |
Response format
Every response is a JSON envelope. Paginated lists also include meta.
{ "success": true, "message": "ok", "data": [ … ], "meta": { "page": 1, "per_page": 50, "total": 123 } }{ "success": false, "message": "Domain shop.vn is already used on this server", "errors": { "domain": ["taken"] } }| Code | Meaning |
|---|---|
400 | The request body is invalid |
401 | Missing or revoked token |
403 | The token or role lacks permission; errors.permission or errors.entitlement says why |
404 | Not found, or not in your team |
409 | Conflict (for example, the domain already exists on the server) |
422 | A value is not valid for this operation |
429 | Rate limit exceeded; wait for the time in the Retry-After header |
500 | An error on HiPanel's side |
Async tasks
Operations that run on a server (creating a site, issuing SSL, deploying, backing up…) return 202 with data.task. Poll GET /tasks/{id} until status is succeeded or failed. Failed tasks keep a log you can read, and can be retried.
queuedrunningsucceededfailed
Rate limits
By default, 60 requests per minute per token, user or IP address. Going over returns 429 with a Retry-After header (seconds to wait).
Main resources
Paths are relative to the base URL. The complete list, with the schema of every field, is in the OpenAPI spec.
| Method | Path | Description |
|---|---|---|
GET | /servers | List the team's servers |
POST | /servers | Create or add a server (Tino VPS, Proxmox, your own server) |
GET | /servers/{id} | Server details |
POST | /servers/{id}/actions/reboot | Reboot a server |
GET | /servers/{id}/metrics | CPU, memory and disk metrics |
GET · POST | /servers/{id}/sites | List, create sites |
GET · POST | /servers/{id}/databases | List, create databases |
GET · POST | /servers/{id}/firewall | List, add firewall rules |
GET · POST | /servers/{id}/cron | List, add cron jobs |
GET · POST | /servers/{id}/daemons | List, add daemons (Supervisor) |
GET | /sites/{id} | Site details |
POST | /sites/{id}/ssl | Issue Let's Encrypt SSL |
POST | /sites/{id}/php-version | Switch PHP version |
POST | /sites/{id}/actions/{action} | enable, disable, purge-cache |
GET | /sites/{id}/logs | Read access and error logs |
GET · PUT | /sites/{id}/env | Read, write environment variables (encrypted at rest) |
POST | /sites/{id}/deployments | Deploy |
POST | /sites/{id}/rollback | Roll back to the previous release |
POST | /sites/{id}/backups | Back up now |
POST | /sites/{id}/restore | Restore in place |
GET | /tasks/{id} | Task status and log |
POST | /tasks/{id}/retry | Retry a failed task |
Examples
Create a WordPress site, wait for the task, then issue SSL:
# 1. Create a WordPress site: returns 202 with a taskcurl -X POST https://hipanel.cloud/api/v1/servers/$SERVER_ID/sites \ -H "Authorization: Bearer $HIPANEL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "shop", "domain": "shop.vn", "aliases": ["www.shop.vn"], "site_type": "wordpress", "php_version": "8.3", "wordpress": { "title": "Shop", "admin_user": "admin", "admin_email": "you@shop.vn", "locale": "vi" } }'# 2. Poll the task until it finishescurl https://hipanel.cloud/api/v1/tasks/$TASK_ID -H "Authorization: Bearer $HIPANEL_TOKEN"# 3. Issue a Let's Encrypt certificatecurl -X POST https://hipanel.cloud/api/v1/sites/$SITE_ID/ssl \ -H "Authorization: Bearer $HIPANEL_TOKEN" \ -H "Content-Type: application/json" -d '{"email": "you@shop.vn"}'Deploy and roll back from CI:
# Deploy the configured branch, then roll back if neededcurl -X POST https://hipanel.cloud/api/v1/sites/$SITE_ID/deployments -H "Authorization: Bearer $HIPANEL_TOKEN"curl -X POST https://hipanel.cloud/api/v1/sites/$SITE_ID/rollback -H "Authorization: Bearer $HIPANEL_TOKEN"