{"openapi":"3.1.0","info":{"title":"Twitch API (Bowmark)","version":"e833508f87ff","description":"Twitch — cut a Highlight of your own broadcast, including the one still live, and read any public video's length and status.\n\nEvery function Bowmark has for Twitch (twitch.tv) as one HTTP call. Each runs on Bowmark's infrastructure with the same billing, rules and response envelope as `POST /v1/run`. The whole API: https://api.bowmark.ai/openapi.json. Guide: https://bowmark.ai/docs/api.","contact":{"email":"support@bowmark.ai","url":"https://bowmark.ai/docs/api"}},"servers":[{"url":"https://api.bowmark.ai"}],"security":[{"bearer":[]},{"apiKeyHeader":[]}],"paths":{"/v1/sites/twitch/getVideo":{"post":{"operationId":"getVideo","summary":"Reads one public Twitch video by id or twitch.tv/videos link — title, length in seconds, whether it is still RECORDING (a live broadcast's archive) or RECORDED, its type (ARCHIVE, HIGHLIGHT, UPLOAD) a","description":"Reads one public Twitch video by id or twitch.tv/videos link — title, length in seconds, whether it is still RECORDING (a live broadcast's archive) or RECORDED, its type (ARCHIVE, HIGHLIGHT, UPLOAD) and its channel. No sign-in. THROWS naming the id when Twitch has no such video.\n\nCalls `bowmark.providers.twitch.getVideo`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchVideo>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetVideoArgs","description":"TypeScript: `GetVideoArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getChannelInfo":{"post":{"operationId":"getChannelInfo","summary":"Reads a public channel's profile: display name, description, game, language, profile image URL, follower count, creation date.","description":"Reads a public channel's profile: display name, description, game, language, profile image URL, follower count, creation date. No sign-in.\n\nCalls `bowmark.providers.twitch.getChannelInfo`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchChannelInfo>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetChannelInfoArgs","description":"TypeScript: `GetChannelInfoArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getStream":{"post":{"operationId":"getStream","summary":"Reads a channel's LIVE state right now: whether it is live, title, game, viewer count, and when the broadcast started.","description":"Reads a channel's LIVE state right now: whether it is live, title, game, viewer count, and when the broadcast started. `live: false` and null fields when offline — not an error. No sign-in. THROWS naming the login when Twitch has no such channel.\n\nCalls `bowmark.providers.twitch.getStream`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchStream>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetStreamArgs","description":"TypeScript: `GetStreamArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listLiveStreams":{"post":{"operationId":"listLiveStreams","summary":"Browses channels live right now, ranked by Twitch's own live viewer count (highest first): id, title, viewer count, broadcaster login and game.","description":"Browses channels live right now, ranked by Twitch's own live viewer count (highest first): id, title, viewer count, broadcaster login and game. Pass `category` (a game/category name, e.g. \"Minecraft\") to browse one category instead of the whole site. No sign-in. THROWS naming the category when Twitch does not recognise it. Returns one page — up to `limit`, default 20, max 100.\n\nCalls `bowmark.providers.twitch.listLiveStreams`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchLiveStream[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListLiveStreamsArgs","description":"TypeScript: `ListLiveStreamsArgs`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/searchChannels":{"post":{"operationId":"searchChannels","summary":"Searches Twitch channels by keyword — a name, game or description term — and returns up to Twitch's own single page of results (typically ~10), ranked by Twitch's own relevance: login, display name, d","description":"Searches Twitch channels by keyword — a name, game or description term — and returns up to Twitch's own single page of results (typically ~10), ranked by Twitch's own relevance: login, display name, description, profile image, follower count, and whether live now (with viewer count and current game). No sign-in. Twitch's own search offers no further paging on this door.\n\nCalls `bowmark.providers.twitch.searchChannels`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchChannelSearchResult[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SearchChannelsArgs","description":"TypeScript: `SearchChannelsArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/searchVideos":{"post":{"operationId":"searchVideos","summary":"Searches for Twitch videos by keyword — VODs, clips and uploads: title, creator, publish date, view count, duration.","description":"Searches for Twitch videos by keyword — VODs, clips and uploads: title, creator, publish date, view count, duration. No sign-in. Returns Twitch's own single page of results (typically ~10) ranked by relevance. Twitch's own search offers no further paging on this door.\n\nCalls `bowmark.providers.twitch.searchVideos`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchVideoSearchResult[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SearchVideosArgs","description":"TypeScript: `SearchVideosArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listCategories":{"post":{"operationId":"listCategories","summary":"Lists Twitch games/categories, ranked by current live viewership (most-watched first): id, name, box art URL template, and total viewer count.","description":"Lists Twitch games/categories, ranked by current live viewership (most-watched first): id, name, box art URL template, and total viewer count. No sign-in. Twitch's own `games` door is genuinely paged (unlike search), but this returns one page — up to `limit`, default 20, max 100.\n\nCalls `bowmark.providers.twitch.listCategories`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchCategory[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListCategoriesArgs","description":"TypeScript: `ListCategoriesArgs`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listChannelVods":{"post":{"operationId":"listChannelVods","summary":"Lists a channel's past broadcasts/VODs, newest first: title, creation date, length in seconds, status and type (ARCHIVE, HIGHLIGHT, UPLOAD).","description":"Lists a channel's past broadcasts/VODs, newest first: title, creation date, length in seconds, status and type (ARCHIVE, HIGHLIGHT, UPLOAD). No sign-in. THROWS naming the login when Twitch has no such channel. Returns one page — up to `limit`, default 20, max 100.\n\nCalls `bowmark.providers.twitch.listChannelVods`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchVideo[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListChannelVodsArgs","description":"TypeScript: `ListChannelVodsArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listChannelClips":{"post":{"operationId":"listChannelClips","summary":"Lists clips cut from a channel, ranked by Twitch's own default ordering: title, creation date, view count, duration, who cut it, and the category being played.","description":"Lists clips cut from a channel, ranked by Twitch's own default ordering: title, creation date, view count, duration, who cut it, and the category being played. No sign-in. THROWS naming the login when Twitch has no such channel. Returns one page — up to `limit`, default 20, max 100.\n\nCalls `bowmark.providers.twitch.listChannelClips`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchClip[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListChannelClipsArgs","description":"TypeScript: `ListChannelClipsArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getClip":{"post":{"operationId":"getClip","summary":"Reads one clip by its slug from clips.twitch.tv or twitch.tv/<login>/clip/<slug>: title, creation date, view count, duration, who cut it, and the category being played.","description":"Reads one clip by its slug from clips.twitch.tv or twitch.tv/<login>/clip/<slug>: title, creation date, view count, duration, who cut it, and the category being played. Keyless, same door as listChannelClips. THROWS naming the slug when Twitch has no such clip.\n\nCalls `bowmark.providers.twitch.getClip`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchClip>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetClipArgs","description":"TypeScript: `GetClipArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getChannelSchedule":{"post":{"operationId":"getChannelSchedule","summary":"Reads a channel's scheduled broadcast times and upcoming events (if public).","description":"Reads a channel's scheduled broadcast times and upcoming events (if public). Returns an empty list if the channel has no public schedule. No sign-in. THROWS naming the login when Twitch has no such channel.\n\nCalls `bowmark.providers.twitch.getChannelSchedule`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchScheduleSegment[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetChannelScheduleInput","description":"TypeScript: `GetChannelScheduleInput`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/createHighlight":{"post":{"operationId":"createHighlight","summary":"Cuts a permanent Highlight from the signed-in streamer's own broadcast — including the one still live — between two offsets in seconds, with a title.","description":"Cuts a permanent Highlight from the signed-in streamer's own broadcast — including the one still live — between two offsets in seconds, with a title. Omit vodId to cut from the newest archive. NEEDS the streamer's Twitch sign-in, which only a capability can hold: call it as bowmark.stream_highlights.create. Idempotent on the title: a highlight whose title already exists on the channel is returned with status \"existing\" rather than made twice. Refuses, without asking for a sign-in, a vod id Twitch does not have or an end offset past what the live archive has recorded so far (retry shortly in that case).\n\nCalls `bowmark.providers.twitch.createHighlight`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchHighlight>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/CreateHighlightArgs","description":"TypeScript: `CreateHighlightArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getChannel":{"post":{"operationId":"getChannel","summary":"Reads the signed-in streamer's channel settings: title, language and current game/category.","description":"Reads the signed-in streamer's channel settings: title, language and current game/category. Takes no arguments. NEEDS the streamer's Twitch sign-in, which only a capability can hold: call it as bowmark.stream_channel.get.\n\nCalls `bowmark.providers.twitch.getChannel`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchChannelSettings>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/setChannel":{"post":{"operationId":"setChannel","summary":"Updates the signed-in streamer's channel settings: title, language and game/category.","description":"Updates the signed-in streamer's channel settings: title, language and game/category. Returns the updated settings. It cannot set tags — `tags` is not a field of Twitch's own UpdateBroadcastSettingsInput. NEEDS the streamer's Twitch sign-in, which only a capability can hold: call it as bowmark.stream_channel.set.\n\nCalls `bowmark.providers.twitch.setChannel`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchChannelSettings>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SetChannelArgs","description":"TypeScript: `SetChannelArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getCurrentUser":{"post":{"operationId":"getCurrentUser","summary":"Reads which Twitch account the saved sign-in belongs to: its numeric id and login handle.","description":"Reads which Twitch account the saved sign-in belongs to: its numeric id and login handle. NEEDS the viewer's Twitch sign-in. THROWS a sign-in pause when the saved session is no longer signed in.\n\nCalls `bowmark.providers.twitch.getCurrentUser`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchCurrentUser>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listFollowedChannels":{"post":{"operationId":"listFollowedChannels","summary":"Lists channels the signed-in user follows: login, display name, current game (only when live), and follower count.","description":"Lists channels the signed-in user follows: login, display name, current game (only when live), and follower count. NEEDS the viewer's Twitch sign-in. Returns an empty list when the user follows no channels.\n\nCalls `bowmark.providers.twitch.listFollowedChannels`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchFollowedChannel[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getFollowStatus":{"post":{"operationId":"getFollowStatus","summary":"Checks whether the signed-in user follows a channel and when they started following.","description":"Checks whether the signed-in user follows a channel and when they started following. NEEDS the viewer's Twitch sign-in. THROWS naming the login when Twitch has no such channel.\n\nCalls `bowmark.providers.twitch.getFollowStatus`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchFollowStatus>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetFollowStatusArgs","description":"TypeScript: `GetFollowStatusArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/sendChatMessage":{"post":{"operationId":"sendChatMessage","summary":"Sends a chat message to a Twitch channel.","description":"Sends a chat message to a Twitch channel. NEEDS the viewer's Twitch sign-in. The channel is its numeric `channelId`, or its `login` (the `channel` createHighlight/followChannel return), which is resolved to the id first. Returns the message id and text.\n\nCalls `bowmark.providers.twitch.sendChatMessage`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchChatMessage>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/SendChatMessageArgs","description":"TypeScript: `SendChatMessageArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listWatchLater":{"post":{"operationId":"listWatchLater","summary":"Lists videos the signed-in user has saved to watch later, newest saved first: id, title, length in seconds, status, type, creation date and channel login.","description":"Lists videos the signed-in user has saved to watch later, newest saved first: id, title, length in seconds, status, type, creation date and channel login. NEEDS the viewer's Twitch sign-in. Returns one page — up to `limit`, default 20, max 100.\n\nCalls `bowmark.providers.twitch.listWatchLater`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchVideo[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListWatchLaterArgs","description":"TypeScript: `ListWatchLaterArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listWatchHistory":{"post":{"operationId":"listWatchHistory","summary":"Lists recently watched streams and VODs for the signed-in user, newest watched first: id, title, length in seconds, status, type, creation date and channel login.","description":"Lists recently watched streams and VODs for the signed-in user, newest watched first: id, title, length in seconds, status, type, creation date and channel login. NEEDS the viewer's Twitch sign-in. Returns one page — up to `limit`, default 20, max 100.\n\nCalls `bowmark.providers.twitch.listWatchHistory`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchVideo[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListWatchHistoryArgs","description":"TypeScript: `ListWatchHistoryArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/listSubscriptions":{"post":{"operationId":"listSubscriptions","summary":"Lists the signed-in user's own active paid subscriptions: id, Twitch's own tier code, platform, whether it was redeemed with Prime, when the current period ends and next renews, and the subscribed cha","description":"Lists the signed-in user's own active paid subscriptions: id, Twitch's own tier code, platform, whether it was redeemed with Prime, when the current period ends and next renews, and the subscribed channel's login and display name. NEEDS the viewer's Twitch sign-in. Returns one page — up to `limit`, default 20, max 100.\n\nCalls `bowmark.providers.twitch.listSubscriptions`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchSubscription[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/ListSubscriptionsArgs","description":"TypeScript: `ListSubscriptionsArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/getSubscriptionStatus":{"post":{"operationId":"getSubscriptionStatus","summary":"Checks whether the signed-in user is subscribed to one named channel: id, Twitch's own tier code, platform, whether it was redeemed with Prime, when the current period ends and next renews.","description":"Checks whether the signed-in user is subscribed to one named channel: id, Twitch's own tier code, platform, whether it was redeemed with Prime, when the current period ends and next renews. `subscribed: false` and null fields when not subscribed. NEEDS the viewer's Twitch sign-in. THROWS naming the login when Twitch has no such channel.\n\nCalls `bowmark.providers.twitch.getSubscriptionStatus`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchSubscriptionStatus>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/GetSubscriptionStatusArgs","description":"TypeScript: `GetSubscriptionStatusArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/followChannel":{"post":{"operationId":"followChannel","summary":"Marks a channel as followed by the signed-in user.","description":"Marks a channel as followed by the signed-in user. NEEDS the viewer's Twitch sign-in, which only a capability can hold. THROWS naming the login when Twitch has no such channel. `followUser` mutation on Twitch's own GraphQL — the one mutation on this provider gated behind a Client-Integrity token, read off a real twitch.tv page load under the caller's own session (see _integrity.ts).\n\nCalls `bowmark.providers.twitch.followChannel`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchFollowChannelResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/FollowChannelArgs","description":"TypeScript: `FollowChannelArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/twitch/unfollowChannel":{"post":{"operationId":"unfollowChannel","summary":"Removes a channel from the signed-in user's followed list.","description":"Removes a channel from the signed-in user's followed list. NEEDS the viewer's Twitch sign-in, which only a capability can hold. THROWS naming the login when Twitch has no such channel. `unfollowUser` mutation on Twitch's own GraphQL — gated behind the same Client-Integrity token as followChannel, reused from _integrity.ts.\n\nCalls `bowmark.providers.twitch.unfollowChannel`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<TwitchFollowChannelResult>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/UnfollowChannelArgs","description":"TypeScript: `UnfollowChannelArgs`"},"opts":{"type":"object","properties":{"connection":{"type":"string"}},"required":["connection"],"additionalProperties":true,"description":"TypeScript: `ConnectionOption`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your Bowmark API key."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Bowmark-Key"}},"responses":{"NotFound":{"description":"No such site or function.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}},"schemas":{"RunEnvelope":{"type":"object","description":"What a run returns. `status` says whether the SCRIPT succeeded. A script that threw or paused for a login is still HTTP 200. Branch on `status`, not on the HTTP code.","required":["ok","status","result","logs","error","ms"],"properties":{"runId":{"type":"string","description":"Stable id for this run. Quote it in a support or `report` message."},"ok":{"type":"boolean","description":"False only when the run produced nothing usable."},"status":{"type":"string","enum":["ok","error","partial","needs_user"],"description":"`partial`: the result is real but some calls failed (see `incomplete`); `ok` stays true. `needs_user`: a person must sign in to a site first. Relay `meta.handoff.url` to them, then run again."},"egress":{"type":"string","enum":["default","link"],"description":"The egress the run was given, present only when the request asked for one. `link`: every request went through the caller's own Chrome (Bowmark Buddy)."},"result":{"description":"Whatever the script `return`ed. Any JSON value."},"logs":{"type":"array","items":{"type":"string"},"description":"Lines the script wrote with `log(...)`."},"error":{"type":["string","null"],"description":"Why the run failed, in plain words. Null on success."},"ms":{"type":"integer","description":"How long the script itself ran, in milliseconds."},"queuedMs":{"type":"integer","description":"How long the run waited for a worker before starting. Present only when it was a second or more."},"needs":{"type":"array","description":"The sign-ins this script is waiting on. Present when `status` is `needs_user`.","items":{"type":"object","required":["capability","provider","providerTitle","kind"],"properties":{"capability":{"type":"string"},"provider":{"type":"string"},"providerTitle":{"type":"string","description":"The site's name, to show a person."},"kind":{"type":"string"}}}},"incomplete":{"type":"object","description":"Present only when `status` is `partial`: which calls did not answer.","properties":{"summary":{"type":"string"},"totalCalls":{"type":"integer"}},"additionalProperties":true},"emptyHanded":{"type":"object","description":"Present when the script returned nothing while its calls returned rows, usually a filter that matched none of the site's own labels. Lists the label values the calls actually returned.","additionalProperties":true},"notes":{"type":"array","description":"Caveats a call attached to a complete answer. Never changes `status`.","items":{"type":"object","properties":{"path":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}}}},"meta":{"type":"object","properties":{"handoff":{"type":"object","description":"A single-use sign-in link for a person to open. Expires at `expiresAt`.","properties":{"ref":{"type":"string"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"concurrency":{"type":"object","description":"On a 429: how many runs are in flight and when to retry.","properties":{"limit":{"type":"integer"},"inFlight":{"type":"integer"},"retryAfterSeconds":{"type":"integer"}}}},"additionalProperties":true},"notice":{"type":"object","description":"Set when the account owner has not accepted the current Terms. Relay it to them.","additionalProperties":true}}},"CreateHighlightArgs":{"type":"object","properties":{"vodId":{"type":"string"},"startSeconds":{"type":"number"},"endSeconds":{"type":"number"},"title":{"type":"string"},"description":{"type":"string"},"language":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"game":{"type":"string"}},"required":["startSeconds","endSeconds","title"],"additionalProperties":true},"FollowChannelArgs":{"type":"object","properties":{"login":{"type":"string"}},"required":["login"],"additionalProperties":true},"GetChannelInfoArgs":{"type":"object","properties":{"login":{"type":"string"}},"required":["login"],"additionalProperties":true},"GetChannelScheduleInput":{"type":"object","properties":{"login":{"type":"string"}},"required":["login"],"additionalProperties":true},"GetClipArgs":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":true},"GetFollowStatusArgs":{"type":"object","properties":{"login":{"type":"string"}},"required":["login"],"additionalProperties":true},"GetStreamArgs":{"type":"object","properties":{"login":{"type":"string"}},"required":["login"],"additionalProperties":true},"GetSubscriptionStatusArgs":{"type":"object","properties":{"login":{"type":"string"}},"required":["login"],"additionalProperties":true},"GetVideoArgs":{"type":"object","properties":{"vodId":{"type":"string"}},"required":["vodId"],"additionalProperties":true},"ListCategoriesArgs":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":true},"ListChannelClipsArgs":{"type":"object","properties":{"login":{"type":"string"},"limit":{"type":"number"}},"required":["login"],"additionalProperties":true},"ListChannelVodsArgs":{"type":"object","properties":{"login":{"type":"string"},"limit":{"type":"number"}},"required":["login"],"additionalProperties":true},"ListLiveStreamsArgs":{"type":"object","properties":{"category":{"type":"string"},"limit":{"type":"number"}},"additionalProperties":true},"ListSubscriptionsArgs":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":true},"ListWatchHistoryArgs":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":true},"ListWatchLaterArgs":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":true},"SearchChannelsArgs":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"],"additionalProperties":true},"SearchVideosArgs":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"],"additionalProperties":true},"SendChatMessageArgs":{"type":"object","properties":{"channelId":{"type":"string"},"login":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":true},"SetChannelArgs":{"type":"object","properties":{"title":{"type":"string"},"language":{"type":"string"},"game":{"type":"string"}},"additionalProperties":true},"UnfollowChannelArgs":{"type":"object","properties":{"login":{"type":"string"}},"required":["login"],"additionalProperties":true}}}}