BTN API v1
24 methods over a single JSON-RPC endpoint.
Calling the API
Every method is a POST of a single JSON envelope to https://api.broadcasthe.net/. The method name is in the body, not the URL.
POST https://api.broadcasthe.net/
Content-Type: application/json
{"id": 1, "method": "getChangelog", "params": {}}
This is JSON-RPC 1.0-shaped rather than 2.0: there is no jsonrpc field, and id must be present and non-empty. An empty or absent id is treated as a notification, and the server returns an empty 200 with no body — including when the request was malformed, so a client that omits id cannot tell success from a parse failure.
Try it without a key. getChangelog takes no API key and is not IP-gated, so it works before you have credentials.
Authorisation
Authenticated methods take your API key as the key parameter. There is no header form.
Keys are also bound to source IPs. A call from an address the tracker has not seen before is rejected with -32004 and the address is recorded for approval — it is not accepted and audited later. This is the failure almost every new integration hits first, and it means a working key can still fail from a new host:
Errors
An error response carries result: null alongside error, which JSON-RPC 2.0 forbids. Test for the presence of the error key; do not test whether result is falsy.
0 is not a catch-all by design — several call sites raise an error without assigning a code, and those surface as 0 with a descriptive message. Treat the message as the signal there, and do not switch on 0.
Types
Numbers come back as strings. The database connection stringifies every scalar it fetches, so Upload, Snatches, ClassLevel and friends are "12345", not 12345. The schema records this honestly: a field shown as string (numeric) is a JSON string that always holds a number. Parse it rather than assuming a type.
Methods