{"openapi":"3.1.0","info":{"title":"The Things Network (BYOK) API","version":"0.1.0","description":"The Things Network (BYOK) lets an AI assistant read your own The Things Network data through the The Things Network API with a key you supply (The Things Stack API key (starts with NNSXS.; give it read rights only)). Read-only: 9 tools (list_applications, get_application, list_end_devices, get_end_device, count_end_devices, list_gateways, get_gateway, get_gateway_connection_stats,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-thethingsnetwork.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-thethingsnetwork/docs"},"termsOfService":"https://connectorbay.com/byok-thethingsnetwork/terms"},"servers":[{"url":"https://byok-thethingsnetwork.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-thethingsnetwork/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_applications":{"post":{"operationId":"list_applications","summary":"List the applications you can access with id, name, description and dates. Use for \"Which LoRaWAN applications do I have","description":"List the applications you can access with id, name, description and dates. Use for \"Which LoRaWAN applications do I have on The Things Network\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"field_mask":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated names of the fields to include, for example 'name,description,created_at'. Leave empty for the server default.","title":"Field Mask"},"order":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Field path to sort by (must be in the field mask); prefix with - to reverse. Default is by id.","title":"Order"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many entries to return per page.","title":"Limit"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["cluster"],"title":"list_applicationsArguments","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_application":{"post":{"operationId":"get_application","summary":"Get one application's name, description, dates and end device limit. Use for \"Show the details of The Things Network app","description":"Get one application's name, description, dates and end device limit. Use for \"Show the details of The Things Network application my-sensors\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"application_id":{"description":"Application id (lowercase, for example 'my-sensors').","maxLength":36,"title":"Application Id","type":"string"},"field_mask":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated names of the fields to include, for example 'name,description,created_at'. Leave empty for the server default.","title":"Field Mask"}},"required":["cluster","application_id"],"title":"get_applicationArguments","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_end_devices":{"post":{"operationId":"list_end_devices","summary":"List the end devices registered in an application with ids, EUIs, name, last seen time, battery, LoRaWAN version and fre","description":"List the end devices registered in an application with ids, EUIs, name, last seen time, battery, LoRaWAN version and frequency plan. Use for \"Which devices are registered in my-sensors and when were they last seen\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"application_id":{"description":"Application id (lowercase, for example 'my-sensors').","maxLength":36,"title":"Application Id","type":"string"},"field_mask":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated names of the fields to include, for example 'name,description,created_at'. Leave empty for the server default.","title":"Field Mask"},"order":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Field path to sort by (must be in the field mask); prefix with - to reverse. Default is by id.","title":"Order"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many entries to return per page.","title":"Limit"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["cluster","application_id"],"title":"list_end_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_end_device":{"post":{"operationId":"get_end_device","summary":"Get one end device's ids, EUIs, name, last seen time, battery, LoRaWAN version, frequency plan and model. Use for \"Show ","description":"Get one end device's ids, EUIs, name, last seen time, battery, LoRaWAN version, frequency plan and model. Use for \"Show the details of device sensor-01 in my-sensors\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"application_id":{"description":"Application id (lowercase, for example 'my-sensors').","maxLength":36,"title":"Application Id","type":"string"},"device_id":{"description":"End device id inside the application (lowercase, for example 'sensor-01').","maxLength":36,"title":"Device Id","type":"string"},"field_mask":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated names of the fields to include, for example 'name,description,created_at'. Leave empty for the server default.","title":"Field Mask"}},"required":["cluster","application_id","device_id"],"title":"get_end_deviceArguments","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/count_end_devices":{"post":{"operationId":"count_end_devices","summary":"Count the end devices registered in an application. Use for \"How many devices are in my-sensors\".","description":"Count the end devices registered in an application. Use for \"How many devices are in my-sensors\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"application_id":{"description":"Application id (lowercase, for example 'my-sensors').","maxLength":36,"title":"Application Id","type":"string"}},"required":["cluster","application_id"],"title":"count_end_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/list_gateways":{"post":{"operationId":"list_gateways","summary":"List the gateways you can access with id, EUI, name, frequency plan and visibility flags. Use for \"Which LoRaWAN gateway","description":"List the gateways you can access with id, EUI, name, frequency plan and visibility flags. Use for \"Which LoRaWAN gateways do I own on The Things Network\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"field_mask":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated names of the fields to include, for example 'name,description,created_at'. Leave empty for the server default.","title":"Field Mask"},"order":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Field path to sort by (must be in the field mask); prefix with - to reverse. Default is by id.","title":"Order"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many entries to return per page.","title":"Limit"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["cluster"],"title":"list_gatewaysArguments","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_gateway":{"post":{"operationId":"get_gateway","summary":"Get one gateway's id, EUI, name, frequency plan, update channel, model and visibility flags. Use for \"Show the details o","description":"Get one gateway's id, EUI, name, frequency plan, update channel, model and visibility flags. Use for \"Show the details of gateway rooftop-gw\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"gateway_id":{"description":"Gateway id (lowercase, for example 'rooftop-gw').","maxLength":36,"title":"Gateway Id","type":"string"},"field_mask":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated names of the fields to include, for example 'name,description,created_at'. Leave empty for the server default.","title":"Field Mask"}},"required":["cluster","gateway_id"],"title":"get_gatewayArguments","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_gateway_connection_stats":{"post":{"operationId":"get_gateway_connection_stats","summary":"Get live statistics of a gateway's connection: connect and disconnect time, last uplink and last status times, uplink an","description":"Get live statistics of a gateway's connection: connect and disconnect time, last uplink and last status times, uplink and downlink counts and round trip times. Use for \"Is gateway rooftop-gw connected and when did it last send an uplink\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"gateway_id":{"description":"Gateway id (lowercase, for example 'rooftop-gw').","maxLength":36,"title":"Gateway Id","type":"string"}},"required":["cluster","gateway_id"],"title":"get_gateway_connection_statsArguments","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_frequency_plans":{"post":{"operationId":"list_frequency_plans","summary":"List the LoRaWAN frequency plans known to the cluster with id, name and band, optionally for one band or gateways only. ","description":"List the LoRaWAN frequency plans known to the cluster with id, name and band, optionally for one band or gateways only. Use for \"Which LoRaWAN frequency plans exist for the EU 868 band\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cluster":{"description":"The Things Stack Community cluster the account lives on: eu1 (Europe), nam1 (North America) or au1 (Australia).","enum":["eu1","nam1","au1"],"title":"Cluster","type":"string"},"band_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only plans of this band, for example EU_863_870 or US_902_928.","title":"Band Id"},"gateways_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list only plans usable by gateways.","title":"Gateways Only"}},"required":["cluster"],"title":"list_frequency_plansArguments","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}}}}