> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenbyte.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Distribution

> Creates a new CDN distribution for a customer. This API allows configuration of caching behavior, domain mapping, and origin server settings.



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/cdn-openapi.json post /distributions
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers:
  - url: https://api.tenbyte.io/v1
    description: Production server
security:
  - apikey-header-X-API-Key: []
tags:
  - name: Distributions
  - name: SSL Certificate Manage
  - name: Origins/Upstreams Manage
  - name: Purge
  - name: Prefetch
  - name: Cache Rules
  - name: Access Rules
  - name: Analytics
  - name: Http Headers
  - name: Verifications
  - name: IP Addresses List
paths:
  /distributions:
    post:
      tags:
        - Distributions
      summary: Create Distribution
      description: >-
        Creates a new CDN distribution for a customer. This API allows
        configuration of caching behavior, domain mapping, and origin server
        settings.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: |
                    A human-readable name for the CDN distribution.
                domain_type:
                  type: string
                  description: 'The type of domain: custom (user-provided CNAME) or shared.'
                  enum:
                    - system
                    - custom
                cname:
                  type: string
                  description: >-
                    The custom domain that clients will use (e.g.,
                    cdn.example.com).
                cache_strategy:
                  type: string
                  description: |
                    Strategy for caching: vod, live, or static.
                host_header:
                  type: string
                  description: Host header to send to the origin server.
                origin:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Identifier or label for the origin.
                    type:
                      type: string
                      description: |
                        Origin type: http, s3.
                    url:
                      type: string
                      description: url
                  required:
                    - name
                    - type
                    - url
                  description: Configuration for the origin server.
              required:
                - name
                - domain_type
                - cname
                - cache_strategy
                - host_header
                - origin
            example: |-
              {
                  "name": "chaldal new",
                  "type": "custom",
                  "domain_type": "system",
                  "description": "test",
                  "cache_strategy": "vod",
                  "host_header": "cdn233.tenbyte.com.my",
                  "origin": {
                      "name": "chaldal",
                      "type": "s3",
                      "endpoint": "https://3aa3af49-9bdb-498c-ad02-3a0d6a865aea.s3.ap-southeast-1.wasabisys.com",
                      "bucket": "3aa3af49-9bdb-498c-ad02-3a0d6a865aea",
                      "region": "ap-southeast-2",
                      "access_key": "YOUR_ACCESS_KEY",
                      "secret_key": "YOUR_SECRET_KEY",
                  }
              }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
      deprecated: false
      security:
        - apikey-header-X-API-Key: []
components:
  securitySchemes:
    apikey-header-X-API-Key:
      type: apiKey
      in: header
      name: X-API-Key

````