DocumentationAPI Reference
Subusers
Create, update and remove subusers. Roles: ADMIN, DEV, CUSTOM.
GET
/servers/:id/subusersList all server subusers.
curl "https://www.mado-hosting.com/api/v1/servers/srv_abc123/subusers" \
-H "Authorization: Bearer rsk_your_key"Create Subuser
Limit-checked: Subuser limit per plan
Requires extra_subusers (Budget requires addon) or Premium plan
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "create" | No | Default if not specified |
email | string | Yes | User email |
role | string | Yes | ADMIN, DEV, CUSTOM |
customPermissions | string[] | No | Required if role is CUSTOM (permission scopes) |
curl -X POST "https://www.mado-hosting.com/api/v1/servers/srv_abc123/subusers" \
-H "Authorization: Bearer rsk_your_key" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"role": "DEV"
}'Update Subuser
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "update" | Yes | |
subuserId | string | Yes | Subuser ID |
role | string | No | ADMIN, DEV, CUSTOM |
customPermissions | string[] | No | New permissions (if role is CUSTOM) |
Delete Subuser
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "delete" | Yes | |
subuserId | string | Yes | Subuser ID |
Error Codes
| HTTP | Code | Description |
|---|---|---|
| 400 | LIMIT_EXCEEDED | Subuser limit reached |
| 403 | ADDON_REQUIRED | Budget plan requires subuser addon |
| 404 | USER_NOT_FOUND | User not found |
| 409 | ALREADY_EXISTS | Subuser already exists |