Introduction
Welcome to the 5centsCDN API — a complete RESTful interface for managing your CDN infrastructure.
5centsCDN gives you a powerful, simple API to programmatically manage your entire CDN infrastructure — delivery zones, live streams, video encoding, storage, DNS, and analytics — all from one place.
What you can do
Base URL
All API requests go to a single base URL. The version prefix /v2 is required on every request.
https://api.5centscdn.com/v2
All requests must be made over HTTPS. HTTP requests are rejected automatically.
HTTP methods
The 5centsCDN API accepts only two real HTTP methods: GET and POST.
For operations that modify or delete a resource, you use POST with a _METHOD field in the request body to declare the intended operation.
| HTTP Method | _METHOD in body | Operation |
|---|---|---|
GET | (not required) | Read / list a resource |
POST | (not required) | Create a new resource |
POST | "_METHOD": "PUT" | Update an existing resource |
POST | "_METHOD": "DELETE" | Delete a resource |
Update operation — Send a POST request and include "_METHOD": "PUT" in the JSON body. The endpoint URL stays the same as the create endpoint.
Delete operation — Send a POST request and include "_METHOD": "DELETE" in the JSON body. Omitting _METHOD on a delete endpoint will create a resource instead of deleting it.
Examples
curl -X POST https://api.5centscdn.com/v2/streams/push/settings \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"_METHOD": "PUT",
"name": "updated-stream-name"
}'
curl -X POST https://api.5centscdn.com/v2/streams/push/12345 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"_METHOD": "DELETE"
}'
curl -X POST https://api.5centscdn.com/v2/streams/push \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-new-stream"
}'
curl -X GET https://api.5centscdn.com/v2/streams/push/12345 \
-H "X-API-KEY: YOUR_API_KEY"
API modules
| Module | Description | Base Path |
|---|---|---|
| Live Streams | Push and pull live stream management | /streams |
| Zones | HTTP and VOD delivery zones | /zones |
| Video Encoding | Encoding jobs and presets | /transcoding |
| SimpleDNS | DNS zone and record management | /dns |
| VideoPlayer & Analytics | Player config, embed, and analytics | /players/5centscdn/analytics |
| Accounts | Settings, sub-users, and billing | /account |
| Analytics | Traffic and bandwidth reports | /analytics/traffic |
| Edge Rules | Path-based routing and caching rules | /zones/http/pull/{zoneId}/rules |
Response format
Every response is JSON with a consistent envelope.
{
"status": "success",
"data": {
"id": 12345,
"name": "my-zone",
"status": "active"
}
}
{
"status": "error",
"errors": [
{
"code": 401,
"message": "Invalid or missing API key."
}
]
}
HTTP status codes
| Code | Status | Meaning |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid input — check your parameters |
401 | Unauthorized | API key missing or invalid |
403 | Forbidden | Insufficient account permissions |
404 | Not Found | Resource does not exist |
429 | Too Many Requests | Rate limit exceeded — slow down |
500 | Server Error | Unexpected error — contact support |
Rate limiting
Each API key is limited to 120 requests per minute. Exceeding this returns HTTP 429.
Implement exponential backoff in automated scripts to handle this gracefully.