Sanghtech Stream API

API Documentation

Use the Sanghtech Stream API to manage organizations, upload videos, control secure playback, rotate keys, and automate workflows with webhooks.

Core API Base URL

https://stream.sanghtech.com/api/v1

External Playback API Base URL

https://stream.sanghtech.com/api/external/v1

Auth: Core API uses Bearer token (Sanctum). External playback API uses headers X-API-Key and X-API-Secret.

Public Endpoints

Use these endpoints for pricing, company trust data, and initial auth bootstrap.

MethodPathAuthDescription
POST/auth/registerNoneRegister a new user account.
POST/auth/loginNoneGet access token for API requests.
GET/plansNoneList active plans for pricing integration.
GET/plans/compareNoneFeature matrix for plan comparison.
GET/plans/{slug}NoneRead one plan by slug.
GET/webhooks/eventsNoneList supported webhook event names.
GET/companiesNoneList trusted companies and logo URLs.
GET/companies/{slug}NoneGet one company (e.g. navgyan, winningteam, webprint).

Authenticated Organization Endpoints

For dashboard and backend integrations where a logged-in user controls organizations and assets.

MethodPathScopeDescription
GET/organizationsUserList organizations user belongs to.
POST/organizationsUserCreate an organization.
GET/organizations/{id}UserOrganization details.
PUT/organizations/{id}UserUpdate organization info.
POST/organizations/{id}/membersOwner/AdminInvite member.
PUT/organizations/{id}/members/{userId}Owner/AdminUpdate member role.
DELETE/organizations/{id}/members/{userId}Owner/AdminRemove member.
MethodPathScopeDescription
POST/organizations/{organizationId}/videos/uploadvideos:writeCreate direct-upload session.
POST/organizations/{organizationId}/videos/{videoId}/upload-completevideos:writeMark upload complete and trigger encoding.
GET/organizations/{organizationId}/videosvideos:readList videos.
GET/organizations/{organizationId}/videos/{videoId}videos:readVideo details.
PUT/organizations/{organizationId}/videos/{videoId}videos:writeUpdate metadata.
PUT/organizations/{organizationId}/videos/{videoId}/securityvideos:writeUpdate security rules (domain lock, etc).
GET/organizations/{organizationId}/videos/{videoId}/analyticsanalytics:readVideo analytics.
DELETE/organizations/{organizationId}/videos/{videoId}videos:writeDelete video.

External Playback API (API Key)

For customer websites and applications embedding secure streams.

MethodPathHeadersDescription
GET/videosX-API-Key, X-API-SecretList public/allowed videos.
GET/videos/{videoId}X-API-Key, X-API-SecretGet video info.
POST/videos/{videoId}/playX-API-Key, X-API-SecretGet signed playback URLs.
POST/videos/{videoId}/trackX-API-Key, X-API-SecretTrack viewer analytics event.

Example: Get Signed Playback URL

curl --request POST 'https://stream.sanghtech.com/api/external/v1/videos/{videoId}/play' \\ --header 'X-API-Key: your_key' \\ --header 'X-API-Secret: your_secret' \\ --header 'Content-Type: application/json' \\ --data '{"domain":"app.example.com"}'