Add Live Session

Add a live streaming session record via the API.

POST
/live-session/create
x-api-key<token>

API key used for authentication

In: header

platformstring

Platform name (e.g., 'twitch', 'youtube')

Length1 <= length
startTimestring

Session start time (ISO 8601)

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatdate-time
endTimestring

Session end time (ISO 8601)

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Formatdate-time
peakViewerCount?integer

Peak viewer count during the session

Range0 < value <= 9007199254740991
finalViewerCount?integer

Final viewer count at session end

Range0 < value <= 9007199254740991

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/live-session/create" \  -H "Content-Type: application/json" \  -d '{    "platform": "string",    "startTime": "2019-08-24T14:15:22Z",    "endTime": "2019-08-24T14:15:22Z"  }'
{
  "id": "00000000-0000-0000-0000-000000000000",
  "userId": "test-user-id",
  "platform": "twitch",
  "startTime": "2025-11-30T23:35:49.903Z",
  "endTime": "2025-12-01T00:35:49.904Z",
  "peakViewerCount": 500,
  "finalViewerCount": 450,
  "createdAt": "2025-11-30T23:35:49.904Z",
  "updatedAt": "2025-11-30T23:35:49.904Z"
}
{
  "error": "string",
  "code": "string",
  "details": {}
}