Shareable Links API
This endpoint allows you to programmatically generate secure, public-facing links to your media assets. These links can be password-protected and can have an expiration date.
Generate a Shareable Link
POST /shareable-links
This endpoint creates a unique link for a single Video (VOD), a Live Stream, or a Collection of videos.
Request Body
Field | Type | Required | Description |
---|---|---|---|
media_id | string | Yes | The unique ID of the asset. This is a UUID for videos. |
media_type | string | Yes | The type of asset. Must be one of: vod , live , collection . |
visibility | string | Yes | The access level. Must be one of: public , password . |
password | string | Optional | Required if visibility is password . Minimum 6 characters. |
expires_in_days | integer | Optional | The number of days until the link automatically expires. Max 365. |
Example Requests
For a Video (VOD)
{
"media_id": "9c1a9e3e-6c9b-4f8a-8e2d-9b3c1d4e0f6a",
"media_type": "vod",
"visibility": "public",
"expires_in_days": 7
}
Example Response: 201 Created
Upon success, the API will return the generated link details.
{
"link": "https://your-app.com/s/aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoP",
"token": "aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoP",
"visibility": "public",
"expires_at": "2025-08-17T14:30:00Z"
}