StreamView API

Powerful REST API for developers to integrate video streaming capabilities

v2.1 Stable

API Overview

Upload Videos

Programmatically upload and manage video content with full control over metadata and settings.

Stream Management

Control video playback, generate embed codes, and manage streaming configurations.

Analytics

Access detailed analytics data including views, engagement metrics, and performance insights.

User Management

Manage user accounts, permissions, and access controls programmatically.

Introduction

The StreamView API is a RESTful API that allows developers to integrate video streaming capabilities into their applications. Our API supports JSON requests and responses, making it easy to work with in any programming language.

Key Features:

  • RESTful design with predictable URLs
  • JSON request and response format
  • OAuth 2.0 and API key authentication
  • Comprehensive error handling
  • Real-time webhooks for events
  • Rate limiting with clear headers

Base URL:

https://api.streamview.com/v2

Authentication

StreamView API uses API keys for authentication. You can obtain your API key from your dashboard.

Authentication Methods:

API Key (Recommended)

Include your API key in the request headers:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
OAuth 2.0

For applications requiring user authorization:

Authorization: Bearer OAUTH_ACCESS_TOKEN
Content-Type: application/json

Security Note

Keep your API keys secure and never expose them in client-side code. Use environment variables or secure key management systems.

Rate Limits

API requests are rate limited to ensure fair usage and system stability.

Plan Requests per Hour Concurrent Uploads Webhook Calls
Free 1,000 2 100
Pro 10,000 10 1,000
Business 100,000 50 10,000

Rate Limit Headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

API Endpoints

Overview of all available endpoints organized by functionality.

Videos

GET /videos List all videos
POST /videos Upload a new video
GET /videos/{id} Get video details
PUT /videos/{id} Update video
DELETE /videos/{id} Delete video

Analytics

GET /analytics/views Get view statistics
GET /analytics/engagement Get engagement metrics
GET /analytics/revenue Get revenue data

Users

GET /users/me Get current user
PUT /users/me Update user profile
GET /users/{id}/videos Get user's videos

Upload API

Upload videos using our multipart upload endpoint with progress tracking.

Upload a Video

curl -X POST https://api.streamview.com/v2/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@video.mp4" \
  -F "title=My Video Title" \
  -F "description=Video description" \
  -F "visibility=public"
Response:
{
  "id": "abc123",
  "title": "My Video Title",
  "status": "processing",
  "upload_url": "https://uploads.streamview.com/abc123",
  "created_at": "2025-06-15T10:30:00Z"
}

Video Management

Comprehensive video management operations.

Get Video Details

GET /v2/videos/abc123

{
  "id": "abc123",
  "title": "My Video Title",
  "description": "Video description",
  "duration": 120,
  "views": 1542,
  "status": "ready",
  "thumbnail": "https://cdn.streamview.com/thumbs/abc123.jpg",
  "embed_url": "https://player.streamview.com/abc123",
  "created_at": "2025-06-15T10:30:00Z"
}

Analytics API

Access detailed analytics and performance metrics.

Get View Analytics

GET /v2/analytics/views?video_id=abc123&period=7d

{
  "video_id": "abc123",
  "period": "7d",
  "total_views": 1542,
  "unique_viewers": 1201,
  "avg_watch_time": 85.4,
  "daily_breakdown": [
    {"date": "2025-06-15", "views": 245},
    {"date": "2025-06-14", "views": 198}
  ]
}

Webhooks

Real-time notifications for video processing and other events.

Available Events:

  • video.uploaded - Video upload completed
  • video.processed - Video processing finished
  • video.failed - Video processing failed
  • user.subscription.changed - User subscription updated

Webhook Payload Example

{
  "event": "video.processed",
  "data": {
    "id": "abc123",
    "title": "My Video Title",
    "status": "ready",
    "processing_time": 45
  },
  "timestamp": "2025-06-15T10:35:00Z"
}

Error Handling

Understanding API error responses and status codes.

Common Error Codes:

400
Bad Request

Invalid request parameters

401
Unauthorized

Invalid or missing API key

403
Forbidden

Insufficient permissions

429
Too Many Requests

Rate limit exceeded

Error Response Format

{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "The 'title' parameter is required",
    "details": {
      "parameter": "title",
      "location": "body"
    }
  }
}

SDKs & Libraries

Official SDKs and community libraries for popular programming languages.

JavaScript/Node.js

Official SDK for JavaScript and Node.js applications

npm install @streamview/api

Python

Python SDK with full API coverage

pip install streamview-api

PHP

PHP library for easy integration

composer require streamview/api

Go

Go package for high-performance applications

go get github.com/streamview/go-api