Official SDKs. Every operation, typed, in your language.
An official uptime monitoring SDK for TypeScript, Python, Go and .NET puts every HostTracker API v2 operation behind a typed method instead of hand-rolled HTTP - each client generated from the same published OpenAPI document, wrapped in one small hand-written layer that behaves identically across all four.
npm install @hosttracker/sdk
pip install hosttracker
go get github.com/HostTracker/hosttracker-sdk-go
dotnet add package HostTracker.Sdk
Up and running in three steps
- Mint a token. Sign in and open Integrations - API, tick the scopes this integration needs, and copy the token it mints. It is a long-lived JWT - keep it out of source control, and set it as an environment variable such as
HT_TOKENrather than pasting it into code. - Install the SDK for your stack. Any one of the four commands above -
npm install @hosttracker/sdk,pip install hosttracker,go get github.com/HostTracker/hosttracker-sdk-go, ordotnet add package HostTracker.Sdk- installs the whole 182-operation surface, already typed. - Make your first call. In TypeScript, that is six lines:
The other three languages follow the same shape - construct the client with the token, then call a method named after the operation you want. The "Ten lines in each language" section below has one worked example per SDK.import { HostTracker } from '@hosttracker/sdk'; const ht = new HostTracker({ token: process.env.HT_TOKEN }); const page = await ht.monitors.listMonitor({ query: { limit: 10, state: ['down'] } }); console.log(page.data.length, 'monitors down');
One contract, four languages, the same behaviour in each
Every client is generated from the identical OpenAPI document, so switching language never means relearning the API - only the syntax around it changes.
@hosttracker/sdk
Node.js 20 or newer, ESM and CommonJS, zero runtime dependencies. Read calls work in a browser too - the webhook helpers are pure TypeScript with no node:crypto import.
hosttracker
Python 3.11 or newer, typed end to end and built on httpx. Ships a synchronous HostTracker client and an identical AsyncHostTracker for async/await code.
github.com/HostTracker/hosttracker-sdk-go
Go 1.24 or newer, package hosttracker. Every operation is a flat method on the client, context-based throughout - and it is what ht-cli is built on.
HostTracker.Sdk
Targets net8.0. Thread-safe and long-lived - build one client per process, or register it as a singleton, rather than one per call.
The hand-written layer
One error type, a retry policy that knows which 429 is which, automatic idempotency keys, cursor paging, job polling, instant-check polling and webhook signature verification - written once per language, behaving identically in all four.
Ten lines in each language
List down monitors - TypeScript
import { HostTracker } from '@hosttracker/sdk';
const ht = new HostTracker({ token: process.env.HT_TOKEN });
const page = await ht.monitors.listMonitor({ query: { limit: 10, state: ['down'] } });
for (const m of page.data) {
console.log(m.id, m.url, m.state);
}
console.log(page.data.length, 'monitors down');
Create a monitor - Python
import os
from hosttracker import HostTracker
ht = HostTracker(token=os.environ["HT_TOKEN"])
created = ht.monitors.create_monitor(
body={
"name": "Marketing site",
"type": "http",
"url": "https://www.example.com",
"interval": 5,
"locations": {"pools": ["allworld"]},
}
)
print(created.id)
Run an instant check and wait - Go
c, err := hosttracker.New(os.Getenv("HT_TOKEN"))
if err != nil {
log.Fatal(err)
}
res, err := c.RunCheck(ctx, hosttracker.IcCreateRequest{
Url: "https://example.com",
Type: hosttracker.Ptr(hosttracker.IcCreateRequestTypeHttp),
}, nil)
if err != nil {
log.Fatal(err)
}
for _, ev := range *res.Events {
fmt.Println(*ev.Location, ev.Error)
}
Verify a webhook - .NET
app.MapPost("/hooks/hosttracker", async (HttpRequest req) => {
using var buffer = new MemoryStream();
await req.Body.CopyToAsync(buffer);
var rawBody = buffer.ToArray();
var verdict = WebhookSignature.Verify(
req.Headers.Select(h => new KeyValuePair<string, IEnumerable<string>>(h.Key, h.Value!)),
rawBody, secrets: new[] { currentSecret, previousSecret });
if (!verdict.IsValid) return Results.Unauthorized();
var evt = WebhookEvent.Parse(rawBody);
if (evt.Event == WebhookEvents.MonitorDown)
Console.WriteLine(evt.DataAs<WebhookMonitorAlert>()!.Monitor!.Url);
return Results.Ok();
});
Pick the SDK that matches your stack
| Language | Package | Minimum runtime | Async | Browser-safe reads | Generated from |
|---|---|---|---|---|---|
| TypeScript / JavaScript | @hosttracker/sdk (npm) | Node.js 20+ | Native (Promises) | Yes | github.com/HostTracker/openapi |
| Python | hosttracker (PyPI) | Python 3.11+ | Yes, AsyncHostTracker | No - server-side only | github.com/HostTracker/openapi |
| Go | github.com/HostTracker/hosttracker-sdk-go | Go 1.24+ | Native (context.Context) | No - server-side only | github.com/HostTracker/openapi (3.0 twin) |
| .NET | HostTracker.Sdk (NuGet) | net8.0 | Native (async/await) | No - server-side only | github.com/HostTracker/openapi |
One token. Stated limits. Nothing hidden behind "generous".
The same personal API token authenticates the REST API v2, every official SDK, the ht-cli command line client and the MCP server. Mint it once on your HostTracker profile, pick the scopes it may use, and point any of the four at it.
| Plan | API access | Reads | Writes |
|---|---|---|---|
| Free, Personal, Webmaster | Not included | - | - |
| 30-day trial | Included | 10 per minute, 10,000 per month | 5 per minute, 500 per month |
| Business | Included | 60 per minute, 100,000 per month | 30 per minute, 20,000 per month |
| Enterprise | Included | 120 per minute, 1,000,000 per month | 60 per minute, 100,000 per month |
- Scoped tokens. A token carries only the scopes you tick - monitor, contact, webhook, check, status page, report, incident, maintenance, job, account - each as read or write. Grant what the integration needs and nothing else.
- Long-lived, not revocable. Tokens are JWTs with a lifetime you choose (10 years by default) and cannot be revoked before they expire; an account-wide API switch disables every token at once. Treat a token like a password: keep it out of source control, and add an IP allow-list and a per-token request cap when you mint it.
- Limits you can read. Every response carries
RateLimit-Limit,RateLimit-Remaining,RateLimit-ResetandRateLimit-Policy; a 429 carriesRetry-After. Current usage is on the Integrations - API page and atGET /account/quota. - Safe retries. Writes accept an
Idempotency-Key, so a retried request is never a duplicate; long operations return a job you can poll or have delivered to a webhook.
Full details: authentication and limits in the docs. Plans and prices: pricing.
Frequently Asked Questions
HostTracker publishes four official SDKs: TypeScript/JavaScript (@hosttracker/sdk on npm), Python (hosttracker on PyPI), Go (github.com/HostTracker/hosttracker-sdk-go) and .NET (HostTracker.Sdk on NuGet). All four are open source under the MIT licence on github.com/HostTracker, generated from the same published OpenAPI document, and cover every one of the 182 operations in the API v2 surface. If your language of choice is not among them, the OpenAPI document itself is public and works with any standard code generator - see the last question below.
Both, in layers. The typed request and response models and one method per operation are generated straight from the published OpenAPI document and regenerated whenever the API adds an endpoint, so the typed surface is never out of date by hand. Around that generated core sits a small hand-written layer, identical in shape across all four languages, that a generator alone cannot produce: one error type, a retry policy that knows which 429 is which, automatic idempotency keys, cursor paging helpers, job and instant-check polling, and webhook signature verification. The generated files are committed and never hand-edited; everything custom lives beside them in the repository.
Yes. Every SDK is generated from the same OpenAPI document the API v2 publishes, so all 182 operations across the 14 resource groups - Monitors, Monitor types, Results, Incidents, Maintenance, Contacts, Alerts, Reports, Webhooks, Status pages, Account, Monitoring locations, Instant checks and Jobs - are present and typed the day the API ships them. Method names mirror the specification's operationIds (camelCase in TypeScript, PascalCase in Go and .NET, snake_case in Python), so the reference documentation and a given SDK always name the same operation the same way.
TypeScript, Go and .NET are async-native: every call already returns a Promise, is built on a context.Context, or is awaited with async/await, so there is nothing extra to opt into. Python ships both: HostTracker is the synchronous client and AsyncHostTracker exposes the identical method names and options under async/await, built on httpx's async transport. Pick whichever matches the rest of your code base - the request and response shapes are the same either way, and nothing about the API itself is async-only or sync-only.
Read calls, yes. @hosttracker/sdk ships as ESM and CommonJS with zero dependencies, and its webhook helpers are pure TypeScript with no node:crypto import, so nothing in the package forces a Node runtime. What still needs care is your API token: a token minted for server-side use should never ship inside client-side JavaScript, since anyone who can read the bundle can read the token. The safe pattern is to call your own backend for anything that needs write access or a long-lived credential, and reserve direct browser calls for read-only, low-sensitivity data such as public monitor lists.
Retries are automatic and deliberately narrow: a 429 rate_limited and a 503 carrying Retry-After are retried honouring that header, a transport failure on a read is retried with backoff, and 429 quota_exceeded is never retried because waiting cannot help - only the reset or an upgrade can. Idempotency is automatic too: every write (POST, PATCH, PUT or DELETE that is not a paged /q query) gets a fresh Idempotency-Key by default, the same key rides every retry of that call, and the server replays its stored answer instead of doing the work twice. Keys live 24 hours; reusing one with a different body is refused as a conflict, by design.
There is no /v2 or /v3 path split to track: API v2 is versioned by hostname, not by a path prefix, and the API adds endpoints, optional fields and open-vocabulary values without a version bump. Each SDK release is generated from a specific snapshot of the published OpenAPI document, so a newer SDK release simply knows about newer operations and fields; an older release keeps working against the same live API, ignoring what it does not yet know about. Unknown response members are preserved rather than stripped, and open vocabularies such as monitor type or webhook event degrade to a plain string instead of failing to parse.
Yes - the same document these four SDKs are built from is public at github.com/HostTracker/openapi, as both a 3.1 original and a 3.0 twin for generators that do not read 3.1 yet. Point any OpenAPI generator - openapi-generator, oapi-codegen, NSwag or another - at it and you get the whole surface typed for whatever language you need. What you will not get for free are the conventions the official SDKs implement by hand: bearer auth, the problem-document error codes, automatic idempotency keys, Retry-After-aware retries, cursor paging, job polling and webhook signature verification - all written up in the API guides so you can add the parts you actually need.
Keep exploring HostTracker's monitoring
The REST API v2 the SDKs are built on
182 operations over plain HTTP - the same surface the SDKs wrap, for languages with no official client yet or for calling straight from a script.
ht-cli, the command-line client
Built on the Go SDK: every operation as a shell command, with json/yaml/table output for scripts and CI pipelines.
The MCP server for AI assistants
The same 182 operations as 65 tools inside Claude Code, Cursor, VS Code and Windsurf - no SDK code to write at all.
Ship monitoring with your code
Install the SDK for your stack, mint a token, and your first monitor is ten typed lines away.