Create Asset

API to upload an asset from a source URL to Connectly's CDN

Create Asset

Endpoint

POST /v1/businesses/{businessId}/assets

Path Parameters

Parameter
Type
Required
Description

businessId

string

Yes

Your business ID (UUID format)

Request Body

Field
Type
Required
Description

uri

string

Yes

Source URL of the asset to fetch and store

id

string

No

Optional custom asset ID. If not provided, a new UUID will be generated

metadata

object

No

Optional metadata for the asset

metadata.accessControlType

string

No

Access control setting (see Access Control Types below)

Access Control Types

Value
Description

ASSET_ACCESS_CONTROL_TYPE_PUBLIC

Asset is publicly accessible (default)

ASSET_ACCESS_CONTROL_TYPE_PRIVATE

Asset requires authentication to access

ASSET_ACCESS_CONTROL_TYPE_CDN_PRIVATE

Asset is accessible only via CDN

Response

Field
Type
Description

asset.id

string

Unique identifier for the asset

asset.ownerId

string

Business ID that owns the asset

asset.uri

string

CDN URL where the asset is accessible

asset.source.uri

string

Original source URL

asset.metadata.accessControlType

string

Access control setting

Examples

Basic Request

Response:

Request with Custom ID

Request with Metadata

Error Responses

Invalid Request (400)

Authentication Error (401)

Source URL Unreachable (400)

Rate Limiting

This endpoint is limited to 100 requests per second. If the limit is exceeded, the API will return a 429 Too Many Requests response.

Last updated