{"openapi":"3.1.0","info":{"title":"Fastwater API","version":"1","description":"All routes are under `/v1` and take a bearer token: a Clerk API key, an OAuth\naccess token, or a dashboard session token. Errors have one shape:\n`{ \"error\": { \"code\", \"message\", \"requestId\" } }`.\n\n## Quick start\n\n1. **Create an API key.** In the dashboard, open *Account*, then *Create an\n   API key* under API keys. A full-access key can do anything you can; a\n   limited key has only the scopes you pick.\n\n   ```sh\n   export CLOUD_API_KEY=ak_...\n   export CLOUD=https://fastwater.app\n   ```\n\n2. **Check the cache.** Cached torrents complete at once.\n\n   ```sh\n   curl \"$CLOUD/v1/cache?hash=08ada5a7a6183aae1e09d831df6748d566095a10\" \\\n     -H \"Authorization: Bearer $CLOUD_API_KEY\"\n   ```\n\n3. **Add a magnet.**\n\n   ```sh\n   curl -X POST \"$CLOUD/v1/transfers\" \\\n     -H \"Authorization: Bearer $CLOUD_API_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"magnet\":\"magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel\"}'\n   ```\n\n4. **Poll the transfer** every few seconds until `status` is `completed`.\n   The response lists the new `fileIds`.\n\n   ```sh\n   curl \"$CLOUD/v1/transfers/$TRANSFER_ID\" -H \"Authorization: Bearer $CLOUD_API_KEY\"\n   ```\n\n5. **Get a playback URL.** It supports HTTP Range and expires at\n   `expiresAt`. When it returns `403`, ask for a new one. The response also\n   has signed WebVTT subtitle URLs and the saved position.\n\n   ```sh\n   curl -X POST \"$CLOUD/v1/files/$FILE_ID/playback\" -H \"Authorization: Bearer $CLOUD_API_KEY\"\n   ```\n\n6. **Save progress** about every 10 seconds and on pause.\n\n   ```sh\n   curl -X PUT \"$CLOUD/v1/files/$FILE_ID/progress\" \\\n     -H \"Authorization: Bearer $CLOUD_API_KEY\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"positionSeconds\":120,\"durationSeconds\":888}'\n   ```\n\n## TypeScript\n\n`@putflix/cloud-sdk` wraps every route:\n\n```ts\nconst cloud = createCloudClient({ baseUrl: CLOUD, getToken: () => CLOUD_API_KEY });\nconst transfer = await cloud.addMagnet(magnet);\nconst playback = await cloud.getPlayback(transfer.fileIds[0]);\n```\n\n## AI assistants (MCP)\n\nFastwater is a remote MCP server at `https://fastwater.app/mcp`\n(Streamable HTTP). ChatGPT and Claude, on the web and on phones, can add\nmagnets, follow transfers, search your library, and give you links. Sign-in\nis OAuth: the assistant opens Fastwater's sign-in, and the connection then\nshows under *Connected apps* on the Account page, where you revoke it.\n\n- **Claude**: *Settings*, *Connectors*, *Add custom connector*, then the URL.\n  It also works in the Claude mobile apps once added.\n- **ChatGPT**: *Settings*, *Apps*, *Advanced settings*, turn on *Developer\n  mode*, then *Create app* with the URL and OAuth.\n- **Claude Code**: `claude mcp add --transport http fastwater https://fastwater.app/mcp`.\n- **Other clients** (Cursor, Codex, scripts): the same URL. A client without\n  OAuth sends an API key as `Authorization: Bearer`.\n\nTools wrap the routes below and return the same JSON. Fastwater does not\nsearch for torrents: the assistant uses magnets you give it.\n\n## Command line\n\n`fastwater` (npm package `@fastwaterapp/cli`) adds magnets, waits for transfers, lists and downloads\nfiles, and prints links. Every command takes `--json`, so agents with a\nshell use it too.\n\n```sh\nnpx @fastwaterapp/cli login                     # approve the code in the browser\nnpx @fastwaterapp/cli add \"$MAGNET\" --wait\nnpx @fastwaterapp/cli files sintel\nnpx @fastwaterapp/cli download $FILE_ID -o ~/Downloads\nnpx @fastwaterapp/cli skill install             # the agent skill, for Claude Code\n```\n\nSign-in pairs the computer like a TV: it is listed under *TV and devices*.\nFor CI, pipe an API key into `fastwater login --with-token` or set\n`FASTWATER_TOKEN`. Exit codes: 0 success, 1 API error, 2 usage, 3 not\nsigned in.\n\n## Docs for agents\n\n`/llms.txt` lists these docs. `/docs.md` (also `/llms-full.txt`) is\nthis page as Markdown, and `/docs` returns it for `Accept: text/markdown`.\n\n## OAuth apps\n\nThird-party apps use Clerk's OAuth endpoints (authorization code with PKCE)\nand these scopes: `files:read`, `files:write`, `progress:write`,\n`transfers:read`, `transfers:write`. Users revoke apps on the Account page.\n\n## WebDAV\n\nOn Standard and Pro, `https://fastwater.app/dav/` serves your files\nread-only over WebDAV: one folder per transfer, its files inside. Create a key\non the Account page (*WebDAV*, *Create a WebDAV key*), one per app. Any\nusername works; the key is the password. For an app without a password field,\nuse the link with the key in it, `https://fastwater.app/dav/<key>/`, and\nkeep it secret. Sign a key out under *TV and devices*.\n\nFiles open through a redirect to a signed storage URL, so the client must\nfollow redirects. WebDAV does not save watch progress.\n\n- **rclone**:\n\n  ```sh\n  rclone config create fastwater webdav url=https://fastwater.app/dav/ \\\n    vendor=other user=fastwater pass=$WEBDAV_KEY --obscure\n  rclone mount fastwater: ~/Fastwater --read-only --vfs-cache-mode minimal\n  ```\n\n- **Infuse**: *Settings*, *Shares*, *Add Share*, *WebDAV*. Address\n  `fastwater.app`, path `/dav/`, HTTPS on, port 443, then the username and\n  key.\n- **Kodi**: *Videos*, *Files*, *Add videos*, *Browse*, *Add network\n  location*. Protocol *WebDAV server (HTTPS)*, server `fastwater.app`,\n  remote path `dav/`, then the username and key.\n- **VLC** cannot browse WebDAV, but it plays a file's link. Open the link\n  with the key in a browser, copy a file's link, and open it in VLC (*Open\n  Network Stream*).\n- **Finder**: *Go*, *Connect to Server* (⌘K), `https://fastwater.app/dav/`,\n  then sign in as a registered user.\n- **Windows**: `net use F: https://fastwater.app/dav/ /user:fastwater $WEBDAV_KEY`.\n  Windows copies files up to 50 MB by default. To raise the limit to 4 GB,\n  set `FileSizeLimitInBytes` to `0xFFFFFFFF` under\n  `HKLM\\SYSTEM\\CurrentControlSet\\Services\\WebClient\\Parameters` and\n  restart the WebClient service.\n\n### Plex and Jellyfin\n\nMount Fastwater with rclone (above) on the machine that runs the server, as\nthe user the server runs as, then add the mount folder (`~/Fastwater`) to a\nlibrary. The first scan reads the start of every file, so a large library\ntakes a while. Turn off thumbnail and preview generation for the library to\nkeep scans short.\n\n## Stremio\n\nOn Standard and Pro, the Fastwater add-on shows your movies and shows in\nStremio. On the *Apps* page, *Fastwater for Stremio*, *Set up* creates it and\noffers *Install in Stremio*. Its link,\n`https://fastwater.app/stremio/<key>/manifest.json`, holds a key: keep it\nsecret, and sign it out under *TV and devices*. Stremio keeps its own watch\nprogress. `https://fastwater.app/stremio/public/manifest.json` has no key: it is the\nlisting in Stremio's add-on catalog, whose *Configure* button opens the setup\non the *Apps* page. Steps for every app: https://fastwater.app/guides."},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A Clerk session token, OAuth access token, or API key."}},"schemas":{},"parameters":{}},"paths":{"/v1/plans":{"get":{"summary":"Plans, prices, and limits","description":"No token needed. The landing page reads it (PRD §3).","responses":{"200":{"description":"Plans","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]}},"trial":{"type":["object","null"],"properties":{"days":{"type":"integer"},"plan":{"type":"string","enum":["lite","standard","pro"]},"storageQuotaBytes":{"type":"integer"}},"required":["days","plan","storageQuotaBytes"]}},"required":["data","trial"]}}}}}}},"/v1/devices/pairings":{"post":{"summary":"Start device pairing","description":"No token. The device shows the code and a QR code for `verificationUrl`, then polls. The code expires after 10 minutes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["android_tv","fire_tv","apple_tv","lg_tv","samsung_tv","roku","kodi","jellyfin","webdav","stremio","cli","ios","android"]}},"required":["platform"]}}}},"responses":{"201":{"description":"Pairing","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"pollToken":{"type":"string"},"verificationUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"intervalSeconds":{"type":"integer"}},"required":["code","pollToken","verificationUrl","expiresAt","intervalSeconds"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices/pairings/poll":{"post":{"summary":"Poll a device pairing","description":"No token. Poll every `intervalSeconds`. After the user approves, the first poll returns the API key, once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pollToken":{"type":"string","minLength":1}},"required":["pollToken"]}}}},"responses":{"200":{"description":"Pending, or claimed with the key","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["claimed"]},"apiKey":{"type":"string"},"device":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["android_tv","fire_tv","apple_tv","lg_tv","samsung_tv","roku","kodi","jellyfin","webdav","stremio","cli","ios","android"]},"createdAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","name","platform","createdAt","lastSeenAt"]}},"required":["status","apiKey","device"]}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/archives/{token}":{"get":{"summary":"A zip from POST /v1/files/archive","description":"The link `POST /v1/files/archive` returns. It needs no token.","parameters":[{"schema":{"type":"string","minLength":10,"maxLength":8000},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"The zip","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/shared/{token}":{"get":{"summary":"The files a share link opens","description":"Needs no token. Send the browser's `viewerId` to learn whether it can still play (`canWatch`).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"token","in":"path"},{"schema":{"type":"string","minLength":8,"maxLength":100},"required":false,"name":"viewerId","in":"query"}],"responses":{"200":{"description":"Shared files","content":{"application/json":{"schema":{"type":"object","properties":{"senderName":{"type":["string","null"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer"},"type":{"type":"string","enum":["video","audio","image","subtitle","other"]},"playable":{"type":"boolean"},"durationSeconds":{"type":["number","null"]},"media":{"type":["object","null"],"properties":{"titleId":{"type":"string"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"season":{"type":["integer","null"]},"episode":{"type":["integer","null"]},"episodeName":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]}},"required":["titleId","kind","title","year","season","episode","episodeName","stillPath","posterPath","backdropPath","logoPath"]}},"required":["id","name","sizeBytes","type","playable","durationSeconds","media"]}},"maxViewers":{"type":"integer"},"viewers":{"type":"integer"},"canWatch":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"}},"required":["senderName","files","maxViewers","viewers","canWatch","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/shared/{token}/files/{fileId}/playback":{"post":{"summary":"Play a shared file","description":"Needs no token. The first call from a `viewerId` takes a viewer place, and fails with `403` when every place is taken. The URL supports HTTP Range and never outlives the link.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"token","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"fileId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"viewerId":{"type":"string","minLength":8,"maxLength":100},"deviceLabel":{"type":"string","minLength":1,"maxLength":100},"hevc":{"type":"string","enum":["none","main","main10"]}},"required":["viewerId"]}}}},"responses":{"200":{"description":"Playback","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"},"mimeType":{"type":"string"},"playable":{"type":"boolean"},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"subtitles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"language":{"type":["string","null"]},"label":{"type":"string"},"forced":{"type":"boolean"},"default":{"type":"boolean"},"source":{"type":"string","enum":["embedded","external","opensubtitles","subdl","generated"]},"url":{"type":"string","format":"uri"}},"required":["id","language","label","forced","default","source","url"]}},"conversion":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["queued","converting","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"etaSeconds":{"type":["integer","null"],"minimum":0}},"required":["state","progress","etaSeconds"]}},"required":["url","expiresAt","mimeType","playable","progress","subtitles","conversion"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/me":{"get":{"summary":"The signed-in user, plan, and storage usage","security":[{"bearer":[]}],"responses":{"200":{"description":"Account","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","status","createdAt"]},"subscription":{"type":["object","null"],"properties":{"status":{"type":"string"},"periodEnd":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"trialEnd":{"type":["string","null"],"format":"date-time"},"needsPaymentMethod":{"type":"boolean"}},"required":["status","periodEnd","active","trialEnd","needsPaymentMethod"]},"plan":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["id","name","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"storage":{"type":"object","properties":{"usedBytes":{"type":"integer"},"reservedBytes":{"type":"integer"},"quotaBytes":{"type":"integer"}},"required":["usedBytes","reservedBytes","quotaBytes"]},"settings":{"type":"object","properties":{"fileRetentionDays":{"type":["integer","null"],"minimum":1,"maximum":3650},"audioLanguage":{"type":["string","null"],"enum":["en","es","fr","de","it","pt","nl","sv","no","da","fi","is","pl","cs","sk","hu","ro","bg","hr","sr","sl","et","lv","lt","el","tr","ru","uk","ca","eu","gl","he","ar","fa","hi","bn","ta","te","th","vi","id","ms","tl","zh","ja","ko",null]},"subtitleLanguage":{"type":["string","null"],"enum":["en","es","fr","de","it","pt","nl","sv","no","da","fi","is","pl","cs","sk","hu","ro","bg","hr","sr","sl","et","lv","lt","el","tr","ru","uk","ca","eu","gl","he","ar","fa","hi","bn","ta","te","th","vi","id","ms","tl","zh","ja","ko",null]}},"required":["fileRetentionDays","audioLanguage","subtitleLanguage"]},"tvPaired":{"type":"boolean"},"household":{"type":["object","null"],"properties":{"role":{"type":"string","enum":["owner","member"]},"owner":{"type":"object","properties":{"email":{"type":["string","null"]}},"required":["email"]},"people":{"type":"integer"},"own":{"type":"object","properties":{"usedBytes":{"type":"integer"},"limitBytes":{"type":["integer","null"]}},"required":["usedBytes","limitBytes"]}},"required":["role","owner","people","own"]}},"required":["user","subscription","plan","storage","settings","tvPaired","household"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/me/settings":{"patch":{"summary":"Change account settings","description":"`fileRetentionDays` deletes each file that many days after it was added; `null` keeps files until you delete them. Files you already have count from the day of the change. A plan's own retention (Lite) still applies; the earlier date wins. `audioLanguage` and `subtitleLanguage` are ISO 639-1 codes every app starts playback with: the audio track in that language when a file has one (`null` plays the file's default track), and subtitles in that language when a file has them (`null` keeps subtitles off). Leave a field out to keep its value. Changing `fileRetentionDays` needs the `files:write` scope; the languages need only `progress:write`, which TV keys have.","security":[{"bearer":["progress:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileRetentionDays":{"type":["integer","null"],"minimum":1,"maximum":3650},"audioLanguage":{"type":["string","null"],"enum":["en","es","fr","de","it","pt","nl","sv","no","da","fi","is","pl","cs","sk","hu","ro","bg","hr","sr","sl","et","lv","lt","el","tr","ru","uk","ca","eu","gl","he","ar","fa","hi","bn","ta","te","th","vi","id","ms","tl","zh","ja","ko",null]},"subtitleLanguage":{"type":["string","null"],"enum":["en","es","fr","de","it","pt","nl","sv","no","da","fi","is","pl","cs","sk","hu","ro","bg","hr","sr","sl","et","lv","lt","el","tr","ru","uk","ca","eu","gl","he","ar","fa","hi","bn","ta","te","th","vi","id","ms","tl","zh","ja","ko",null]}}}}}},"responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"fileRetentionDays":{"type":["integer","null"],"minimum":1,"maximum":3650},"audioLanguage":{"type":["string","null"],"enum":["en","es","fr","de","it","pt","nl","sv","no","da","fi","is","pl","cs","sk","hu","ro","bg","hr","sr","sl","et","lv","lt","el","tr","ru","uk","ca","eu","gl","he","ar","fa","hi","bn","ta","te","th","vi","id","ms","tl","zh","ja","ko",null]},"subtitleLanguage":{"type":["string","null"],"enum":["en","es","fr","de","it","pt","nl","sv","no","da","fi","is","pl","cs","sk","hu","ro","bg","hr","sr","sl","et","lv","lt","el","tr","ru","uk","ca","eu","gl","he","ar","fa","hi","bn","ta","te","th","vi","id","ms","tl","zh","ja","ko",null]}},"required":["fileRetentionDays","audioLanguage","subtitleLanguage"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers":{"get":{"summary":"List transfers, newest first","security":[{"bearer":["transfers:read"]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Transfers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","downloading","ingesting","completed","failed","cancelled"]},"outcome":{"type":"string","enum":["hit","attached","miss"]},"sourceType":{"type":"string","enum":["magnet","torrent"]},"infoHash":{"type":"string","pattern":"^[0-9a-f]{40}$"},"name":{"type":["string","null"]},"totalBytes":{"type":["integer","null"]},"progress":{"type":"number","minimum":0,"maximum":1},"speedBps":{"type":"integer"},"etaSeconds":{"type":["integer","null"]},"error":{"type":["string","null"]},"folder":{"type":["string","null"]},"fileIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","outcome","sourceType","infoHash","name","totalBytes","progress","speedBps","etaSeconds","error","folder","fileIds","createdAt","updatedAt"]}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Add a magnet link or a .torrent file","description":"Send JSON `{ magnet }`, or multipart form data with a `torrent` file. A cache hit returns a completed transfer at once. Only the prefetch account may send `kind: \"prefetch\"`.","security":[{"bearer":["transfers:write"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"magnet":{"type":"string","minLength":1,"maxLength":8192},"kind":{"type":"string","enum":["user","prefetch"],"default":"user"},"fallbacks":{"type":"array","items":{"type":"string","minLength":1,"maxLength":8192},"maxItems":5},"folder":{"type":"string","minLength":1,"maxLength":255}},"required":["magnet"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"torrent":{"type":"string","format":"binary"}},"required":["torrent"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","downloading","ingesting","completed","failed","cancelled"]},"outcome":{"type":"string","enum":["hit","attached","miss"]},"sourceType":{"type":"string","enum":["magnet","torrent"]},"infoHash":{"type":"string","pattern":"^[0-9a-f]{40}$"},"name":{"type":["string","null"]},"totalBytes":{"type":["integer","null"]},"progress":{"type":"number","minimum":0,"maximum":1},"speedBps":{"type":"integer"},"etaSeconds":{"type":["integer","null"]},"error":{"type":["string","null"]},"folder":{"type":["string","null"]},"fileIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","outcome","sourceType","infoHash","name","totalBytes","progress","speedBps","etaSeconds","error","folder","fileIds","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/{id}":{"get":{"summary":"Get a transfer","security":[{"bearer":["transfers:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Transfer","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","downloading","ingesting","completed","failed","cancelled"]},"outcome":{"type":"string","enum":["hit","attached","miss"]},"sourceType":{"type":"string","enum":["magnet","torrent"]},"infoHash":{"type":"string","pattern":"^[0-9a-f]{40}$"},"name":{"type":["string","null"]},"totalBytes":{"type":["integer","null"]},"progress":{"type":"number","minimum":0,"maximum":1},"speedBps":{"type":"integer"},"etaSeconds":{"type":["integer","null"]},"error":{"type":["string","null"]},"folder":{"type":["string","null"]},"fileIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","outcome","sourceType","infoHash","name","totalBytes","progress","speedBps","etaSeconds","error","folder","fileIds","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Cancel an active transfer","security":[{"bearer":["transfers:write"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","downloading","ingesting","completed","failed","cancelled"]},"outcome":{"type":"string","enum":["hit","attached","miss"]},"sourceType":{"type":"string","enum":["magnet","torrent"]},"infoHash":{"type":"string","pattern":"^[0-9a-f]{40}$"},"name":{"type":["string","null"]},"totalBytes":{"type":["integer","null"]},"progress":{"type":"number","minimum":0,"maximum":1},"speedBps":{"type":"integer"},"etaSeconds":{"type":["integer","null"]},"error":{"type":["string","null"]},"folder":{"type":["string","null"]},"fileIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","outcome","sourceType","infoHash","name","totalBytes","progress","speedBps","etaSeconds","error","folder","fileIds","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/transfers/{id}/retry":{"post":{"summary":"Retry a failed or cancelled transfer","description":"Creates a new transfer from the same magnet or .torrent file.","security":[{"bearer":["transfers:write"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","downloading","ingesting","completed","failed","cancelled"]},"outcome":{"type":"string","enum":["hit","attached","miss"]},"sourceType":{"type":"string","enum":["magnet","torrent"]},"infoHash":{"type":"string","pattern":"^[0-9a-f]{40}$"},"name":{"type":["string","null"]},"totalBytes":{"type":["integer","null"]},"progress":{"type":"number","minimum":0,"maximum":1},"speedBps":{"type":"integer"},"etaSeconds":{"type":["integer","null"]},"error":{"type":["string","null"]},"folder":{"type":["string","null"]},"fileIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","status","outcome","sourceType","infoHash","name","totalBytes","progress","speedBps","etaSeconds","error","folder","fileIds","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files":{"get":{"summary":"List files, newest first","description":"Filter by name (`q`), `type`, `transferId`, or `folder`; `filed=false` leaves out files filed under a folder. Each file includes its watch progress.","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["video","audio","image","subtitle","other"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"transferId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"folder","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"filed","in":"query"}],"responses":{"200":{"description":"Files","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"type":{"type":"string","enum":["video","audio","image","subtitle","other"]},"playable":{"type":"boolean"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]},"original":{"type":["object","null"],"properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]}},"required":["name","sizeBytes","mimeType","mediaInfo"]},"subtitleCount":{"type":"integer"},"transferId":{"type":"string"},"folder":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"media":{"type":["object","null"],"properties":{"titleId":{"type":"string"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"season":{"type":["integer","null"]},"episode":{"type":["integer","null"]},"episodeName":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]}},"required":["titleId","kind","title","year","season","episode","episodeName","stillPath","posterPath","backdropPath","logoPath"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sizeBytes","mimeType","type","playable","mediaInfo","subtitleCount","transferId","progress","expiresAt","createdAt","updatedAt"]}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/folders":{"get":{"summary":"List the folders transfers were filed under, newest first","description":"A transfer added with `folder` (such as a show's `Name (Year)`) is filed under it. List a folder's files with `GET /files?folder=`.","security":[{"bearer":["files:read"]}],"responses":{"200":{"description":"Folders","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"fileCount":{"type":"integer"},"sizeBytes":{"type":"integer"},"updatedAt":{"type":"string","format":"date-time"}},"required":["name","fileCount","sizeBytes","updatedAt"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/folders/delete":{"post":{"summary":"Delete every file in a folder","description":"The folder's name matches without case, as in `GET /folders`. `deleted` counts the files.","security":[{"bearer":["files:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"integer"}},"required":["deleted"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files/{id}":{"get":{"summary":"Get a file with its media info and watch progress","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"File","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"type":{"type":"string","enum":["video","audio","image","subtitle","other"]},"playable":{"type":"boolean"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]},"original":{"type":["object","null"],"properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]}},"required":["name","sizeBytes","mimeType","mediaInfo"]},"subtitleCount":{"type":"integer"},"transferId":{"type":"string"},"folder":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"media":{"type":["object","null"],"properties":{"titleId":{"type":"string"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"season":{"type":["integer","null"]},"episode":{"type":["integer","null"]},"episodeName":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]}},"required":["titleId","kind","title","year","season","episode","episodeName","stillPath","posterPath","backdropPath","logoPath"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sizeBytes","mimeType","type","playable","mediaInfo","subtitleCount","transferId","progress","expiresAt","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"summary":"Rename a file","security":[{"bearer":["files:write"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"type":{"type":"string","enum":["video","audio","image","subtitle","other"]},"playable":{"type":"boolean"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]},"original":{"type":["object","null"],"properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]}},"required":["name","sizeBytes","mimeType","mediaInfo"]},"subtitleCount":{"type":"integer"},"transferId":{"type":"string"},"folder":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"media":{"type":["object","null"],"properties":{"titleId":{"type":"string"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"season":{"type":["integer","null"]},"episode":{"type":["integer","null"]},"episodeName":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]}},"required":["titleId","kind","title","year","season","episode","episodeName","stillPath","posterPath","backdropPath","logoPath"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sizeBytes","mimeType","type","playable","mediaInfo","subtitleCount","transferId","progress","expiresAt","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Delete a file and its watch progress","security":[{"bearer":["files:write"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files/delete":{"post":{"summary":"Delete many files at once","description":"Up to 500 file IDs. IDs that are not your files are skipped; `deleted` counts the rest.","security":[{"bearer":["files:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":500}},"required":["fileIds"]}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"integer"}},"required":["deleted"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files/archive":{"post":{"summary":"Download many files as one zip","description":"Up to 100 file IDs. Returns a link that works without a token for 10 minutes: open it to download the zip, which streams as it is made. Files are stored uncompressed, so the zip's size is known and downloads show progress.","security":[{"bearer":["files:read"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":100},"original":{"type":"boolean"}},"required":["fileIds"]}}}},"responses":{"200":{"description":"Zip link","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}},"required":["url","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files/{id}/playback":{"post":{"summary":"Get a signed playback URL, subtitles, and the saved position","description":"The URL supports HTTP Range and expires at `expiresAt`. When it returns `403`, call this endpoint again for a new URL.\n\nSend a stable `clientId` per device and the same one with progress updates. Each client that played in the last 60 seconds is a screen; a new client past the plan's screens gets `409` `screen_limit` with the active sessions (PRD §10.2).\n\n`prepare: true` returns the same answer before the Play press, so a player can start buffering on the detail screen: it claims no screen, though it gets `409` `screen_limit` when other clients use every screen, the URL expires within 15 minutes, and it has its own rate limit. On Play, call again without `prepare` while playing the prepared URL, and stop if that call returns `409`.\n\nSend `hevc` with what the screen decodes of HEVC. A screen that cannot decode the file's video plays an H.264 copy, which the worker makes the first time a screen asks. Until it is ready, the answer has `conversion` (queued or converting, with progress), claims no screen (with the same `409` as `prepare`), and its URL is the HEVC file: show the wait, and ask again with `prepare: true` every few seconds until `conversion` is null (PRD §9.3).","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":100},"deviceLabel":{"type":"string","minLength":1,"maxLength":100},"prepare":{"type":"boolean"},"original":{"type":"boolean"},"hevc":{"type":"string","enum":["none","main","main10"]}}}}}},"responses":{"200":{"description":"Playback","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"},"mimeType":{"type":"string"},"playable":{"type":"boolean"},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"subtitles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"language":{"type":["string","null"]},"label":{"type":"string"},"forced":{"type":"boolean"},"default":{"type":"boolean"},"source":{"type":"string","enum":["embedded","external","opensubtitles","subdl","generated"]},"url":{"type":"string","format":"uri"}},"required":["id","language","label","forced","default","source","url"]}},"conversion":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["queued","converting","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"etaSeconds":{"type":["integer","null"],"minimum":0}},"required":["state","progress","etaSeconds"]}},"required":["url","expiresAt","mimeType","playable","progress","subtitles","conversion"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Screen limit (`screen_limit`)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files/{id}/subtitles/{trackId}":{"get":{"summary":"Get a subtitle track as WebVTT","description":"The track `/playback` lists, read through the API. Players that can fetch the signed `url` should; this is for apps installed on a TV, whose requests come from `file://` and which storage's CORS rules do not admit.","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"trackId","in":"path"}],"responses":{"200":{"description":"WebVTT","content":{"text/vtt":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files/{id}/download":{"get":{"summary":"Download a file","description":"Redirects (`302`) to a signed URL with `Content-Disposition: attachment`. With `redirect=false`, returns the URL as JSON.","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"],"default":"true"},"required":false,"name":"redirect","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"original","in":"query"}],"responses":{"200":{"description":"Signed URL (redirect=false)","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}},"required":["url","expiresAt"]}}}},"302":{"description":"Redirect to the signed URL"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/files/{id}/progress":{"get":{"summary":"Get the watch progress of a file","description":"Returns `null` when the user has not played the file.","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Progress","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"summary":"Save the watch progress of a file","description":"Send about every 10 seconds during playback, and on pause. A write with an `updatedAt` older than the stored one is ignored; the response is the stored progress. `409` `playback_stopped` means the user stopped this device's session: stop the player.","security":[{"bearer":["progress:write"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"positionSeconds":{"type":"number","minimum":0,"maximum":10000000},"durationSeconds":{"type":"number","minimum":0,"maximum":10000000},"clientId":{"type":"string","maxLength":100},"updatedAt":{"type":"string","format":"date-time"}},"required":["positionSeconds","durationSeconds"]}}}},"responses":{"200":{"description":"Stored progress","content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Session stopped (`playback_stopped`)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/progress":{"get":{"summary":"Get the watch progress of up to 100 files","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"fileIds","in":"query"}],"responses":{"200":{"description":"Progress for the files the user has played","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/progress/recent":{"get":{"summary":"Continue watching: recent progress, newest first","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"completed","in":"query"}],"responses":{"200":{"description":"Recent progress with each file","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"type":{"type":"string","enum":["video","audio","image","subtitle","other"]},"playable":{"type":"boolean"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]},"original":{"type":["object","null"],"properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]}},"required":["name","sizeBytes","mimeType","mediaInfo"]},"subtitleCount":{"type":"integer"},"transferId":{"type":"string"},"folder":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"media":{"type":["object","null"],"properties":{"titleId":{"type":"string"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"season":{"type":["integer","null"]},"episode":{"type":["integer","null"]},"episodeName":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]}},"required":["titleId","kind","title","year","season","episode","episodeName","stillPath","posterPath","backdropPath","logoPath"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sizeBytes","mimeType","type","playable","mediaInfo","subtitleCount","transferId","progress","expiresAt","createdAt","updatedAt"]}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt","file"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/playback/support":{"get":{"summary":"What the user's screens decode","description":"The least HEVC support among the screens that played in the last 90 days and sent `hevc`, for choosing sources. Null before any did.","security":[{"bearer":["files:read"]}],"responses":{"200":{"description":"HEVC support","content":{"application/json":{"schema":{"type":"object","properties":{"hevc":{"type":["string","null"],"enum":["none","main","main10",null]}},"required":["hevc"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/playback/reports":{"post":{"summary":"Report how a playback went","description":"Startup time, stalls, and throughput for one playback, for the performance report. Send the running totals about every 30 seconds and when the player closes or fails; the last report for a `playbackId` wins.","security":[{"bearer":["progress:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"playbackId":{"type":"string","minLength":8,"maxLength":64},"fileId":{"type":"string","minLength":1,"maxLength":100},"client":{"type":"string","enum":["tv","web","putflix","mobile"]},"device":{"type":"string","maxLength":100},"urlMs":{"type":["integer","null"],"minimum":0,"maximum":600000},"startupMs":{"type":["integer","null"],"minimum":0,"maximum":600000},"firstByteMs":{"type":["integer","null"],"minimum":0,"maximum":600000},"metadataMs":{"type":["integer","null"],"minimum":0,"maximum":600000},"stalls":{"type":"integer","minimum":0,"maximum":100000},"stallMs":{"type":"integer","minimum":0,"maximum":1000000000},"seeks":{"type":"integer","minimum":0,"maximum":100000},"seekWaitMs":{"type":"integer","minimum":0,"maximum":1000000000},"playedMs":{"type":"integer","minimum":0,"maximum":1000000000},"throughputBps":{"type":["integer","null"],"minimum":0,"maximum":100000000000},"droppedFrames":{"type":["integer","null"],"minimum":0,"maximum":1000000000},"error":{"type":["string","null"],"maxLength":500},"timeZone":{"type":["string","null"],"maxLength":64},"prepared":{"type":"boolean"}},"required":["playbackId","fileId","client","urlMs","startupMs","stalls","stallMs","seeks","seekWaitMs","playedMs","throughputBps","droppedFrames","error"]}}}},"responses":{"204":{"description":"Saved"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/playback-sessions":{"get":{"summary":"Devices playing now","description":"Sessions with a playback request or progress update in the last 60 seconds.","security":[{"bearer":["files:read"]}],"responses":{"200":{"description":"Active sessions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/playback-sessions/{id}":{"delete":{"summary":"Stop playback on a device","description":"Frees the screen at once. The device's next progress update gets `409` `playback_stopped`. Its signed URL works until it expires.","security":[{"bearer":["progress:write"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Stopped"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/shares":{"post":{"summary":"Share files with a link","description":"A link that streams up to 100 files to people without a Fastwater account. Each browser that plays from it takes one of `maxViewers` places (up to 10); a full link plays only for the browsers that already have a place. Links last `expiresInDays` (up to 30). Viewers use none of your screens. Deleting a file takes it out of every link.","security":[{"bearer":["files:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":100},"maxViewers":{"type":"integer","minimum":1,"maximum":10,"default":2},"expiresInDays":{"type":"integer","minimum":1,"maximum":30,"default":7}},"required":["fileIds"]}}}},"responses":{"201":{"description":"Share link","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"maxViewers":{"type":"integer"},"viewers":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","files","maxViewers","viewers","expiresAt","revokedAt","createdAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Too many open links","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"summary":"Share links that still work","security":[{"bearer":["files:read"]}],"responses":{"200":{"description":"Share links, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"maxViewers":{"type":"integer"},"viewers":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","files","maxViewers","viewers","expiresAt","revokedAt","createdAt"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/shares/{id}":{"delete":{"summary":"Turn off a share link","description":"The link stops working at once. A viewer who is playing keeps the video until its URL expires.","security":[{"bearer":["files:write"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Turned off"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/cache":{"get":{"summary":"Check which info hashes are cached (up to 50)","description":"`cached` is true when every file of the torrent is stored, so a new transfer completes at once. Send hashes in hex or base32; the response keys are the hashes as sent.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"hash","in":"query"}],"responses":{"200":{"description":"Availability by hash","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"cached":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"playable":{"type":"boolean"},"videoCodec":{"type":["string","null"]},"audioCodecs":{"type":"array","items":{"type":"string"}},"height":{"type":["integer","null"]}},"required":["name","path","sizeBytes","mimeType","playable","videoCodec","audioCodecs","height"]}}},"required":["cached"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Check which info hashes are cached (up to 500)","description":"`cached` is true when every file of the torrent is stored, so a new transfer completes at once. Send hashes in hex or base32; the response keys are the hashes as sent.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hashes":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500}},"required":["hashes"]}}}},"responses":{"200":{"description":"Availability by hash","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"cached":{"type":"boolean"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"playable":{"type":"boolean"},"videoCodec":{"type":["string","null"]},"audioCodecs":{"type":"array","items":{"type":"string"}},"height":{"type":["integer","null"]}},"required":["name","path","sizeBytes","mimeType","playable","videoCodec","audioCodecs","height"]}}},"required":["cached"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/apps":{"get":{"summary":"List the OAuth apps the user authorized","description":"Needs a dashboard session or an API key without scopes.","security":[{"bearer":[]}],"responses":{"200":{"description":"Apps","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"name":{"type":"string"},"firstSeenAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","name","firstSeenAt","lastSeenAt"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/apps/{id}":{"delete":{"summary":"Revoke an app's access","description":"The app's tokens stop working at once. Needs a dashboard session or an API key without scopes.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-keys":{"get":{"summary":"List the user's API keys","description":"Keys of paired devices are under `/devices`. Needs a dashboard session or an API key without scopes.","security":[{"bearer":[]}],"responses":{"200":{"description":"Keys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["files:read","files:write","progress:write","transfers:read","transfers:write"]}},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","name","scopes","createdAt","lastUsedAt"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Create an API key","description":"The secret is in this response only. A key without scopes has full access. Needs a dashboard session or an API key without scopes.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"scopes":{"type":"array","items":{"type":"string","enum":["files:read","files:write","progress:write","transfers:read","transfers:write"]},"maxItems":5}},"required":["name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"},"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["files:read","files:write","progress:write","transfers:read","transfers:write"]}},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","name","scopes","createdAt","lastUsedAt"]}},"required":["secret","key"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A key with this name exists","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-keys/{id}":{"delete":{"summary":"Revoke an API key","description":"The key stops working at once. Needs a dashboard session or an API key without scopes.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices/pairings/{code}":{"get":{"summary":"Look up a pairing code before approving it","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"Pairing","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"platform":{"type":"string","enum":["android_tv","fire_tv","apple_tv","lg_tv","samsung_tv","roku","kodi","jellyfin","webdav","stremio","cli","ios","android"]},"expiresAt":{"type":"string","format":"date-time"}},"required":["code","platform","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices/pairings/{code}/approve":{"post":{"summary":"Approve a pairing code","description":"Signs the device in to this account. Needs a dashboard session or an API key without scopes.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"code","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceName":{"type":"string","minLength":1,"maxLength":60}}}}}},"responses":{"204":{"description":"Approved"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices":{"get":{"summary":"List paired devices","security":[{"bearer":[]}],"responses":{"200":{"description":"Devices","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["android_tv","fire_tv","apple_tv","lg_tv","samsung_tv","roku","kodi","jellyfin","webdav","stremio","cli","ios","android"]},"createdAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","name","platform","createdAt","lastSeenAt"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices/webdav":{"post":{"summary":"Create a WebDAV key","description":"A key with `files:read` for one WebDAV client (PRD §10.1), listed and revoked with the devices. The secret is returned only here. Needs a plan with WebDAV.","security":[{"bearer":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60}}}}}},"responses":{"201":{"description":"Key","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"url":{"type":"string"},"keyUrl":{"type":"string"},"device":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["android_tv","fire_tv","apple_tv","lg_tv","samsung_tv","roku","kodi","jellyfin","webdav","stremio","cli","ios","android"]},"createdAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","name","platform","createdAt","lastSeenAt"]}},"required":["apiKey","url","keyUrl","device"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices/stremio":{"post":{"summary":"Create a Stremio add-on","description":"A key with `files:read` for the Stremio library add-on (PRD §10.5), listed and revoked with the devices. The manifest URL holds the key and is returned only here. Needs a plan with WebDAV.","security":[{"bearer":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60}}}}}},"responses":{"201":{"description":"Add-on","content":{"application/json":{"schema":{"type":"object","properties":{"manifestUrl":{"type":"string"},"installUrl":{"type":"string"},"device":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"platform":{"type":"string","enum":["android_tv","fire_tv","apple_tv","lg_tv","samsung_tv","roku","kodi","jellyfin","webdav","stremio","cli","ios","android"]},"createdAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","name","platform","createdAt","lastSeenAt"]}},"required":["manifestUrl","installUrl","device"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices/current":{"delete":{"summary":"Sign this device out","description":"For a paired device: revokes the key the request uses.","security":[{"bearer":[]}],"responses":{"204":{"description":"Signed out"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/devices/{id}":{"delete":{"summary":"Sign a device out","description":"Revokes the device's API key at once.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/library":{"get":{"summary":"Movies and shows in the user's files, newest addition first","description":"Titles matched to TMDB from the user's video files. Files with no match are only in `/files`. Images are TMDB paths, for `https://image.tmdb.org/t/p/<size><path>`.","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["movie","show"]},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"Titles","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tmdbId":{"type":"integer"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"overview":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]},"genres":{"type":"array","items":{"type":"string"}},"voteAverage":{"type":["number","null"]},"runtime":{"type":["integer","null"]},"releaseDate":{"type":["string","null"]},"seasonCount":{"type":["integer","null"]},"addedAt":{"type":"string","format":"date-time"}},"required":["id","tmdbId","kind","title","year","overview","posterPath","backdropPath","logoPath","genres","voteAverage","runtime","releaseDate","seasonCount","addedAt"]}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/library/movies/{id}":{"get":{"summary":"A movie with the user's copies","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Movie","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tmdbId":{"type":"integer"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"overview":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]},"genres":{"type":"array","items":{"type":"string"}},"voteAverage":{"type":["number","null"]},"runtime":{"type":["integer","null"]},"releaseDate":{"type":["string","null"]},"seasonCount":{"type":["integer","null"]},"addedAt":{"type":"string","format":"date-time"},"cast":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"character":{"type":["string","null"]},"profilePath":{"type":["string","null"]}},"required":["name","character","profilePath"]}},"status":{"type":["string","null"]},"lastAirDate":{"type":["string","null"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"type":{"type":"string","enum":["video","audio","image","subtitle","other"]},"playable":{"type":"boolean"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]},"original":{"type":["object","null"],"properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]}},"required":["name","sizeBytes","mimeType","mediaInfo"]},"subtitleCount":{"type":"integer"},"transferId":{"type":"string"},"folder":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"media":{"type":["object","null"],"properties":{"titleId":{"type":"string"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"season":{"type":["integer","null"]},"episode":{"type":["integer","null"]},"episodeName":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]}},"required":["titleId","kind","title","year","season","episode","episodeName","stillPath","posterPath","backdropPath","logoPath"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sizeBytes","mimeType","type","playable","mediaInfo","subtitleCount","transferId","progress","expiresAt","createdAt","updatedAt"]}}},"required":["id","tmdbId","kind","title","year","overview","posterPath","backdropPath","logoPath","genres","voteAverage","runtime","releaseDate","seasonCount","addedAt","cast","status","lastAirDate","files"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/library/shows/{id}":{"get":{"summary":"A show with the user's episodes by season","security":[{"bearer":["files:read"]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Show","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tmdbId":{"type":"integer"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"overview":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]},"genres":{"type":"array","items":{"type":"string"}},"voteAverage":{"type":["number","null"]},"runtime":{"type":["integer","null"]},"releaseDate":{"type":["string","null"]},"seasonCount":{"type":["integer","null"]},"addedAt":{"type":"string","format":"date-time"},"cast":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"character":{"type":["string","null"]},"profilePath":{"type":["string","null"]}},"required":["name","character","profilePath"]}},"status":{"type":["string","null"]},"lastAirDate":{"type":["string","null"]},"seasons":{"type":"array","items":{"type":"object","properties":{"season":{"type":"integer"},"episodes":{"type":"array","items":{"type":"object","properties":{"season":{"type":"integer"},"episode":{"type":"integer"},"name":{"type":["string","null"]},"overview":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"airDate":{"type":["string","null"]},"runtime":{"type":["integer","null"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"type":{"type":"string","enum":["video","audio","image","subtitle","other"]},"playable":{"type":"boolean"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]},"original":{"type":["object","null"],"properties":{"name":{"type":"string"},"sizeBytes":{"type":"integer"},"mimeType":{"type":"string"},"mediaInfo":{"type":["object","null"],"properties":{"container":{"type":"string"},"durationSeconds":{"type":["number","null"],"minimum":0},"bitRate":{"type":["integer","null"],"minimum":0},"video":{"type":["object","null"],"properties":{"codec":{"type":"string"},"profile":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"pixFmt":{"type":["string","null"]}},"required":["codec","profile","width","height","pixFmt"]},"audio":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"channels":{"type":["integer","null"]},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"default":{"type":"boolean"}},"required":["codec","channels","language","title","default"]}},"subtitles":{"type":"array","items":{"type":"object","properties":{"codec":{"type":"string"},"language":{"type":["string","null"]},"title":{"type":["string","null"]},"forced":{"type":"boolean"},"default":{"type":"boolean"}},"required":["codec","language","title","forced","default"]}},"playable":{"type":"boolean"}},"required":["container","durationSeconds","bitRate","video","audio","subtitles","playable"]}},"required":["name","sizeBytes","mimeType","mediaInfo"]},"subtitleCount":{"type":"integer"},"transferId":{"type":"string"},"folder":{"type":["string","null"]},"progress":{"type":["object","null"],"properties":{"fileId":{"type":"string"},"positionSeconds":{"type":"number","minimum":0},"durationSeconds":{"type":"number","minimum":0},"completed":{"type":"boolean"},"clientId":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["fileId","positionSeconds","durationSeconds","completed","clientId","updatedAt"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"media":{"type":["object","null"],"properties":{"titleId":{"type":"string"},"kind":{"type":"string","enum":["movie","show"]},"title":{"type":"string"},"year":{"type":["integer","null"]},"season":{"type":["integer","null"]},"episode":{"type":["integer","null"]},"episodeName":{"type":["string","null"]},"stillPath":{"type":["string","null"]},"posterPath":{"type":["string","null"]},"backdropPath":{"type":["string","null"]},"logoPath":{"type":["string","null"]}},"required":["titleId","kind","title","year","season","episode","episodeName","stillPath","posterPath","backdropPath","logoPath"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sizeBytes","mimeType","type","playable","mediaInfo","subtitleCount","transferId","progress","expiresAt","createdAt","updatedAt"]}}},"required":["season","episode","name","overview","stillPath","airDate","runtime","files"]}}},"required":["season","episodes"]}},"nextUp":{"type":["object","null"],"properties":{"season":{"type":"integer"},"episode":{"type":"integer"},"fileId":{"type":"string"},"resume":{"type":"boolean"}},"required":["season","episode","fileId","resume"]}},"required":["id","tmdbId","kind","title","year","overview","posterPath","backdropPath","logoPath","genres","voteAverage","runtime","releaseDate","seasonCount","addedAt","cast","status","lastAirDate","seasons","nextUp"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing":{"get":{"security":[{"bearer":[]}],"description":"Needs a dashboard session or an API key without scopes.","summary":"Subscription, plans, and trial eligibility","responses":{"200":{"description":"Billing","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":["object","null"],"properties":{"status":{"type":"string"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialEnd":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"nextPlan":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"nextPlanAt":{"type":["string","null"],"format":"date-time"},"card":{"type":["object","null"],"properties":{"brand":{"type":"string"},"last4":{"type":"string"}},"required":["brand","last4"]},"paymentMethod":{"type":["object","null"],"properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["type","brand","last4","email"]},"nextChargeCents":{"type":["integer","null"]},"needsPaymentMethod":{"type":"boolean"}},"required":["status","plan","trialEnd","periodEnd","cancelAtPeriodEnd","nextPlan","nextPlanAt","card","paymentMethod","nextChargeCents","needsPaymentMethod"]},"plans":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]}},"trial":{"type":["object","null"],"properties":{"days":{"type":"integer"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"storageQuotaBytes":{"type":"integer"}},"required":["days","plan","storageQuotaBytes"]},"referred":{"type":"boolean"},"collectsTax":{"type":"boolean"},"storedBytes":{"type":"integer"}},"required":["subscription","plans","trial","referred","collectsTax","storedBytes"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/checkout":{"post":{"security":[{"bearer":[]}],"summary":"Start checkout","description":"Returns a Checkout Session client secret for Stripe Elements. With a trial, the trial is on Standard and `plan` applies after it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["lite","standard","pro"]}},"required":["plan"]}}}},"responses":{"200":{"description":"Checkout","content":{"application/json":{"schema":{"type":"object","properties":{"clientSecret":{"type":"string"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialPlan":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialEnd":{"type":["string","null"],"format":"date-time"},"firstChargeAt":{"type":"string","format":"date-time"},"firstChargeCents":{"type":"integer"}},"required":["clientSecret","plan","trialPlan","trialEnd","firstChargeAt","firstChargeCents"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/sync":{"post":{"security":[{"bearer":[]}],"description":"Needs a dashboard session or an API key without scopes.","summary":"Read the subscription from Stripe now","responses":{"200":{"description":"Billing","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":["object","null"],"properties":{"status":{"type":"string"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialEnd":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"nextPlan":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"nextPlanAt":{"type":["string","null"],"format":"date-time"},"card":{"type":["object","null"],"properties":{"brand":{"type":"string"},"last4":{"type":"string"}},"required":["brand","last4"]},"paymentMethod":{"type":["object","null"],"properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["type","brand","last4","email"]},"nextChargeCents":{"type":["integer","null"]},"needsPaymentMethod":{"type":"boolean"}},"required":["status","plan","trialEnd","periodEnd","cancelAtPeriodEnd","nextPlan","nextPlanAt","card","paymentMethod","nextChargeCents","needsPaymentMethod"]},"plans":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]}},"trial":{"type":["object","null"],"properties":{"days":{"type":"integer"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"storageQuotaBytes":{"type":"integer"}},"required":["days","plan","storageQuotaBytes"]},"referred":{"type":"boolean"},"collectsTax":{"type":"boolean"},"storedBytes":{"type":"integer"}},"required":["subscription","plans","trial","referred","collectsTax","storedBytes"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/plan":{"post":{"security":[{"bearer":[]}],"summary":"Change plan","description":"During a trial the plan applies at the trial end. An upgrade applies at once with proration; a downgrade at the next period, if the files fit.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["lite","standard","pro"]}},"required":["plan"]}}}},"responses":{"200":{"description":"Plan change","content":{"application/json":{"schema":{"type":"object","properties":{"billing":{"type":"object","properties":{"subscription":{"type":["object","null"],"properties":{"status":{"type":"string"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialEnd":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"nextPlan":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"nextPlanAt":{"type":["string","null"],"format":"date-time"},"card":{"type":["object","null"],"properties":{"brand":{"type":"string"},"last4":{"type":"string"}},"required":["brand","last4"]},"paymentMethod":{"type":["object","null"],"properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["type","brand","last4","email"]},"nextChargeCents":{"type":["integer","null"]},"needsPaymentMethod":{"type":"boolean"}},"required":["status","plan","trialEnd","periodEnd","cancelAtPeriodEnd","nextPlan","nextPlanAt","card","paymentMethod","nextChargeCents","needsPaymentMethod"]},"plans":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]}},"trial":{"type":["object","null"],"properties":{"days":{"type":"integer"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"storageQuotaBytes":{"type":"integer"}},"required":["days","plan","storageQuotaBytes"]},"referred":{"type":"boolean"},"collectsTax":{"type":"boolean"},"storedBytes":{"type":"integer"}},"required":["subscription","plans","trial","referred","collectsTax","storedBytes"]},"paymentClientSecret":{"type":["string","null"]}},"required":["billing","paymentClientSecret"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/cancel":{"post":{"security":[{"bearer":[]}],"description":"Needs a dashboard session or an API key without scopes.","summary":"Cancel at the end of the period","responses":{"200":{"description":"Billing","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":["object","null"],"properties":{"status":{"type":"string"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialEnd":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"nextPlan":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"nextPlanAt":{"type":["string","null"],"format":"date-time"},"card":{"type":["object","null"],"properties":{"brand":{"type":"string"},"last4":{"type":"string"}},"required":["brand","last4"]},"paymentMethod":{"type":["object","null"],"properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["type","brand","last4","email"]},"nextChargeCents":{"type":["integer","null"]},"needsPaymentMethod":{"type":"boolean"}},"required":["status","plan","trialEnd","periodEnd","cancelAtPeriodEnd","nextPlan","nextPlanAt","card","paymentMethod","nextChargeCents","needsPaymentMethod"]},"plans":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]}},"trial":{"type":["object","null"],"properties":{"days":{"type":"integer"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"storageQuotaBytes":{"type":"integer"}},"required":["days","plan","storageQuotaBytes"]},"referred":{"type":"boolean"},"collectsTax":{"type":"boolean"},"storedBytes":{"type":"integer"}},"required":["subscription","plans","trial","referred","collectsTax","storedBytes"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/resume":{"post":{"security":[{"bearer":[]}],"description":"Needs a dashboard session or an API key without scopes.","summary":"Undo a cancel","responses":{"200":{"description":"Billing","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":["object","null"],"properties":{"status":{"type":"string"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialEnd":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"nextPlan":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"nextPlanAt":{"type":["string","null"],"format":"date-time"},"card":{"type":["object","null"],"properties":{"brand":{"type":"string"},"last4":{"type":"string"}},"required":["brand","last4"]},"paymentMethod":{"type":["object","null"],"properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["type","brand","last4","email"]},"nextChargeCents":{"type":["integer","null"]},"needsPaymentMethod":{"type":"boolean"}},"required":["status","plan","trialEnd","periodEnd","cancelAtPeriodEnd","nextPlan","nextPlanAt","card","paymentMethod","nextChargeCents","needsPaymentMethod"]},"plans":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]}},"trial":{"type":["object","null"],"properties":{"days":{"type":"integer"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"storageQuotaBytes":{"type":"integer"}},"required":["days","plan","storageQuotaBytes"]},"referred":{"type":"boolean"},"collectsTax":{"type":"boolean"},"storedBytes":{"type":"integer"}},"required":["subscription","plans","trial","referred","collectsTax","storedBytes"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/card":{"post":{"security":[{"bearer":[]}],"description":"Needs a dashboard session or an API key without scopes.","summary":"Start a card update","responses":{"200":{"description":"Card setup","content":{"application/json":{"schema":{"type":"object","properties":{"clientSecret":{"type":"string"},"sessionId":{"type":"string"}},"required":["clientSecret","sessionId"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/card/complete":{"post":{"security":[{"bearer":[]}],"description":"Needs a dashboard session or an API key without scopes.","summary":"Use the confirmed card for future charges","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1}},"required":["sessionId"]}}}},"responses":{"200":{"description":"Billing","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":["object","null"],"properties":{"status":{"type":"string"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"trialEnd":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"nextPlan":{"type":["object","null"],"properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"nextPlanAt":{"type":["string","null"],"format":"date-time"},"card":{"type":["object","null"],"properties":{"brand":{"type":"string"},"last4":{"type":"string"}},"required":["brand","last4"]},"paymentMethod":{"type":["object","null"],"properties":{"type":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["type","brand","last4","email"]},"nextChargeCents":{"type":["integer","null"]},"needsPaymentMethod":{"type":"boolean"}},"required":["status","plan","trialEnd","periodEnd","cancelAtPeriodEnd","nextPlan","nextPlanAt","card","paymentMethod","nextChargeCents","needsPaymentMethod"]},"plans":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]}},"trial":{"type":["object","null"],"properties":{"days":{"type":"integer"},"plan":{"type":"object","properties":{"key":{"type":"string","enum":["lite","standard","pro"]},"name":{"type":"string"},"priceCents":{"type":"integer"},"storageQuotaBytes":{"type":"integer"},"maxActiveTransfers":{"type":"integer"},"maxScreens":{"type":"integer"},"fileRetentionDays":{"type":["integer","null"]},"webdav":{"type":"boolean"},"priorityDownloads":{"type":"boolean"},"maxPeople":{"type":"integer"}},"required":["key","name","priceCents","storageQuotaBytes","maxActiveTransfers","maxScreens","fileRetentionDays","webdav","priorityDownloads","maxPeople"]},"storageQuotaBytes":{"type":"integer"}},"required":["days","plan","storageQuotaBytes"]},"referred":{"type":"boolean"},"collectsTax":{"type":"boolean"},"storedBytes":{"type":"integer"}},"required":["subscription","plans","trial","referred","collectsTax","storedBytes"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/invoices":{"get":{"security":[{"bearer":[]}],"description":"Needs a dashboard session or an API key without scopes.","summary":"Invoices, newest first","responses":{"200":{"description":"Invoices","content":{"application/json":{"schema":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"totalCents":{"type":"integer"},"status":{"type":"string"},"hostedUrl":{"type":["string","null"]},"pdfUrl":{"type":["string","null"]}},"required":["id","number","createdAt","totalCents","status","hostedUrl","pdfUrl"]}}},"required":["invoices"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"402":{"description":"No active subscription","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found, or billing is not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/household":{"get":{"security":[{"bearer":[]}],"summary":"Your household","description":"Pro is shared by up to 6 people, each with their own account and files. The owner pays and manages the household; the storage and screens are pooled. Needs a dashboard session or an API key without scopes.","responses":{"200":{"description":"Household","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"]},"owner":{"type":"object","properties":{"email":{"type":["string","null"]}},"required":["email"]},"maxPeople":{"type":"integer"},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member"]},"you":{"type":"boolean"},"joinedAt":{"type":"string","format":"date-time"},"storedBytes":{"type":["integer","null"]},"storageLimitBytes":{"type":["integer","null"]}},"required":["id","email","role","you","joinedAt","storedBytes","storageLimitBytes"]}},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","email","createdAt","expiresAt"]}},"storage":{"type":"object","properties":{"usedBytes":{"type":"integer"},"quotaBytes":{"type":"integer"}},"required":["usedBytes","quotaBytes"]},"inviteBlocked":{"type":["string","null"]}},"required":["role","owner","maxPeople","people","invites","storage","inviteBlocked"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/household/invites":{"post":{"security":[{"bearer":[]}],"summary":"Invite someone","description":"Owner only. Returns a single-use link that expires in 14 days, and emails it to `email` when given. Needs a dashboard session or an API key without scopes.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"}}}}}},"responses":{"201":{"description":"Invite","content":{"application/json":{"schema":{"type":"object","properties":{"invite":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","email","createdAt","expiresAt"]},"url":{"type":"string"},"emailed":{"type":"boolean"}},"required":["invite","url","emailed"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/household/invites/{id}":{"delete":{"security":[{"bearer":[]}],"summary":"Withdraw an invite","description":"Needs a dashboard session or an API key without scopes.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Withdrawn"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/household/members/{id}":{"patch":{"security":[{"bearer":[]}],"summary":"Limit a member's storage","description":"Owner only. `null` lets the member use the whole plan. Needs a dashboard session or an API key without scopes.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"storageLimitBytes":{"type":["integer","null"],"minimum":0}},"required":["storageLimitBytes"]}}}},"responses":{"200":{"description":"Household","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"]},"owner":{"type":"object","properties":{"email":{"type":["string","null"]}},"required":["email"]},"maxPeople":{"type":"integer"},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member"]},"you":{"type":"boolean"},"joinedAt":{"type":"string","format":"date-time"},"storedBytes":{"type":["integer","null"]},"storageLimitBytes":{"type":["integer","null"]}},"required":["id","email","role","you","joinedAt","storedBytes","storageLimitBytes"]}},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","email","createdAt","expiresAt"]}},"storage":{"type":"object","properties":{"usedBytes":{"type":"integer"},"quotaBytes":{"type":"integer"}},"required":["usedBytes","quotaBytes"]},"inviteBlocked":{"type":["string","null"]}},"required":["role","owner","maxPeople","people","invites","storage","inviteBlocked"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"security":[{"bearer":[]}],"summary":"Remove a member","description":"Owner only. The member keeps their account, and their files stay for the lapse grace period unless they choose a plan. Needs a dashboard session or an API key without scopes.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Removed"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/household/leave":{"post":{"security":[{"bearer":[]}],"summary":"Leave the household","description":"Members only. Your files stay for the lapse grace period unless you choose a plan. Needs a dashboard session or an API key without scopes.","responses":{"204":{"description":"Left"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/household/join/{token}":{"get":{"security":[{"bearer":[]}],"summary":"Preview an invite","description":"What joining does: whose plan, whether your files fit, and the plan of yours it ends. Needs a dashboard session or an API key without scopes.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"Preview","content":{"application/json":{"schema":{"type":"object","properties":{"owner":{"type":"object","properties":{"email":{"type":["string","null"]}},"required":["email"]},"planName":{"type":["string","null"]},"people":{"type":"integer"},"maxPeople":{"type":"integer"},"problem":{"type":["string","null"]},"ownPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"trialing":{"type":"boolean"},"refundCents":{"type":"integer"}},"required":["name","trialing","refundCents"]},"storedBytes":{"type":"integer"},"freeBytes":{"type":"integer"}},"required":["owner","planName","people","maxPeople","problem","ownPlan","storedBytes","freeBytes"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/household/join":{"post":{"security":[{"bearer":[]}],"summary":"Join a household","description":"Ends your own plan: a trial at once, a paid plan at once with the unused part refunded. Needs a dashboard session or an API key without scopes.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":200}},"required":["token"]}}}},"responses":{"200":{"description":"Household","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","member"]},"owner":{"type":"object","properties":{"email":{"type":["string","null"]}},"required":["email"]},"maxPeople":{"type":"integer"},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member"]},"you":{"type":"boolean"},"joinedAt":{"type":"string","format":"date-time"},"storedBytes":{"type":["integer","null"]},"storageLimitBytes":{"type":["integer","null"]}},"required":["id","email","role","you","joinedAt","storedBytes","storageLimitBytes"]}},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","email","createdAt","expiresAt"]}},"storage":{"type":"object","properties":{"usedBytes":{"type":"integer"},"quotaBytes":{"type":"integer"}},"required":["usedBytes","quotaBytes"]},"inviteBlocked":{"type":["string","null"]}},"required":["role","owner","maxPeople","people","invites","storage","inviteBlocked"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Not possible in the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/referrals":{"get":{"security":[{"bearer":[]}],"summary":"Your invite link and the friends who used it","description":"Give a month, get a month: a friend who signs up through the link gets a month-long free trial, and when they first pay, you get a month of your plan as credit on your next bill. `url` is null for a household member, whose owner pays.","responses":{"200":{"description":"Referrals","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":["string","null"]},"friendTrialDays":{"type":"integer"},"earnedCents":{"type":"integer"},"friends":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"status":{"type":"string","enum":["waiting","earned","not_counted"]},"creditCents":{"type":["integer","null"]},"joinedAt":{"type":"string","format":"date-time"}},"required":["id","email","status","creditCents","joinedAt"]}}},"required":["url","friendTrialDays","earnedCents","friends"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","account_disabled","no_subscription","not_found","conflict","blocked","quota_exceeded","too_many_active_transfers","screen_limit","playback_stopped","rate_limited","invalid_magnet","unsupported_magnet","invalid_torrent","torrent_too_large","payload_too_large","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"screenLimit":{"type":"object","properties":{"maxScreens":{"type":"integer"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"deviceLabel":{"type":"string"},"fileId":{"type":"string"},"fileName":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"}},"required":["id","clientId","deviceLabel","fileId","fileName","lastSeenAt"]}},"nextPlan":{"type":["object","null"],"properties":{"name":{"type":"string"},"maxScreens":{"type":"integer"}},"required":["name","maxScreens"]}},"required":["maxScreens","sessions","nextPlan"]}},"required":["code","message"]}},"required":["error"]}}}}}}}},"webhooks":{}}