CrownPanel's API allows you to manage your VPS programmatically - including actions like power control, hostname changes, snapshot management, and more.
POST method to https://api.crownpanel.comYou can use the API with:
curlIdeal for automation, integration into management panels, or performing bulk operations across multiple VPS instances.
Use this API call to shut down (power off) your VPS instance safely.
This gracefully powers off the VPS, similar to issuing a shutdown command from the operating system.
| Key | Variable | Notes | Required |
|---|---|---|---|
API_KEY |
YOUR_API_KEY |
Replace YOUR_API_KEY with your actual API key provided in "Account Settings", under the API section. |
β Yes |
QUERY |
shutdown |
The query action to perform shutdown. | β Yes |
VMID |
YOUR_VMID |
Replace YOUR_VMID with your VPS ID (can be fetched using the βList All VPSβ query). |
β Yes |
β
If YOUR_API_KEY, QUERY & YOUR_VMID parameters are valid, you would get the following output,
{"query_status":"Success","query":"shutdown","query_result":"Success, Task Added. Please wait for 1-2 minutes for it to complete."}
β If YOUR_API_KEY or QUERY or YOUR_VMID are invalid, you would get the following output,
{"query_status":"Error","query":"","query_result":""}
If you prefer to use another language or environment, here are examples for PHP, Python and Node.js:
βοΈ Install (only once): Required to install necessary libraries before running the code.
βοΈ Install (only once): Required to install necessary libraries before running the code.
Need help? Visit our Support Portal or use our live chat.