API reference
Authenticate the API
Create an API key and send it as a Bearer token or query parameter on every request.
Every LiveSunday API request (except the public health check) requires an API key. Keys belong to one Account and identify that Account automatically.
Create an API key
- Open your LiveSunday dashboard.
- Go to Advanced → API keys.
- Name the key and click Create.
- Copy it now — it is shown only once. Keys start with
ls_live_.
Keep your key secure
Treat API keys like passwords. If a key is exposed, revoke it and create a new one immediately.
Send the key
You can authenticate using either method:
Option 1: Bearer token (recommended)
Pass the key as a Bearer token in the Authorization header. Set Content-Type to application/json.
Authorization: Bearer ls_live_your_key_here
Content-Type: application/jsoncurl -X POST https://api.livesunday.ai/v1/stream/start \
-H "Authorization: Bearer ls_live_your_key_here" \
-H "Content-Type: application/json"const response = await fetch("https://api.livesunday.ai/v1/stream/start", {
method: "POST",
headers: {
Authorization: "Bearer ls_live_your_key_here",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);Option 2: Query parameter
Alternatively, pass the key as a query parameter named apiKey.
curl -X POST "https://api.livesunday.ai/v1/stream/start?apiKey=ls_live_your_key_here" \
-H "Content-Type: application/json"const apiKey = "ls_live_your_key_here";
const response = await fetch(`https://api.livesunday.ai/v1/stream/start?apiKey=${apiKey}`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);Priority
If both Bearer token and query parameter are provided, the Bearer token takes precedence.
All requests must be made over HTTPS. HTTP requests or requests with no API key will fail.
LiveSunday identifies your account from the API key. You do not need to send an account ID, except when checking stream status.
A missing, malformed, revoked, or unknown key returns 401. If the key cannot access that Account, the API returns 403.