Authorization

Smooth CDN API uses Bearer token authentication.

Each request to the API must include a valid API key in the Authorization header.

Creating an API key

You can generate a new API key in the dashboard:

https://smoothcdn.com/panel/account/api-keys/new

API keys are tied to your account and grant access to all API resources available to the user.

Using the API key

Include your API key in the Authorization header using the Bearer scheme:

Authorization: Bearer <YOUR_API_KEY>

Example request

curl https://api.smoothcdn.com/projects -H "Authorization: Bearer <YOUR_API_KEY>"

Missing or invalid API key

If the Authorization header is missing or the API key is invalid, the API will respond with:

Status: 401 Unauthorized

{
  "error": "unauthorized"
}
Projects

Projects are the top-level containers in Smooth CDN. Each project groups related versions, assets and access rules.

Each project has a type: basic or versioned.

All project operations require a valid API key with authorization access.

List projects

Returns a list of all projects available to the authenticated user.

GET https://api.smoothcdn.com/projects

Get project

Returns a single project by its identifier.

GET https://api.smoothcdn.com/projects/<project-id>

Create project

Creates a new project.

POST https://api.smoothcdn.com/projects
Request body
{
  "name": "My Project",
  "slug": "my-project",            // optional - by default it'll be slugified name
  "type": "versioned",             // project type: "basic" or "versioned" (default: "basic")
  "version": "1.0.0",              // initial version of project if its type is "versioned"  - 1.0.0 by default
  "customSubdomain": "my-project", // optional custom subdomain passed for project - available on paid plans only
  "blockBots": "false",
  "blockHeadless": "false",
}

Update project

Updates an existing project.

PATCH https://api.smoothcdn.com/projects/<project-id>
Request body
{
  "name": "Updated Project Name",
  "slug": "updated-project-name",
  "latestVersion": "1.0.1",        // which version to flag as "latest"
  "customSubdomain": "my-project", // optional custom subdomain passed for project - available on paid plans only
  "blockBots": "false",
  "blockHeadless": "false",
}

Delete project

Permanently deletes a project and all related resources.

DELETE https://api.smoothcdn.com/projects/<project-id>

Deleting a project permanently removes all associated data.

Versions

Versions allow you to manage different published states of a project. Only one version can be set as latest for project.

Versions are scoped to a specific project.

List versions

Returns all versions for a given project.

GET https://api.smoothcdn.com/projects/<project-id>/versions

Create version

Creates a new version for the project.

The version value must follow the semantic versioning format: MAJOR.MINOR.PATCH (for example: 1.0.0).

POST https://api.smoothcdn.com/projects/<project-id>/versions
Request body
{
  "version": "1.0.0",
}

Versions are always created as drafts.

Update version

Set version as published or draft.

PATCH https://api.smoothcdn.com/projects/<project-id>/versions/<version>
Request body
{
  "isVersionPublished": "<boolean>", // whether selected version is available to be used from CDN
}

To set version as latest use Update project route.

Delete version

Deletes a version from the project.

DELETE https://api.smoothcdn.com/projects/<project-id>/versions/<version>

Deleting a version permanently removes all associated data.

Assets

Assets represent files served through Smooth CDN. Each asset belongs to a specific project and optional version (for projects with type versioned). Supported uploads include frontend files, documents, audio, and video assets.

List assets

Returns assets for the given project.

GET https://api.smoothcdn.com/projects/<project-id>/assets

Create asset

Uploads a new asset. This endpoint is routed directly to the CDN edge layer and has a different payload structure than standard REST routes. Use it for single files such as scripts, images, PDFs, audio tracks, or video uploads.

POST https://api.smoothcdn.com/upload
Request body
{
  "projectId": "<project-id>", // required - project identifier sent in multipart body
  "asset": "<file>",           // file content to be uploaded
  "version": "1.0.0",          // which version to assign asset
  "path": "/dist/app/",        // additional info about asset path
  "sub_assets[]": "<file>",    // optional derived files uploaded together with the main asset
  "protected": "0",            // optional: 1 marks asset as protected
  "skipVariants": "0",         // optional: 1 skips project image variant generation for this asset
  "force": "0",                // optional: force upload even if version is published
}

Create assets bulk

Uploads multiple assets in one request. This endpoint is routed directly to the CDN edge layer. It works well for build outputs that mix code, media, and video files in one publish step.

POST https://api.smoothcdn.com/upload/bulk
Request body
{
  "projectId": "<project-id>", // required - project identifier sent in multipart body
  "assets": "<file>",          // file content to be uploaded (repeat field for each file)
  "version": "1.0.0",          // which version to assign assets
  "path": "/dist/app/",        // additional info about assets path
  "protected": "0",            // optional: 1 marks assets as protected
  "skipVariants": "0",         // optional: 1 skips project image variant generation for these assets
  "force": "0",                // optional: force upload even if version is published
}

Protect asset

Update protected flag on asset.

PATCH https://api.smoothcdn.com/projects/<project-id>/assets/<asset-id>
Request body
{
  "protected": "1", // 1 to mark asset as protected, 0 to mark asset as public
}

Bulk protect assets

Updates protected flag for multiple assets in one request.

PATCH https://api.smoothcdn.com/projects/<project-id>/assets/bulk
Request body
{
  "asset_ids": "["<asset-id-1>", "<asset-id-2>"]", // array of asset identifiers
  "protected": "1",                                // 1 to mark assets as protected, 0 to mark assets as public
}

Delete asset

Permanently deletes a single asset.

POST https://api.smoothcdn.com/delete
Request body
{
  "projectId": "<project-id>", // project identifier
  "file": "logo.png",          // asset filename to delete
  "path": "/images/",          // optional asset directory, defaults to /
  "version": "v1",             // required for versioned projects
  "force": "1",                // optional: allow delete even if version is published
}

Bulk delete assets

Permanently deletes multiple assets from the same path in one request. For different paths, send separate requests.

POST https://api.smoothcdn.com/delete/bulk
Request body
{
  "projectId": "<project-id>", // project identifier
  "assets": "app.js",          // asset filename to delete (repeat field for each asset)
  "path": "/build/",           // optional shared asset directory, defaults to /
  "version": "v1",             // required for versioned projects
  "force": "1",                // optional: allow delete even if version is published
}

Deleting an asset permanently removes all associated data.

Accesses

Accesses are list of tokens assigned to users with list of granted protected assets.

List accesses

Returns all access tokens defined for the given project.

GET https://api.smoothcdn.com/projects/<project-id>/accesses

Grant access

Grants access to assets.

POST https://api.smoothcdn.com/projects/<project-id>/accesses/grant
Request body
{
  "assets": "[ '/dist/app/app.js' ]",
  "email": "[email protected]",
  "expiresAt": "<datetime>",          // null or empty for endless access
}

Revoke access

Revokes previously granted access.

POST https://api.smoothcdn.com/projects/<project-id>/accesses/<access-id>/revoke