API Documentation

Integrate WisPanel with your applications using our comprehensive REST API.

Base URL

https://your-server-ip:2083/api/v1

All API endpoints are relative to this base URL.

FTP & Cron Jobs

FTP & Cron Jobs

Two independent tools. Auth: Authorization: Bearer wsp_…


FTP — /api/v1/ftp

List — GET /api/v1/ftp/

Response 200 (verified live):

{ "accounts": [], "total": 0 }

GET /ftp/status → { "installed": true, "running": true, "total_accounts": 0 }.

Create — POST /api/v1/ftp/

Request:

{ "username": "deploy", "password": "S3cure•pass" }

username ≥ 2 chars + password required; domain optional.

Response 201 (verified live — note username is <owner>_<name>):

{ "username": "admin_deploy", "owner": "admin",
  "home_dir": "/home/admin", "quota_mb": 0, "read_only": false,
  "enabled": true, "created_at": "2026-05-18T17:44:36+07:00",
  "updated_at": "2026-05-18T17:44:36+07:00" }

Response 400 (verified live): … "error": "Username must be at least 2 characters" …

DELETE /api/v1/ftp/:id where :id = the full username (e.g. admin_deploy) → 200:

{ "message": "FTP account deleted successfully" }

GET /ftp/:id; PUT /ftp/:id; PUT /ftp/:id/ip-restrictions Request: { "allowed_ips": ["203.0.113.0/24"] }; POST /ftp/:id/toggle (no body); GET | PUT /ftp/:domain/anonymous.


Cron jobs — /api/v1/cronjobs

List — GET /api/v1/cronjobs/

Response 200 (verified live): [], or items (see Create shape).

Create — POST /api/v1/cronjobs/

Request:

{ "name": "nightly", "command": "/usr/bin/php /home/admin/cron.php",
  "cron_expr": "0 3 * * *", "domain": "example.com" }

name, command, cron_expr required; domain optional.

Response 201 (verified live):

{ "id": 5, "name": "nightly",
  "command": "/usr/bin/php /home/admin/cron.php",
  "cron_expr": "0 3 * * *", "enabled": true, "owner": "admin",
  "last_run_at": null, "last_run_ok": false, "next_run_at": null,
  "email_on_complete": "", "email_on_error": false,
  "created_at": "2026-05-18T17:44:36+07:00",
  "updated_at": "2026-05-18T17:44:36+07:00" }

Response 400 (verified live): … "error": "Command is required" …

GET /api/v1/cronjobs/:id (:id = the integer id from the list, e.g. 5); GET /cronjobs/:id/logs; PUT /cronjobs/:id Request: { "enabled": false }; DELETE /cronjobs/:id → 200:

{ "message": "Cron job deleted successfully" }

Conventions → Authentication, Error Handling.

Rate Limiting

API requests are limited to 60 requests per minute per API token.

  • X-RateLimit-Limit: Maximum requests per minute
  • X-RateLimit-Remaining: Remaining requests
  • X-RateLimit-Reset: Unix timestamp when limit resets