Skip to main content
POST
/
share
Create a publicly available shareable asset
curl --request POST \
  --url https://api.cloudglue.dev/v1/share \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "file_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "description": "<string>",
  "metadata": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": 123,
  "file_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "description": "<string>",
  "metadata": {},
  "preview_url": "<string>",
  "media_download_url": "<string>",
  "media_download_expires_at": 123,
  "share_url": "<string>",
  "asset_type": "file",
  "object": "share"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Shareable asset creation request parameters

file_id
string<uuid>
required

The ID of the file the shareable asset will be created for

file_segment_id
string<uuid>

The ID of the file segment the shareable asset will be created for. When provided, the shareable asset will be created for the file segment.

title
string

The title of the shareable asset

description
string

The description of the shareable asset

metadata
object

The metadata of the shareable asset

Response

Shareable asset created successfully

id
string<uuid>
required

The unique identifier of the shareable asset

file_id
string<uuid>
required

The ID of the file the shareable asset belongs to

created_at
number
required

The timestamp of when the shareable asset was created

file_segment_id
string<uuid>

The ID of the file segment the shareable asset belongs to (optional)

title
string

The title of the shareable asset

description
string

The description of the shareable asset

metadata
object

The metadata of the shareable asset

preview_url
string

The thumbnail url of the shareable asset

media_download_url
string

The signed media download url of the shareable asset

media_download_expires_at
number | null

The timestamp of when the media download url will expire

share_url
string

This is the url that can be used to share the shareable asset

asset_type
enum<string>

The type of asset the shareable asset belongs to

Available options:
file,
file_segment
object
enum<string>

Object type, always 'share'

Available options:
share