DocumentationAPI Reference
Resize
Get available resize options and scale your server.
GET
/servers/:id/resizeGet available resize options with costs, current usage, and quotas.
curl "https://www.mado-hosting.com/api/v1/servers/srv_abc123/resize" \
-H "Authorization: Bearer rsk_your_key"Execute Resize
POST
/servers/:id/resizeScale server to new RAM size. Server is automatically restarted.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
newRamGb | number | Yes | New RAM size in GB (even numbers: 2, 4, 6, ..., 32) |
curl -X POST "https://www.mado-hosting.com/api/v1/servers/srv_abc123/resize" \
-H "Authorization: Bearer rsk_your_key" \
-H "Content-Type: application/json" \
-d '{ "newRamGb": 8 }'For downgrades, current disk usage is checked against the new limit. If it exceeds, DISK_USAGE_EXCEEDED is returned.
Error Codes
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_RAM | RAM not in valid increments |
| 400 | NO_CHANGE | Same size as current |
| 400 | BELOW_MIN_RAM | Below pricing minimum |
| 400 | ABOVE_MAX_RAM | Above pricing maximum |
| 400 | RAM_LIMIT_EXCEEDED | Total RAM quota exceeded |
| 400 | DISK_USAGE_EXCEEDED | Disk usage exceeds new limit |