Skip to main content
These rules hold across every REST endpoint, so once you’ve learned them you can read the rest of the reference quickly.

Base URL and versioning

All REST requests go to a versioned base path:
https://api.streamloop.app/v1
The version (v1) is in the path. We add fields and endpoints without bumping the version; a breaking change would ship under a new version path so your integration keeps working.

Requests and responses

Requests and responses are JSON (Content-Type: application/json). Send a JSON body on POST, PATCH, and PUT; send query parameters on GET. A single-resource response returns that resource directly:
{
  "id": "stream_01J…",
  "name": "Lofi radio",
  "status": "live",
  "quality": "1080p",
  "framerate": 30
}

Pagination

List endpoints are cursor-paginated. Pass limit to set the page size and cursor to fetch the next page:
curl "https://api.streamloop.app/v1/streams?limit=20" \
  -H "x-api-key: sl_your_key_here"
The response wraps the items in data and returns paging metadata in page:
{
  "data": [
    { "id": "stream_01J…", "name": "Lofi radio", "status": "live" }
  ],
  "page": {
    "hasMore": true,
    "nextCursor": "eyJpZCI6…"
  }
}
To get the next page, send the nextCursor value back as the cursor parameter. When hasMore is false, nextCursor is null and you’ve reached the end.
curl "https://api.streamloop.app/v1/streams?limit=20&cursor=eyJpZCI6…" \
  -H "x-api-key: sl_your_key_here"

Errors

Successful requests return 2xx. Errors return the matching HTTP status and an RFC 7807 problem document (Content-Type: application/problem+json):
{
  "type": "https://streamloop.app/errors/stream-not-found",
  "title": "Stream not found",
  "status": 404,
  "detail": "No stream with id stream_01J… exists for this account.",
  "code": "stream_not_found"
}
FieldDescription
typeURI reference identifying the problem type
titleShort, human-readable summary of the problem
statusThe HTTP status code
detailExplanation specific to this occurrence
codeStable, machine-readable error code — branch on this
Branch your error handling on the code field (stable) rather than the human-readable title or detail.
Treat 429 (too many requests) and 5xx responses as retryable: back off and retry with jitter. Treat 4xx responses other than 429 as permanent — fix the request rather than retrying it.

Service status

GET /v1/status is an unauthenticated health check, and GET /v1/openapi.json returns the full OpenAPI document that powers this reference.