{"openapi":"3.0.3","info":{"title":"rehelios API","version":"1.0.0","description":"Upload, transcode and serve video with adaptive HLS, subtitles and signed playback.\n\nAuthenticate with an API key (`X-Api-Key: rh_live_…`). Built to be driven programmatically — by your backend or by an agent.\n\n## Rate limits\n\nEach credential is allowed **100 requests per 60 seconds** (a rolling 60s window).\nThe bucket is keyed per credential: by `X-Api-Key` for programmatic access, by the `Authorization` bearer token for cockpit sessions, and by client IP for anonymous requests.\nOne tenant cannot exhaust another tenant's quota.\n\nWhen the limit is exceeded the API responds with `429 Too Many Requests` in the standard error envelope (`{ success: false, error: { code, message } }`). Agents should back off and retry after the window resets."},"tags":[{"name":"Videos","description":"Video resource: CRUD, upload, playback"},{"name":"Collections","description":"Group videos into collections"},{"name":"Upload","description":"Resumable (TUS) and multipart uploads"},{"name":"Analytics","description":"Playback events and per-video stats"},{"name":"Usage","description":"Account quota and storage usage"},{"name":"Health","description":"Liveness and readiness probes"}],"components":{"schemas":{"error":{"type":"object","required":["success","error"],"properties":{"success":{"const":false,"type":"boolean"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}},"$id":"#/components/schemas/error","additionalProperties":false}},"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Programmatic access key (rh_live_…)"},"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Cockpit user session token"}}},"security":[{"apiKey":[]},{"bearer":[]}],"paths":{"/":{"get":{"tags":["Health"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["status","message","timestamp"],"properties":{"status":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"}},"additionalProperties":false}}}}},"operationId":"getIndex"}},"/v1/videos/":{"post":{"tags":["Videos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":1,"type":"string"},"collectionId":{"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":1,"type":"string"},"collectionId":{"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":1,"type":"string"},"collectionId":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","orgId","collectionId","title","status","originalFilename","originalSize","sourceUrl","durationSecs","width","height","codec","visibility","playbackUrl","posterUrl","masterPath","dashPath","mp4Path","posterPath","storyboardPath","spritePath","renditions","autoCaption","captionStatus","error","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orgId":{"type":"string"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"status":{"description":"Lifecycle stage: created · uploading · queued · transcoding · ready · failed. Media paths and URLs below are only populated once status is `ready`.","type":"string"},"originalFilename":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalSize":{"anyOf":[{"description":"Source file size in bytes.","type":"number"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"description":"Remote source URL for videos imported from a URL; used to re-fetch on re-transcode. `null` for uploads.","type":"string"},{"type":"null"}]},"durationSecs":{"anyOf":[{"type":"number"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"codec":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"description":"`private` (signed playback) or `public` (embeddable).","type":"string"},"playbackUrl":{"anyOf":[{"description":"**Absolute** HLS master playlist URL — ready to hand to any video player. For `private` videos append a signed token from `POST /v1/videos/{id}/playback-token` as `?token=<jwt>`; `public` videos play without a token. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"posterUrl":{"anyOf":[{"description":"Absolute poster/thumbnail URL. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"masterPath":{"anyOf":[{"description":"Storage key of the HLS master playlist, e.g. `{orgId}/{videoId}/hls/master.m3u8`. Use `playbackUrl` instead — it is the same path with the media base already prepended.","type":"string"},{"type":"null"}]},"dashPath":{"anyOf":[{"description":"MPEG-DASH manifest key (`manifest.mpd`) relative to the video base URL. Only present when DASH packaging is enabled; otherwise `null`.","type":"string"},{"type":"null"}]},"mp4Path":{"anyOf":[{"description":"Progressive MP4 key (top rendition) relative to the video base URL. Prefer the signed `GET /v1/videos/{id}/mp4` endpoint for a downloadable URL. `null` until `ready`.","type":"string"},{"type":"null"}]},"posterPath":{"anyOf":[{"description":"Storage key of the poster/thumbnail. Use `posterUrl` instead — it is the absolute URL.","type":"string"},{"type":"null"}]},"storyboardPath":{"anyOf":[{"description":"WebVTT thumbnails track (`thumbnails.vtt`) for scrub previews, relative to the video base URL.","type":"string"},{"type":"null"}]},"spritePath":{"anyOf":[{"description":"Storyboard sprite sheet (`sprite.jpg`) referenced by the thumbnails VTT.","type":"string"},{"type":"null"}]},"renditions":{"anyOf":[{"description":"Encoded ABR ladder. Each entry maps to a variant playlist in the master.","type":"array","items":{"additionalProperties":true,"type":"object","required":["height","videoBitrate","playlist"],"properties":{"height":{"description":"Rendition height in pixels (e.g. 1080, 720).","type":"number"},"videoBitrate":{"description":"Target video bitrate, e.g. \"5000k\".","type":"string"},"playlist":{"description":"Variant playlist filename relative to the master, e.g. \"1080p.m3u8\".","type":"string"}}}},{"type":"null"}]},"autoCaption":{"type":"boolean"},"captionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"description":"Failure reason when `status` is `failed`.","type":"string"},{"type":"null"}]},"createdAt":{},"updatedAt":{}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1Videos"},"get":{"tags":["Videos"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"minimum":0,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":0,"type":"number"}]}},{"name":"pageSize","in":"query","required":false,"schema":{"minimum":1,"maximum":100,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":1,"maximum":100,"type":"number"}]}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"title","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"statusNot","in":"query","required":false,"schema":{"type":"string"}},{"name":"collectionId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["items","page","pageSize","total","pageCount"],"properties":{"items":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"pageCount":{"type":"number"}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1Videos"}},"/v1/videos/import":{"post":{"tags":["Videos"],"summary":"Import video from URL","description":"Create a video by pulling from a remote HTTP(S) URL instead of uploading a file. rehelios fetches the source, stores it, and runs the full transcode pipeline. The `video.ready` webhook fires when encoding completes. The source URL must be publicly reachable (private/loopback addresses are rejected).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"description":"Public HTTP(S) URL of the source video file.","type":"string"},"title":{"minLength":1,"description":"Display title. Defaults to the filename in the URL path.","type":"string"},"visibility":{"type":"string","enum":["private","public"]},"autoCaption":{"description":"Trigger auto-caption generation after encoding.","type":"boolean"},"collectionId":{"type":"string"},"bulk":{"description":"Mark as a bulk/backfill import. Bulk jobs yield to interactive uploads in the transcode queue while staying fair across orgs.","type":"boolean"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"description":"Public HTTP(S) URL of the source video file.","type":"string"},"title":{"minLength":1,"description":"Display title. Defaults to the filename in the URL path.","type":"string"},"visibility":{"type":"string","enum":["private","public"]},"autoCaption":{"description":"Trigger auto-caption generation after encoding.","type":"boolean"},"collectionId":{"type":"string"},"bulk":{"description":"Mark as a bulk/backfill import. Bulk jobs yield to interactive uploads in the transcode queue while staying fair across orgs.","type":"boolean"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["url"],"properties":{"url":{"minLength":1,"description":"Public HTTP(S) URL of the source video file.","type":"string"},"title":{"minLength":1,"description":"Display title. Defaults to the filename in the URL path.","type":"string"},"visibility":{"type":"string","enum":["private","public"]},"autoCaption":{"description":"Trigger auto-caption generation after encoding.","type":"boolean"},"collectionId":{"type":"string"},"bulk":{"description":"Mark as a bulk/backfill import. Bulk jobs yield to interactive uploads in the transcode queue while staying fair across orgs.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string"}}}},"additionalProperties":false}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosImport"}},"/v1/videos/{id}":{"get":{"tags":["Videos"],"summary":"Get a video with its subtitle tracks","description":"Returns the full video record plus linked subtitle tracks.\n\n**Playback:** use `playbackUrl` directly — it is the absolute HLS master playlist URL, ready to pass to any player. For `private` videos append a signed token from `POST /v1/videos/{id}/playback-token` as `?token=<jwt>`. `public` videos play without a token.\n\n`playbackUrl`, `posterUrl`, `masterPath`, `mp4Path`, `renditions`, etc. are `null` until `status` is `ready`. For a direct MP4 download use `GET /v1/videos/{id}/mp4`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","orgId","collectionId","title","status","originalFilename","originalSize","sourceUrl","durationSecs","width","height","codec","visibility","playbackUrl","posterUrl","masterPath","dashPath","mp4Path","posterPath","storyboardPath","spritePath","renditions","autoCaption","captionStatus","error","createdAt","updatedAt","subtitleTracks"],"properties":{"id":{"type":"string"},"orgId":{"type":"string"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"status":{"description":"Lifecycle stage: created · uploading · queued · transcoding · ready · failed. Media paths and URLs below are only populated once status is `ready`.","type":"string"},"originalFilename":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalSize":{"anyOf":[{"description":"Source file size in bytes.","type":"number"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"description":"Remote source URL for videos imported from a URL; used to re-fetch on re-transcode. `null` for uploads.","type":"string"},{"type":"null"}]},"durationSecs":{"anyOf":[{"type":"number"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"codec":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"description":"`private` (signed playback) or `public` (embeddable).","type":"string"},"playbackUrl":{"anyOf":[{"description":"**Absolute** HLS master playlist URL — ready to hand to any video player. For `private` videos append a signed token from `POST /v1/videos/{id}/playback-token` as `?token=<jwt>`; `public` videos play without a token. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"posterUrl":{"anyOf":[{"description":"Absolute poster/thumbnail URL. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"masterPath":{"anyOf":[{"description":"Storage key of the HLS master playlist, e.g. `{orgId}/{videoId}/hls/master.m3u8`. Use `playbackUrl` instead — it is the same path with the media base already prepended.","type":"string"},{"type":"null"}]},"dashPath":{"anyOf":[{"description":"MPEG-DASH manifest key (`manifest.mpd`) relative to the video base URL. Only present when DASH packaging is enabled; otherwise `null`.","type":"string"},{"type":"null"}]},"mp4Path":{"anyOf":[{"description":"Progressive MP4 key (top rendition) relative to the video base URL. Prefer the signed `GET /v1/videos/{id}/mp4` endpoint for a downloadable URL. `null` until `ready`.","type":"string"},{"type":"null"}]},"posterPath":{"anyOf":[{"description":"Storage key of the poster/thumbnail. Use `posterUrl` instead — it is the absolute URL.","type":"string"},{"type":"null"}]},"storyboardPath":{"anyOf":[{"description":"WebVTT thumbnails track (`thumbnails.vtt`) for scrub previews, relative to the video base URL.","type":"string"},{"type":"null"}]},"spritePath":{"anyOf":[{"description":"Storyboard sprite sheet (`sprite.jpg`) referenced by the thumbnails VTT.","type":"string"},{"type":"null"}]},"renditions":{"anyOf":[{"description":"Encoded ABR ladder. Each entry maps to a variant playlist in the master.","type":"array","items":{"additionalProperties":true,"type":"object","required":["height","videoBitrate","playlist"],"properties":{"height":{"description":"Rendition height in pixels (e.g. 1080, 720).","type":"number"},"videoBitrate":{"description":"Target video bitrate, e.g. \"5000k\".","type":"string"},"playlist":{"description":"Variant playlist filename relative to the master, e.g. \"1080p.m3u8\".","type":"string"}}}},{"type":"null"}]},"autoCaption":{"type":"boolean"},"captionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"description":"Failure reason when `status` is `failed`.","type":"string"},{"type":"null"}]},"createdAt":{},"updatedAt":{},"subtitleTracks":{"type":"array","items":{"additionalProperties":true,"type":"object","required":["id","videoId","language","name","vttPath","isDefault","isForced","normalized","createdAt"],"properties":{"id":{"type":"string"},"videoId":{"type":"string"},"language":{"type":"string"},"name":{"type":"string"},"vttPath":{"type":"string"},"isDefault":{"type":"boolean"},"isForced":{"type":"boolean"},"normalized":{"type":"boolean"},"createdAt":{}}}}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1VideosById"},"patch":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"minLength":1,"type":"string"},"visibility":{"type":"string","enum":["private","public"]},"autoCaption":{"type":"boolean"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"title":{"minLength":1,"type":"string"},"visibility":{"type":"string","enum":["private","public"]},"autoCaption":{"type":"boolean"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"title":{"minLength":1,"type":"string"},"visibility":{"type":"string","enum":["private","public"]},"autoCaption":{"type":"boolean"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","orgId","collectionId","title","status","originalFilename","originalSize","sourceUrl","durationSecs","width","height","codec","visibility","playbackUrl","posterUrl","masterPath","dashPath","mp4Path","posterPath","storyboardPath","spritePath","renditions","autoCaption","captionStatus","error","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orgId":{"type":"string"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"status":{"description":"Lifecycle stage: created · uploading · queued · transcoding · ready · failed. Media paths and URLs below are only populated once status is `ready`.","type":"string"},"originalFilename":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalSize":{"anyOf":[{"description":"Source file size in bytes.","type":"number"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"description":"Remote source URL for videos imported from a URL; used to re-fetch on re-transcode. `null` for uploads.","type":"string"},{"type":"null"}]},"durationSecs":{"anyOf":[{"type":"number"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"codec":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"description":"`private` (signed playback) or `public` (embeddable).","type":"string"},"playbackUrl":{"anyOf":[{"description":"**Absolute** HLS master playlist URL — ready to hand to any video player. For `private` videos append a signed token from `POST /v1/videos/{id}/playback-token` as `?token=<jwt>`; `public` videos play without a token. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"posterUrl":{"anyOf":[{"description":"Absolute poster/thumbnail URL. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"masterPath":{"anyOf":[{"description":"Storage key of the HLS master playlist, e.g. `{orgId}/{videoId}/hls/master.m3u8`. Use `playbackUrl` instead — it is the same path with the media base already prepended.","type":"string"},{"type":"null"}]},"dashPath":{"anyOf":[{"description":"MPEG-DASH manifest key (`manifest.mpd`) relative to the video base URL. Only present when DASH packaging is enabled; otherwise `null`.","type":"string"},{"type":"null"}]},"mp4Path":{"anyOf":[{"description":"Progressive MP4 key (top rendition) relative to the video base URL. Prefer the signed `GET /v1/videos/{id}/mp4` endpoint for a downloadable URL. `null` until `ready`.","type":"string"},{"type":"null"}]},"posterPath":{"anyOf":[{"description":"Storage key of the poster/thumbnail. Use `posterUrl` instead — it is the absolute URL.","type":"string"},{"type":"null"}]},"storyboardPath":{"anyOf":[{"description":"WebVTT thumbnails track (`thumbnails.vtt`) for scrub previews, relative to the video base URL.","type":"string"},{"type":"null"}]},"spritePath":{"anyOf":[{"description":"Storyboard sprite sheet (`sprite.jpg`) referenced by the thumbnails VTT.","type":"string"},{"type":"null"}]},"renditions":{"anyOf":[{"description":"Encoded ABR ladder. Each entry maps to a variant playlist in the master.","type":"array","items":{"additionalProperties":true,"type":"object","required":["height","videoBitrate","playlist"],"properties":{"height":{"description":"Rendition height in pixels (e.g. 1080, 720).","type":"number"},"videoBitrate":{"description":"Target video bitrate, e.g. \"5000k\".","type":"string"},"playlist":{"description":"Variant playlist filename relative to the master, e.g. \"1080p.m3u8\".","type":"string"}}}},{"type":"null"}]},"autoCaption":{"type":"boolean"},"captionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"description":"Failure reason when `status` is `failed`.","type":"string"},{"type":"null"}]},"createdAt":{},"updatedAt":{}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"patchV1VideosById"},"delete":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"deleteV1VideosById"}},"/v1/videos/bulk-delete":{"post":{"tags":["Videos"],"summary":"Delete many videos","description":"Permanently delete a set of videos (and their stored media) in one call. Ids not belonging to the caller's organization, or currently being processed (queued/transcoding), are silently skipped; `deleted` is the count actually removed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"minLength":1,"type":"string"}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"minLength":1,"type":"string"}}}}},"multipart/form-data":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"minLength":1,"type":"string"}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"number"}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosBulk-delete"}},"/v1/videos/{id}/upload-init":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","contentType"],"properties":{"filename":{"minLength":1,"type":"string"},"contentType":{"minLength":1,"type":"string"},"size":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["filename","contentType"],"properties":{"filename":{"minLength":1,"type":"string"},"contentType":{"minLength":1,"type":"string"},"size":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["filename","contentType"],"properties":{"filename":{"minLength":1,"type":"string"},"contentType":{"minLength":1,"type":"string"},"size":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["uploadId","key","partSize","urls"],"properties":{"uploadId":{"type":"string"},"key":{"type":"string"},"partSize":{"type":"number"},"urls":{"description":"Presigned PUT URLs, one per part in order (part N = urls[N-1]). Empty when `size` was omitted — fall back to `upload-part-url`.","type":"array","items":{"type":"string"}}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdUpload-init"}},"/v1/videos/{id}/upload-part-url":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["uploadId","partNumber"],"properties":{"uploadId":{"type":"string"},"partNumber":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["uploadId","partNumber"],"properties":{"uploadId":{"type":"string"},"partNumber":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["uploadId","partNumber"],"properties":{"uploadId":{"type":"string"},"partNumber":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdUpload-part-url"}},"/v1/videos/{id}/upload-complete":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["uploadId","parts"],"properties":{"uploadId":{"type":"string"},"parts":{"type":"array","items":{"type":"object","required":["partNumber","etag"],"properties":{"partNumber":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"etag":{"type":"string"}}}}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["uploadId","parts"],"properties":{"uploadId":{"type":"string"},"parts":{"type":"array","items":{"type":"object","required":["partNumber","etag"],"properties":{"partNumber":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"etag":{"type":"string"}}}}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["uploadId","parts"],"properties":{"uploadId":{"type":"string"},"parts":{"type":"array","items":{"type":"object","required":["partNumber","etag"],"properties":{"partNumber":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"etag":{"type":"string"}}}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdUpload-complete"}},"/v1/videos/{id}/upload-abort":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["uploadId"],"properties":{"uploadId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["uploadId"],"properties":{"uploadId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["uploadId"],"properties":{"uploadId":{"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["aborted"],"properties":{"aborted":{"type":"boolean"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdUpload-abort"}},"/v1/videos/{id}/subtitles/link":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["language","name","vttUrl"],"properties":{"language":{"minLength":1,"maxLength":16,"type":"string"},"name":{"minLength":1,"type":"string"},"vttUrl":{"minLength":1,"type":"string"},"isDefault":{"type":"boolean"},"isForced":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["language","name","vttUrl"],"properties":{"language":{"minLength":1,"maxLength":16,"type":"string"},"name":{"minLength":1,"type":"string"},"vttUrl":{"minLength":1,"type":"string"},"isDefault":{"type":"boolean"},"isForced":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["language","name","vttUrl"],"properties":{"language":{"minLength":1,"maxLength":16,"type":"string"},"name":{"minLength":1,"type":"string"},"vttUrl":{"minLength":1,"type":"string"},"isDefault":{"type":"boolean"},"isForced":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","videoId","language","name","vttPath","isDefault","isForced","normalized","createdAt"],"properties":{"id":{"type":"string"},"videoId":{"type":"string"},"language":{"type":"string"},"name":{"type":"string"},"vttPath":{"type":"string"},"isDefault":{"type":"boolean"},"isForced":{"type":"boolean"},"normalized":{"type":"boolean"},"createdAt":{}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdSubtitlesLink"}},"/v1/videos/{id}/subtitles/{lang}":{"delete":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"deleteV1VideosByIdSubtitlesByLang"}},"/v1/videos/{id}/playback-token":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["token","expiresAt"],"properties":{"token":{"type":"string"},"expiresAt":{"type":"string"}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdPlayback-token"}},"/v1/videos/{id}/mp4":{"get":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["url","expiresAt"],"properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1VideosByIdMp4"}},"/v1/videos/{id}/retranscode":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdRetranscode"}},"/v1/videos/retranscode-failed":{"post":{"tags":["Videos"],"summary":"Re-enqueue failed videos","description":"Re-queue failed videos for the organization, optionally narrowed to a collection (`collectionId`) or an explicit id set (`ids`). Videos whose original was reclaimed are skipped; the response reports how many were `queued` vs `skipped`. Jobs go to the bulk lane so they never starve live uploads.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"maxItems":500,"type":"array","items":{"minLength":1,"type":"string"}},"collectionId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"ids":{"maxItems":500,"type":"array","items":{"minLength":1,"type":"string"}},"collectionId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"ids":{"maxItems":500,"type":"array","items":{"minLength":1,"type":"string"}},"collectionId":{"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["queued","skipped"],"properties":{"queued":{"type":"number"},"skipped":{"type":"number"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosRetranscode-failed"}},"/v1/videos/{id}/thumbnail":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["atSecs"],"properties":{"atSecs":{"minimum":0,"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["atSecs"],"properties":{"atSecs":{"minimum":0,"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["atSecs"],"properties":{"atSecs":{"minimum":0,"type":"number"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdThumbnail"}},"/v1/videos/{id}/poster":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file"],"properties":{"file":{"default":"File","type":"string","maxSize":10485760,"extension":["image/jpeg","image/png","image/webp"],"format":"binary"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["file"],"properties":{"file":{"default":"File","type":"string","maxSize":10485760,"extension":["image/jpeg","image/png","image/webp"],"format":"binary"}}}},"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"default":"File","type":"string","maxSize":10485760,"extension":["image/jpeg","image/png","image/webp"],"format":"binary"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","orgId","collectionId","title","status","originalFilename","originalSize","sourceUrl","durationSecs","width","height","codec","visibility","playbackUrl","posterUrl","masterPath","dashPath","mp4Path","posterPath","storyboardPath","spritePath","renditions","autoCaption","captionStatus","error","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orgId":{"type":"string"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"status":{"description":"Lifecycle stage: created · uploading · queued · transcoding · ready · failed. Media paths and URLs below are only populated once status is `ready`.","type":"string"},"originalFilename":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalSize":{"anyOf":[{"description":"Source file size in bytes.","type":"number"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"description":"Remote source URL for videos imported from a URL; used to re-fetch on re-transcode. `null` for uploads.","type":"string"},{"type":"null"}]},"durationSecs":{"anyOf":[{"type":"number"},{"type":"null"}]},"width":{"anyOf":[{"type":"number"},{"type":"null"}]},"height":{"anyOf":[{"type":"number"},{"type":"null"}]},"codec":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"description":"`private` (signed playback) or `public` (embeddable).","type":"string"},"playbackUrl":{"anyOf":[{"description":"**Absolute** HLS master playlist URL — ready to hand to any video player. For `private` videos append a signed token from `POST /v1/videos/{id}/playback-token` as `?token=<jwt>`; `public` videos play without a token. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"posterUrl":{"anyOf":[{"description":"Absolute poster/thumbnail URL. `null` until `status` is `ready`.","type":"string"},{"type":"null"}]},"masterPath":{"anyOf":[{"description":"Storage key of the HLS master playlist, e.g. `{orgId}/{videoId}/hls/master.m3u8`. Use `playbackUrl` instead — it is the same path with the media base already prepended.","type":"string"},{"type":"null"}]},"dashPath":{"anyOf":[{"description":"MPEG-DASH manifest key (`manifest.mpd`) relative to the video base URL. Only present when DASH packaging is enabled; otherwise `null`.","type":"string"},{"type":"null"}]},"mp4Path":{"anyOf":[{"description":"Progressive MP4 key (top rendition) relative to the video base URL. Prefer the signed `GET /v1/videos/{id}/mp4` endpoint for a downloadable URL. `null` until `ready`.","type":"string"},{"type":"null"}]},"posterPath":{"anyOf":[{"description":"Storage key of the poster/thumbnail. Use `posterUrl` instead — it is the absolute URL.","type":"string"},{"type":"null"}]},"storyboardPath":{"anyOf":[{"description":"WebVTT thumbnails track (`thumbnails.vtt`) for scrub previews, relative to the video base URL.","type":"string"},{"type":"null"}]},"spritePath":{"anyOf":[{"description":"Storyboard sprite sheet (`sprite.jpg`) referenced by the thumbnails VTT.","type":"string"},{"type":"null"}]},"renditions":{"anyOf":[{"description":"Encoded ABR ladder. Each entry maps to a variant playlist in the master.","type":"array","items":{"additionalProperties":true,"type":"object","required":["height","videoBitrate","playlist"],"properties":{"height":{"description":"Rendition height in pixels (e.g. 1080, 720).","type":"number"},"videoBitrate":{"description":"Target video bitrate, e.g. \"5000k\".","type":"string"},"playlist":{"description":"Variant playlist filename relative to the master, e.g. \"1080p.m3u8\".","type":"string"}}}},{"type":"null"}]},"autoCaption":{"type":"boolean"},"captionStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"description":"Failure reason when `status` is `failed`.","type":"string"},{"type":"null"}]},"createdAt":{},"updatedAt":{}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdPoster"}},"/v1/videos/{id}/subtitles/upload":{"post":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file","language","name"],"properties":{"file":{"default":"File","maxSize":2097152,"type":"string","format":"binary"},"language":{"minLength":1,"maxLength":16,"type":"string"},"name":{"minLength":1,"type":"string"},"isDefault":{"anyOf":[{"type":"boolean"},{"format":"boolean","default":false,"type":"string"}]},"isForced":{"anyOf":[{"type":"boolean"},{"format":"boolean","default":false,"type":"string"}]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["file","language","name"],"properties":{"file":{"default":"File","maxSize":2097152,"type":"string","format":"binary"},"language":{"minLength":1,"maxLength":16,"type":"string"},"name":{"minLength":1,"type":"string"},"isDefault":{"anyOf":[{"type":"boolean"},{"format":"boolean","default":false,"type":"string"}]},"isForced":{"anyOf":[{"type":"boolean"},{"format":"boolean","default":false,"type":"string"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["file","language","name"],"properties":{"file":{"default":"File","maxSize":2097152,"type":"string","format":"binary"},"language":{"minLength":1,"maxLength":16,"type":"string"},"name":{"minLength":1,"type":"string"},"isDefault":{"anyOf":[{"type":"boolean"},{"format":"boolean","default":false,"type":"string"}]},"isForced":{"anyOf":[{"type":"boolean"},{"format":"boolean","default":false,"type":"string"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","videoId","language","name","vttPath","isDefault","isForced","normalized","createdAt"],"properties":{"id":{"type":"string"},"videoId":{"type":"string"},"language":{"type":"string"},"name":{"type":"string"},"vttPath":{"type":"string"},"isDefault":{"type":"boolean"},"isForced":{"type":"boolean"},"normalized":{"type":"boolean"},"createdAt":{}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdSubtitlesUpload"}},"/v1/collections/":{"post":{"tags":["Collections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","orgId","name","slug","videoCount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"videoCount":{"type":"number"},"createdAt":{},"updatedAt":{}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1Collections"},"get":{"tags":["Collections"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"minimum":0,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":0,"type":"number"}]}},{"name":"pageSize","in":"query","required":false,"schema":{"minimum":1,"maximum":100,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":1,"maximum":100,"type":"number"}]}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["items","page","pageSize","total","pageCount"],"properties":{"items":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"},"pageCount":{"type":"number"}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1Collections"}},"/v1/collections/{id}":{"get":{"tags":["Collections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","orgId","name","slug","videoCount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"videoCount":{"type":"number"},"createdAt":{},"updatedAt":{}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1CollectionsById"},"patch":{"tags":["Collections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"additionalProperties":true,"type":"object","required":["id","orgId","name","slug","videoCount","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"orgId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"videoCount":{"type":"number"},"createdAt":{},"updatedAt":{}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"patchV1CollectionsById"},"delete":{"tags":["Collections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"deleteV1CollectionsById"}},"/v1/collections/{id}/videos/{videoId}":{"put":{"tags":["Collections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"videoId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["assigned"],"properties":{"assigned":{"type":"boolean"}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"putV1CollectionsByIdVideosByVideoId"},"delete":{"tags":["Collections"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"videoId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["removed"],"properties":{"removed":{"type":"boolean"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"deleteV1CollectionsByIdVideosByVideoId"}},"/v1/videos/{id}/chapters":{"get":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"array","items":{"additionalProperties":true,"type":"object","required":["id","videoId","startSecs","title","createdAt"],"properties":{"id":{"type":"string"},"videoId":{"type":"string"},"startSecs":{"type":"number"},"title":{"type":"string"},"createdAt":{}}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1VideosByIdChapters"},"put":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chapters"],"properties":{"chapters":{"maxItems":500,"type":"array","items":{"type":"object","required":["startSecs","title"],"properties":{"startSecs":{"minimum":0,"type":"number"},"title":{"minLength":1,"maxLength":255,"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["chapters"],"properties":{"chapters":{"maxItems":500,"type":"array","items":{"type":"object","required":["startSecs","title"],"properties":{"startSecs":{"minimum":0,"type":"number"},"title":{"minLength":1,"maxLength":255,"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["chapters"],"properties":{"chapters":{"maxItems":500,"type":"array","items":{"type":"object","required":["startSecs","title"],"properties":{"startSecs":{"minimum":0,"type":"number"},"title":{"minLength":1,"maxLength":255,"type":"string"}}}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"array","items":{"additionalProperties":true,"type":"object","required":["id","videoId","startSecs","title","createdAt"],"properties":{"id":{"type":"string"},"videoId":{"type":"string"},"startSecs":{"type":"number"},"title":{"type":"string"},"createdAt":{}}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"putV1VideosByIdChapters"}},"/v1/tus/":{"post":{"tags":["Upload"],"operationId":"postV1Tus"}},"/v1/tus/{id}":{"head":{"tags":["Upload"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"headV1TusById"},"patch":{"tags":["Upload"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"patchV1TusById"},"delete":{"tags":["Upload"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteV1TusById"}},"/v1/videos/{id}/events":{"post":{"tags":["Analytics"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sessionId","event","positionSecs"],"properties":{"sessionId":{"minLength":1,"maxLength":64,"type":"string"},"event":{"type":"string","enum":["play","progress","ended"]},"positionSecs":{"minimum":0,"type":"number"},"watchedSecs":{"minimum":0,"type":"number"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["sessionId","event","positionSecs"],"properties":{"sessionId":{"minLength":1,"maxLength":64,"type":"string"},"event":{"type":"string","enum":["play","progress","ended"]},"positionSecs":{"minimum":0,"type":"number"},"watchedSecs":{"minimum":0,"type":"number"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["sessionId","event","positionSecs"],"properties":{"sessionId":{"minLength":1,"maxLength":64,"type":"string"},"event":{"type":"string","enum":["play","progress","ended"]},"positionSecs":{"minimum":0,"type":"number"},"watchedSecs":{"minimum":0,"type":"number"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"postV1VideosByIdEvents"}},"/v1/videos/{id}/analytics":{"get":{"tags":["Analytics"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["totals","daily","byCountry"],"properties":{"totals":{"type":"object","required":["views","uniqueSessions","watchSecs","avgCompletion"],"properties":{"views":{"type":"number"},"uniqueSessions":{"type":"number"},"watchSecs":{"type":"number"},"avgCompletion":{"type":"number"}}},"daily":{"type":"array","items":{"type":"object","required":["day","views","uniqueSessions","watchSecs","avgCompletion"],"properties":{"day":{"type":"string"},"views":{"type":"number"},"uniqueSessions":{"type":"number"},"watchSecs":{"type":"number"},"avgCompletion":{"type":"number"}}}},"byCountry":{"type":"array","items":{"type":"object","required":["country","views"],"properties":{"country":{"type":"string"},"views":{"type":"number"}}}}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1VideosByIdAnalytics"}},"/v1/analytics/overview":{"get":{"tags":["Analytics"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["totals","daily","topVideos"],"properties":{"totals":{"type":"object","required":["views","watchSecs","bandwidthBytes","streamSecs"],"properties":{"views":{"type":"number"},"watchSecs":{"type":"number"},"bandwidthBytes":{"type":"number"},"streamSecs":{"type":"number"}}},"daily":{"type":"array","items":{"type":"object","required":["day","views","watchSecs"],"properties":{"day":{"type":"string"},"views":{"type":"number"},"watchSecs":{"type":"number"}}}},"topVideos":{"type":"array","items":{"type":"object","required":["id","title","views","watchSecs"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"views":{"type":"number"},"watchSecs":{"type":"number"}}}}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1AnalyticsOverview"}},"/v1/embed/{id}":{"get":{"tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["id","title","masterPath","posterPath","storyboardPath","spritePath","token","expiresAt"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"masterPath":{"type":"string"},"posterPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"storyboardPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"spritePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"token":{"type":"string"},"expiresAt":{"type":"string"}}}},"additionalProperties":false}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1EmbedById"}},"/v1/usage/":{"get":{"tags":["Usage"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"const":true,"type":"boolean"},"data":{"type":"object","required":["videos","storageBytes","limits"],"properties":{"videos":{"type":"number"},"storageBytes":{"type":"number"},"limits":{"type":"object","required":["maxVideos","maxStorageBytes"],"properties":{"maxVideos":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxStorageBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}}}}}},"additionalProperties":false}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"operationId":"getV1Usage"}},"/healthz":{"get":{"tags":["Health"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}}}}}},"operationId":"getHealthz"}},"/readyz":{"get":{"tags":["Health"],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["ready","checks"],"properties":{"ready":{"type":"boolean"},"checks":{"type":"object","required":["db","storage"],"properties":{"db":{"type":"boolean"},"storage":{"type":"boolean"}}}}}}}},"503":{"description":"Response for status 503","content":{"application/json":{"schema":{"type":"object","required":["ready","checks"],"properties":{"ready":{"type":"boolean"},"checks":{"type":"object","required":["db","storage"],"properties":{"db":{"type":"boolean"},"storage":{"type":"boolean"}}}}}}}}},"operationId":"getReadyz"}}}}