DocumentationAPI Reference
Power & Console
Start, stop, restart servers and send console commands.
POST
/servers/:id/powerExecute a power action on the server.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | string | Yes | start, stop, restart or kill |
curl -X POST "https://www.mado-hosting.com/api/v1/servers/srv_abc123/power" \
-H "Authorization: Bearer rsk_your_key" \
-H "Content-Type: application/json" \
-d '{ "action": "restart" }'kill forces an immediate process termination. Use stop for a graceful shutdown.
POST
/servers/:id/commandSend a console command to the running server.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
command | string | Yes | Console command (max 2000 chars) |
curl -X POST "https://www.mado-hosting.com/api/v1/servers/srv_abc123/command" \
-H "Authorization: Bearer rsk_your_key" \
-H "Content-Type: application/json" \
-d '{ "command": "say Hello from the API!" }'| HTTP | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid action or empty command |
| 404 | SERVER_NOT_FOUND | Server not found |
| 409 | SERVER_INSTALLING | Server still provisioning |