API Documentation

Integrate StreamStack into your application with our REST API.

Authentication

All API requests require an API key passed via the Authorization header.

HTTP
Authorization: Bearer YOUR_API_KEY

Generate API keys from the StreamStack Dashboard → API Keys section. Each key is scoped to a single tenant.

Media

List videos

GET
GET /api/v1/media
Accept: application/json

Returns paginated list of videos with status, duration, resolution, and URLs.

Get video details

GET
GET /api/v1/media/{uuid}
Accept: application/json

Delete video

DELETE
DELETE /api/v1/media/{uuid}
Authorization: Bearer YOUR_API_KEY

Permanently deletes the video, all transcoded versions, HLS segments, and thumbnails.

Upload

Direct upload (presigned URL)

POST
POST /api/v1/upload/presign
Content-Type: application/json

{
  "title": "My Video",
  "filename": "video.mp4",
  "content_type": "video/mp4"
}

Returns a presigned URL for direct upload to object storage. Maximum file size: 100 MB via panel, unlimited via API.

Upload from URL

POST
POST /api/v1/upload/url
Content-Type: application/json

{
  "title": "My Video",
  "url": "https://example.com/video.mp4"
}

Transcode

Transcoding starts automatically after upload. Available profiles:

ProfileResolutionBitratePreset
8K7680×432040 Mbpsslow
4K3840×216018 Mbpsslow
1080p1920×10805 Mbpsfast
720p1280×7202.5 Mbpsfast
480p854×4801.2 Mbpsfast
360p640×360600 kbpsfast

Output: HLS (MPEG-TS segments) with AES-128 encryption. Adaptive bitrate with automatic quality selection.

Statistics

Get video stats

GET
GET /api/v1/media/{uuid}/stats?period=7d
Accept: application/json

Periods: 15m, 1h, 6h, 24h, 7d, 30d, 3m, 6m, 1y, all

Returns: views, watching now, average watch time, completion rate, quality distribution, device/browser/geo breakdown.

Embed Player

HTML
<iframe src="https://streamstack.it/player/{uuid}"
  width="854" height="480" frameborder="0"
  allowfullscreen allow="encrypted-media; autoplay">
</iframe>

Parameters: ?autoplay=1, ?loop=1, ?mute=1

Webhooks

StreamStack can notify your application when events occur:

  • media.uploaded — Video uploaded successfully
  • media.transcoded — All profiles transcoded
  • media.published — Video published and playable
  • media.failed — Transcode pipeline failed

Configure webhook URLs in the Dashboard → Settings.

Error Codes

CodeDescription
401Invalid or missing API key
403Insufficient permissions (wrong tenant)
404Resource not found
413File too large
422Validation error (check response body)
429Rate limit exceeded (30 req/s)
500Internal server error