DEVELOPER DOCS

Build on StreamLink.

The StreamLink API lets you authenticate users, create broadcast rooms, and join a LiveKit stream programmatically. All routes are JSON over HTTPS. This page is a quickstart — the full interactive reference lives in the Swagger explorer.

Base URL

All endpoints are served from:

https://saviourtool.com/api

1. Sign up or sign in

Exchange an email + password for an access token (15-minute TTL, RS256 JWT) and a refresh token (30-day, single-use, rotated).

# Create an account
$ curl -X POST https://saviourtool.com/api/auth/signup \
    -H "Content-Type: application/json" \
    -d '{"email":"you@example.com","password":"YourPass123!","displayName":"You"}'

# Response (201 Created)
{
  "ok": true,
  "data": {
    "user": { "id": "u_01K…", ... },
    "accessToken": "eyJhbGciOiJSUzI1NiIs…",
    "refreshToken": "Afw0flcT…",
    "accessTokenExpiresIn": 900
  }
}

Send the access token with every authenticated request: Authorization: Bearer eyJhbGc...

2. Create a broadcast room

$ curl -X POST https://saviourtool.com/api/rooms \
    -H "Authorization: Bearer $ACCESS" \
    -H "Content-Type: application/json" \
    -d '{"name":"Demo","type":"public"}'

# Response (201)
{
  "ok": true,
  "data": {
    "room": { "id": "r_01K…", ... },
    "joinUrl": "https://saviourtool.com/live/r_01K…",
    "livekit": {
      "url": "wss://livekit.saviourtool.com",
      "token": "eyJhbGc…"
    }
  }
}

The livekit.token is a LiveKit JWT — feed it to the LiveKit client SDK on your host device to publish your screen. The joinUrl is the public link viewers open in any browser; no further integration is needed for them.

3. End the broadcast

$ curl -X POST https://saviourtool.com/api/rooms/r_01K…/end \
    -H "Authorization: Bearer $ACCESS"

# 204 No Content — joinUrl now shows “stream ended”

Rate limits

Responses include X-RateLimit-* headers. Rate-limited responses are HTTP 429.

Errors

All non-2xx responses follow the same shape:

{
  "ok": false,
  "error": {
    "code": "INVALID_INPUT",
    "message": "email is required"
  }
}

All endpoints

Quick reference. For schemas and example responses, open the Swagger UI.

POST/api/auth/signup
Create an account
POST/api/auth/signin
Sign in for an access + refresh token
POST/api/auth/refresh
Rotate the refresh token
POST/api/auth/signout
Revoke refresh token family
GET/api/auth/me
Current user profile
POST/api/auth/verify/request
Send email verification code
POST/api/auth/verify/confirm
Confirm verification code
POST/api/auth/password-reset/request
Send reset code
POST/api/auth/password-reset/confirm
Set new password
GET/api/rooms
List your rooms
POST/api/rooms
Create a broadcast room
GET/api/rooms/{roomId}
Get public room metadata
PATCH/api/rooms/{roomId}
Update a room (host)
POST/api/rooms/{roomId}/end
End the broadcast (host)
GET/api/rooms/stats
Lifetime broadcast stats
GET/api/turn-credentials
Short-lived TURN/STUN credentials
GET/health
Liveness probe