Integrate our comprehensive hosting management capabilities into your systems with our robust API. Provision hosting accounts automatically with credit management.
Base URL:
https://reseller.co.tz/api/hosting-public.php
https://reseller.co.tz/api/hosting-public.php
X-API-KEY: your_api_key{ "api_key": "your_api_key" }Request:
{
"action": "getPackages"
}
Response:
{
"status": "success",
"data": [
{
"id": 1,
"name": "Basic Hosting",
"description": "Perfect for small websites",
"disk_space_mb": 5000,
"bandwidth_mb": 50000,
"max_accounts": 5,
"price_monthly": 25000,
"price_yearly": 250000,
"directadmin_package": "basic"
},
{
"id": 2,
"name": "Professional Hosting",
"description": "Ideal for growing businesses",
"disk_space_mb": 20000,
"bandwidth_mb": 200000,
"max_accounts": 20,
"price_monthly": 75000,
"price_yearly": 750000,
"directadmin_package": "professional"
}
]
}
Request:
{
"action": "createAccount",
"package_id": 1,
"domain": "example.com",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+255123456789"
}
Response:
{
"status": "success",
"message": "Hosting account created successfully",
"data": {
"account_id": 123,
"username": "example_user",
"password": "generated_password_123",
"domain": "example.com",
"control_panel_url": "https://server.example.com:2222/CMD_LOGIN",
"package_name": "Basic Hosting",
"price_charged": 25000
}
}
Request:
{
"action": "getAccount",
"account_id": 123
}
Response:
{
"status": "success",
"data": {
"id": 123,
"domain": "example.com",
"username": "example_user",
"status": "active",
"package_name": "Basic Hosting",
"server_name": "Server-01",
"client_name": "John Doe",
"client_email": "john@example.com",
"client_phone": "+255123456789",
"control_panel_url": "https://server.example.com:2222/CMD_LOGIN",
"created_at": "2024-03-20 12:00:00",
"disk_space_mb": 5000,
"bandwidth_mb": 50000
}
}
Request:
{
"action": "listAccounts"
}
Response:
{
"status": "success",
"data": [
{
"id": 123,
"domain": "example.com",
"username": "example_user",
"status": "active",
"package_name": "Basic Hosting",
"server_name": "Server-01",
"created_at": "2024-03-20 12:00:00"
},
{
"id": 124,
"domain": "test.com",
"username": "test_user",
"status": "pending",
"package_name": "Professional Hosting",
"server_name": "Server-02",
"created_at": "2024-03-21 10:30:00"
}
]
}
Request:
{
"action": "getAccountStatus",
"account_id": 123
}
Response:
{
"status": "success",
"data": {
"account_id": 123,
"status": "active",
"created_at": "2024-03-20 12:00:00",
"updated_at": "2024-03-20 12:05:00"
}
}
pending - Account creation in progressactive - Account is active and ready to usesuspended - Account is suspendedfailed - Account creation failed{
"status": "error",
"message": "Specific error message"
}
Invalid API key - Authentication failedMissing required field: package_id - Validation errorInvalid hosting package - Package not found or inactiveInsufficient credit balance - Not enough credits (shows required and available amounts)Invalid domain name format - Domain validation failedAccount not found - Account doesn't exist or access denied