Skip to Content
API reference

Share links API

A share link plays one video for anyone holding its URL, until it expires or is revoked.

POST /v1/assets/{id}/shares

Makes a share link and its own signed playback ID. url is the page to send. name is one line of up to 100 characters; expires_at must be in the future and can't be changed later. Allowed while the asset is processing.

Authentication: An API key with assets:write.

Parameters

NameInTypeRequiredDescription
idpathstringyesAsset ID (ast_…).
Idempotency-KeyheaderstringnoA retry with the same key and request returns the first response; a different request is 422 idempotency_key_reused.

Request body

FieldTypeRequiredDescription
namestringno
expires_atstring (date-time)no
{
  "name": "For the review",
  "expires_at": "2026-12-01T00:00:00Z"
}

Response 201

Created

{
  "id": "shr_01jepn315k8tfeyh86qtbhnna7",
  "asset_id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
  "name": "For the review",
  "url": "https://video.example.com/s/QR2V7M4K5X3T6WAY5ZEB2CND4F",
  "playback_id": "pid_01jmgkyp0c3ct46ees12paekfv",
  "expires_at": "2026-12-01T00:00:00Z",
  "status": "active",
  "created_at": "2026-11-18T09:30:00Z"
}

Errors

GET /v1/assets/{id}/shares

The asset's share links, newest first, each with views_30d: its views over the last 30 UTC days.

Authentication: An API key with assets:read.

Parameters

NameInTypeRequiredDescription
idpathstringyesAsset ID (ast_…).

Response 200

Newest first

{
  "data": [
    {
      "id": "shr_01jepn315k8tfeyh86qtbhnna7",
      "asset_id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
      "name": "For the review",
      "url": "https://video.example.com/s/QR2V7M4K5X3T6WAY5ZEB2CND4F",
      "playback_id": "pid_01jmgkyp0c3ct46ees12paekfv",
      "expires_at": "2026-12-01T00:00:00Z",
      "status": "active",
      "created_at": "2026-11-18T09:30:00Z",
      "views_30d": 27
    }
  ]
}

Errors

DELETE /v1/shares/{id}

Revokes the link's playback ID: 200 once unpublished, 202 while revoking. Revoking again changes nothing.

Authentication: An API key with assets:write.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Response 200

Unpublished

{
  "id": "shr_01jepn315k8tfeyh86qtbhnna7",
  "asset_id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
  "name": "For the review",
  "url": "https://video.example.com/s/QR2V7M4K5X3T6WAY5ZEB2CND4F",
  "playback_id": "pid_01jmgkyp0c3ct46ees12paekfv",
  "expires_at": "2026-12-01T00:00:00Z",
  "status": "revoked",
  "created_at": "2026-11-18T09:30:00Z"
}

Response 202

Revoking

{
  "id": "shr_01jepn315k8tfeyh86qtbhnna7",
  "asset_id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
  "name": "For the review",
  "url": "https://video.example.com/s/QR2V7M4K5X3T6WAY5ZEB2CND4F",
  "playback_id": "pid_01jmgkyp0c3ct46ees12paekfv",
  "expires_at": "2026-12-01T00:00:00Z",
  "status": "revoked",
  "created_at": "2026-11-18T09:30:00Z"
}

Errors

POST /v1/shares/{id}/stream-url

A signed master.m3u8 URL for players that can't open the share page. It can't refresh: it lasts until the link's expiry or the longest token lifetime, whichever is first, and stops when the link is revoked.

Authentication: An API key with assets:write.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Response 200

The URL

{
  "url": "https://media.example.com/v/eyJhbGciOiJFUzI1NiIs.../pid_01jmgkyp0c3ct46ees12paekfv/master.m3u8",
  "expires_at": "2026-11-25T09:30:00Z"
}

Errors

On this page