DocumentationAPI Reference

API Reference β€” V1

Complete reference for the Mado Hosting Reseller API. Manage servers, backups, files and more programmatically.

Base URL

https://www.mado-hosting.com/api/v1

Authentication

All API requests must include a valid API key in the Authorization header. API keys are prefixed with rsk_ and can be created in the Reseller Dashboard.

curl -X GET "https://www.mado-hosting.com/api/v1/servers" \
  -H "Authorization: Bearer rsk_your_api_key_here" \
  -H "Content-Type: application/json"

Response Format

All successful responses follow a consistent envelope with a data object. Paginated endpoints additionally include a pagination object.

Success

{
  "data": {
    "servers": [...]
  }
}

Error

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "name is required",
    "requestId": "req_abc123"
  }
}

Pagination

{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 48,
    "totalPages": 2,
    "hasNext": true,
    "hasPrev": false
  }
}

Headers

HeaderDescription
AuthorizationRequired. Bearer token with API key. Bearer rsk_...
Content-TypeRequired for POST/PUT/PATCH. application/json
X-Request-IdResponse header. Unique request ID for debugging.
Idempotency-KeyOptional. Prevents duplicate execution (24h cache).
If-MatchOptimistic locking for PATCH /servers/[id]. Pass version number.
X-RateLimit-LimitResponse. Maximum requests per window.
X-RateLimit-RemainingResponse. Remaining requests in current window.

Error Codes

All errors follow the same format with a machine-readable code and human-readable message.

HTTPCodeDescription
400VALIDATION_ERRORInvalid parameters or missing required fields
400LIMIT_EXCEEDEDQuota/resource limit reached (backups, schedules, etc.)
400NO_CHANGEResize to same size
400INVALID_RAMRAM not in valid increments (0.5GB)
400BELOW_MIN_RAMRAM below pricing minimum
400ABOVE_MAX_RAMRAM above pricing maximum
400RAM_LIMIT_EXCEEDEDTotal reseller RAM quota exceeded
400DISK_USAGE_EXCEEDEDCannot downgrade due to disk usage
401AUTH_REQUIREDMissing or invalid API key
403FORBIDDENInsufficient permissions
403ADDON_REQUIREDFeature requires an addon or Premium plan
403FEATURE_UNAVAILABLEFeature not available for this plan
403DISTRIBUTION_RESTRICTEDMod does not allow third-party downloads
404SERVER_NOT_FOUNDServer not found or does not belong to reseller
404USER_NOT_FOUNDUser not found (subuser)
404NOT_FOUNDResource not found at Pelican level
409CONFLICTVersion mismatch or duplicate entity
409SERVER_SUSPENDEDServer is suspended β€” write operations blocked
409SERVER_INSTALLINGServer is still provisioning
409ALREADY_EXISTSEntity already exists (e.g. subuser)
422LIMIT_REACHEDPelican-level limit reached
500CONFIG_ERRORServer configuration missing (e.g. DB host)
500INTERNAL_ERRORInternal server error
500UPLOAD_FAILEDMod upload to server failed
503SERVICE_UNAVAILABLENo available nodes, ports, or panel unavailable

Rate Limiting

The API is rate-limited. Check response headers for your current limit status.

When rate-limited, you receive a 429 Too Many Requests. Wait until X-RateLimit-Reset expires before sending more requests.

Available Endpoints