{"openapi":"3.1.0","info":{"title":"SwitchBot (BYOK) API","version":"0.1.0","description":"SwitchBot (BYOK) lets an AI assistant read your own SwitchBot devices and, with your approval of each change, change their state through the SwitchBot API with a key you supply (SwitchBot open token (app: Profile, Preferences, About, tap App Version 10 times, Developer Options, Get Token)). Read tools plus 6 device-changing tools (set_power, press_bot, set_brightness, set_color,...\n\nMost operations are read-only. These change the state of a device and run only with confirm = \"yes\" after the user approved that change: set_power, press_bot, set_brightness, set_color, set_color_temperature, set_infrared_air_conditioner. The same tools are available over MCP (streamable HTTP) at https://byok-switchbot-legacy-control.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-switchbot-legacy-control/docs"},"termsOfService":"https://connectorbay.com/byok-switchbot-legacy-control/terms"},"servers":[{"url":"https://byok-switchbot-legacy-control.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-switchbot-legacy-control/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_devices":{"post":{"operationId":"list_devices","summary":"List your SwitchBot physical devices and virtual infrared remotes with device id, name, type and hub id. Limited to 1000","description":"List your SwitchBot physical devices and virtual infrared remotes with device id, name, type and hub id. Limited to 10000 API calls per day. Use for \"Which SwitchBot devices do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_devicesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_device_status":{"post":{"operationId":"get_device_status","summary":"Get the current status of one physical SwitchBot device: power state, temperature, humidity, brightness, color and simil","description":"Get the current status of one physical SwitchBot device: power state, temperature, humidity, brightness, color and similar values depending on the product. Use for \"What is the temperature on my SwitchBot meter 500291B269BE\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"device_id":{"description":"SwitchBot device id from list_devices (deviceId), for example 500291B269BE or, for an infrared remote, 02-202008110034-13.","maxLength":60,"title":"Device Id","type":"string"}},"required":["device_id"],"title":"get_device_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_scenes":{"post":{"operationId":"list_scenes","summary":"List your manual SwitchBot scenes with scene id and name. This tool only lists them; it never runs a scene. Use for \"Whi","description":"List your manual SwitchBot scenes with scene id and name. This tool only lists them; it never runs a scene. Use for \"Which SwitchBot scenes do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_scenesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/set_power":{"post":{"operationId":"set_power","summary":"Turn a SwitchBot Bot, Plug, Plug Mini, bulb, strip light, humidifier, fan or infrared appliance on or off (turnOn or tur","description":"Turn a SwitchBot Bot, Plug, Plug Mini, bulb, strip light, humidifier, fan or infrared appliance on or off (turnOn or turnOff). Works on Bot, Plug, Plug Mini, light and similar devices; do not use it on locks, door or garage openers or alarm devices. This changes the physical device. Use for \"Turn off my SwitchBot plug 500291B269BE\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"device_id":{"description":"SwitchBot device id from list_devices (deviceId), for example 500291B269BE or, for an infrared remote, 02-202008110034-13.","maxLength":60,"title":"Device Id","type":"string"},"command":{"description":"turnOn or turnOff (case sensitive).","enum":["turnOn","turnOff"],"title":"Command","type":"string"},"confirm":{"const":"yes","description":"Must be exactly yes, only after the user approved this change in chat.","title":"Confirm","type":"string"}},"required":["device_id","command","confirm"],"title":"set_powerArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":false,"x-changes-device-state":true,"x-requires-confirmation":"confirm"}},"/v1/tools/press_bot":{"post":{"operationId":"press_bot","summary":"Make a SwitchBot Bot press its button once (the press command). Works on Bot, Plug, Plug Mini, light and similar devices","description":"Make a SwitchBot Bot press its button once (the press command). Works on Bot, Plug, Plug Mini, light and similar devices; do not use it on locks, door or garage openers or alarm devices. This changes the physical device. Use for \"Press my SwitchBot Bot 210\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"device_id":{"description":"SwitchBot device id from list_devices (deviceId), for example 500291B269BE or, for an infrared remote, 02-202008110034-13.","maxLength":60,"title":"Device Id","type":"string"},"confirm":{"const":"yes","description":"Must be exactly yes, only after the user approved this change in chat.","title":"Confirm","type":"string"}},"required":["device_id","confirm"],"title":"press_botArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":false,"x-changes-device-state":true,"x-requires-confirmation":"confirm"}},"/v1/tools/set_brightness":{"post":{"operationId":"set_brightness","summary":"Set the brightness of a SwitchBot Color Bulb or Strip Light from 1 to 100 (setBrightness). Works on Bot, Plug, Plug Mini","description":"Set the brightness of a SwitchBot Color Bulb or Strip Light from 1 to 100 (setBrightness). Works on Bot, Plug, Plug Mini, light and similar devices; do not use it on locks, door or garage openers or alarm devices. This changes the physical device. Use for \"Dim my SwitchBot bulb 84F70353A411 to 40\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"device_id":{"description":"SwitchBot device id from list_devices (deviceId), for example 500291B269BE or, for an infrared remote, 02-202008110034-13.","maxLength":60,"title":"Device Id","type":"string"},"brightness":{"description":"Brightness as digits only, 1 to 100, for example 40.","maxLength":3,"title":"Brightness","type":"string"},"confirm":{"const":"yes","description":"Must be exactly yes, only after the user approved this change in chat.","title":"Confirm","type":"string"}},"required":["device_id","brightness","confirm"],"title":"set_brightnessArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":false,"x-changes-device-state":true,"x-requires-confirmation":"confirm"}},"/v1/tools/set_color":{"post":{"operationId":"set_color","summary":"Set the color of a SwitchBot Color Bulb or Strip Light with red, green and blue values (setColor). Works on Bot, Plug, P","description":"Set the color of a SwitchBot Color Bulb or Strip Light with red, green and blue values (setColor). Works on Bot, Plug, Plug Mini, light and similar devices; do not use it on locks, door or garage openers or alarm devices. This changes the physical device. Use for \"Make my SwitchBot bulb 84F70353A411 yellow\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"device_id":{"description":"SwitchBot device id from list_devices (deviceId), for example 500291B269BE or, for an infrared remote, 02-202008110034-13.","maxLength":60,"title":"Device Id","type":"string"},"rgb":{"description":"Color as red:green:blue with each part 0 to 255, for example 122:80:20.","maxLength":11,"title":"Rgb","type":"string"},"confirm":{"const":"yes","description":"Must be exactly yes, only after the user approved this change in chat.","title":"Confirm","type":"string"}},"required":["device_id","rgb","confirm"],"title":"set_colorArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":false,"x-changes-device-state":true,"x-requires-confirmation":"confirm"}},"/v1/tools/set_color_temperature":{"post":{"operationId":"set_color_temperature","summary":"Set the white color temperature of a SwitchBot Color Bulb from 2700 to 6500 kelvin (setColorTemperature). Works on Bot, ","description":"Set the white color temperature of a SwitchBot Color Bulb from 2700 to 6500 kelvin (setColorTemperature). Works on Bot, Plug, Plug Mini, light and similar devices; do not use it on locks, door or garage openers or alarm devices. This changes the physical device. Use for \"Set my SwitchBot bulb 84F70353A411 to 2700 K\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"device_id":{"description":"SwitchBot device id from list_devices (deviceId), for example 500291B269BE or, for an infrared remote, 02-202008110034-13.","maxLength":60,"title":"Device Id","type":"string"},"kelvin":{"description":"Color temperature in kelvin as digits only, 2700 to 6500.","maxLength":4,"title":"Kelvin","type":"string"},"confirm":{"const":"yes","description":"Must be exactly yes, only after the user approved this change in chat.","title":"Confirm","type":"string"}},"required":["device_id","kelvin","confirm"],"title":"set_color_temperatureArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":false,"x-changes-device-state":true,"x-requires-confirmation":"confirm"}},"/v1/tools/set_infrared_air_conditioner":{"post":{"operationId":"set_infrared_air_conditioner","summary":"Set an air conditioner that SwitchBot controls through an infrared remote (setAll): temperature, mode, fan speed and pow","description":"Set an air conditioner that SwitchBot controls through an infrared remote (setAll): temperature, mode, fan speed and power in one command. Works on Bot, Plug, Plug Mini, light and similar devices; do not use it on locks, door or garage openers or alarm devices. This changes the physical device. Use for \"Set my SwitchBot AC 02-202007201626-70 to 26 degrees cooling\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"device_id":{"description":"SwitchBot device id from list_devices (deviceId), for example 500291B269BE or, for an infrared remote, 02-202008110034-13.","maxLength":60,"title":"Device Id","type":"string"},"setting":{"description":"Four values separated by commas: temperature in Celsius, mode (1 auto, 2 cool, 3 dry, 4 fan, 5 heat), fan speed (1 auto, 2 low, 3 medium, 4 high) and power (on or off), for example 26,2,3,on.","maxLength":24,"title":"Setting","type":"string"},"confirm":{"const":"yes","description":"Must be exactly yes, only after the user approved this change in chat.","title":"Confirm","type":"string"}},"required":["device_id","setting","confirm"],"title":"set_infrared_air_conditionerArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":false,"x-changes-device-state":true,"x-requires-confirmation":"confirm"}}}}