DocumentationAPI Reference

Servers

List, create, retrieve, update and delete servers.

GET/servers

List all reseller servers with pagination and filters.

Query Parameters

NameTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoItems per page, max 100 (default: 50)
sortstringNoSort: createdAt, name, ramGb, status (default: createdAt)
orderstringNoDirection: asc or desc (default: asc)
statusstringNoFilter by status
gamestringNoFilter by game
searchstringNoSearch server name (contains)
curl "https://www.mado-hosting.com/api/v1/servers?page=1&limit=10&sort=name&order=asc" \
  -H "Authorization: Bearer rsk_your_key"
POST/servers

Create a new server. Returns 202 (server is provisioning).

Body Parameters

NameTypeRequiredDescription
namestringYesServer name (max 100 chars)
ramGbnumberYesRAM in GB (positive, 0.5GB increments)
gamestringNoGame ID (default: minecraft-java)
gameTypestringNoGame flavor (default: paper)
gameVersionstringNoGame version (default: 1.21.4)
planTierstringNobudget or premium (default: premium)
addonsAddonSelection[]NoArray of addon selections
externalReferencestringNoExternal reference ID (max 255 chars)
curl -X POST "https://www.mado-hosting.com/api/v1/servers" \
  -H "Authorization: Bearer rsk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Server",
    "ramGb": 4,
    "game": "minecraft-java",
    "gameType": "paper",
    "planTier": "premium",
    "addons": [{ "addon": "plugin-installer", "selected": true }]
  }'
The server is provisioned asynchronously. Status may briefly be PROVISIONING after creation.
GET/servers/:id

Get server details including limits, addons, and version number.

curl "https://www.mado-hosting.com/api/v1/servers/srv_abc123" \
  -H "Authorization: Bearer rsk_your_key"
PATCH/servers/:id

Update server (RAM, disk, external reference). Supports optimistic locking with If-Match.

Headers

NameTypeRequiredDescription
If-MatchstringNoVersion number for optimistic locking

Body Parameters

NameTypeRequiredDescription
ramGbnumberNoNew RAM in GB (positive)
diskGbnumberNoNew disk in GB (positive)
externalReferencestringNoExternal reference (max 255 chars)
curl -X PATCH "https://www.mado-hosting.com/api/v1/servers/srv_abc123" \
  -H "Authorization: Bearer rsk_your_key" \
  -H "Content-Type: application/json" \
  -H "If-Match: 1" \
  -d '{ "ramGb": 8 }'
DELETE/servers/:id

Permanently delete a server. Removes from panel, SFTP, and DNS.

curl -X DELETE "https://www.mado-hosting.com/api/v1/servers/srv_abc123" \
  -H "Authorization: Bearer rsk_your_key"
This action is irreversible. All server data, backups, and DNS records will be deleted.

Error Codes

HTTPCodeDescription
400VALIDATION_ERRORInvalid parameters
404SERVER_NOT_FOUNDServer not found
409CONFLICTVersion mismatch (If-Match)
503SERVICE_UNAVAILABLENo available nodes/ports