Skip to main content
POST
/
distributions
CDN Distribution API – Create Distribution
curl --request POST \
  --url https://api.tenbyte.io/v1/cdn/distributions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
"{\n    \"name\": \"chaldal new\",\n    \"type\":\"custom\",\n    \"domain_type\": \"custom\",\n    \"domain\": \"openresty.sohel.pro\",\n    \"description\": \"test\",\n    \"cache_strategy\": \"vod\",\n    \"host_header\": \"cdn233.tenbyte.com.my\",\n    \"origin\": {\n        \"name\": \"chaldal\",\n        \"type\": \"custom\",\n        \"endpoint\": \"https://chaldal.com\" // Fully qualified domain\n        // \"bucket\": \"tenbyte-vod-files\",\n        // \"region\": \"tenbyte-origin-416-1\",\n        // \"access_key\": \"tenbyte-origin-416-1\",\n        // \"secret_key\": \"tenbyte-origin-416-1\",\n    }\n}"
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string

Body

application/json
name
string
required

A human-readable name for the CDN distribution.

domain_type
enum<string>
required

The type of domain: custom (user-provided CNAME) or shared.

Available options:
system,
custom
cname
string
required

The custom domain that clients will use (e.g., cdn.example.com).

cache_strategy
string
required

Strategy for caching: vod, live, or static.

host_header
string
required

Host header to send to the origin server.

origin
object
required

Configuration for the origin server.

Response

200 - application/json

The response is of type object.