Introduction to the Cd hosting API for programmatic server management.
The Cd hosting API allows you to programmatically manage your servers, plans, and account.
All API requests require a Bearer token:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.cdhosting.com/v1/servers
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.cdhosting.com/v1/servers
Generate API keys from your dashboard under Account Settings → API Keys.
https://api.cdhosting.com/v1
https://api.cdhosting.com/v1
| Plan | Requests/min | Requests/day |
|---|---|---|
| Basic | 30 | 1,000 |
| Pro | 60 | 10,000 |
| Enterprise | 120 | 50,000 |
| Ultimate | 300 | Unlimited |
GET /v1/servers
# Response
{
"servers": [
{
"id": "srv_abc123",
"name": "production-web-01",
"status": "running",
"ip": "192.168.1.100",
"plan": "pro",
"location": "london",
"created_at": "2025-01-15T10:30:00Z"
}
]
}
GET /v1/servers
# Response
{
"servers": [
{
"id": "srv_abc123",
"name": "production-web-01",
"status": "running",
"ip": "192.168.1.100",
"plan": "pro",
"location": "london",
"created_at": "2025-01-15T10:30:00Z"
}
]
}
GET /v1/servers/:id
# Response
{
"id": "srv_abc123",
"name": "production-web-01",
"status": "running",
"ip": "192.168.1.100",
"plan": "pro",
"specs": {
"cpu_cores": 4,
"ram_gb": 16,
"storage_gb": 250,
"storage_type": "nvme"
},
"location": {
"city": "London",
"country": "UK",
"datacenter": "LON-01"
},
"network": {
"bandwidth_tb": 10,
"ipv4": "192.168.1.100",
"ipv6": "2001:db8::1"
}
}
GET /v1/servers/:id
# Response
{
"id": "srv_abc123",
"name": "production-web-01",
"status": "running",
"ip": "192.168.1.100",
"plan": "pro",
"specs": {
"cpu_cores": 4,
"ram_gb": 16,
"storage_gb": 250,
"storage_type": "nvme"
},
"location": {
"city": "London",
"country": "UK",
"datacenter": "LON-01"
},
"network": {
"bandwidth_tb": 10,
"ipv4": "192.168.1.100",
"ipv6": "2001:db8::1"
}
}
POST /v1/servers/:id/reboot
# Response
{
"status": "rebooting",
"estimated_time": "30s"
}
POST /v1/servers/:id/reboot
# Response
{
"status": "rebooting",
"estimated_time": "30s"
}
POST /v1/servers/:id/power
Content-Type: application/json
{
"action": "shutdown" // or "start", "restart"
}
POST /v1/servers/:id/power
Content-Type: application/json
{
"action": "shutdown" // or "start", "restart"
}
Official SDKs are available for:
npm install @cdhosting/sdkpip install cdhostinggo get github.com/cdhosting/go-sdkcomposer require cdhosting/sdk