DocumentationAPI Reference
Backups
Create, restore, delete backups and manage auto-backup.
GET
/servers/:id/backupsList all server backups.
curl "https://www.mado-hosting.com/api/v1/servers/srv_abc123/backups" \
-H "Authorization: Bearer rsk_your_key"Create Backup
POST
/servers/:id/backupsCreate a new backup. Checks backup slot limit.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "create" | No | Default if not specified |
name | string | No | Backup name |
locked | boolean | No | Protect backup from deletion |
ignored | string[] | No | Files/directories to exclude |
curl -X POST "https://www.mado-hosting.com/api/v1/servers/srv_abc123/backups" \
-H "Authorization: Bearer rsk_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "Before Update", "locked": true }'Restore Backup
Requires backup_restore (Premium or addon) or Premium plan
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "restore" | Yes | |
backupId | string | Yes | Backup UUID |
truncate | boolean | No | Delete existing files first |
curl -X POST "https://www.mado-hosting.com/api/v1/servers/srv_abc123/backups" \
-H "Authorization: Bearer rsk_your_key" \
-H "Content-Type: application/json" \
-d '{ "action": "restore", "backupId": "bkp_123", "truncate": true }'Delete Backup
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "delete" | Yes | |
backupId | string | Yes | Backup UUID |
Toggle Lock
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "toggle_lock" | Yes | |
backupId | string | Yes | Backup UUID |
Download URL
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "download_url" | Yes | |
backupId | string | Yes | Backup UUID |
Auto-Backup
Requires auto_backup (Premium or addon) or Premium plan
GET
/servers/:id/auto-backupGet auto-backup status.
POST
/servers/:id/auto-backupEnable or disable auto-backup.
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Auto-backup on/off |
curl -X POST "https://www.mado-hosting.com/api/v1/servers/srv_abc123/auto-backup" \
-H "Authorization: Bearer rsk_your_key" \
-H "Content-Type: application/json" \
-d '{ "enabled": true }'Error Codes
| HTTP | Code | Description |
|---|---|---|
| 400 | LIMIT_EXCEEDED | Backup slot limit reached |
| 403 | ADDON_REQUIRED | Restore/auto-backup requires addon or Premium |
| 404 | SERVER_NOT_FOUND | Server not found |