SDKs
The official libraries for JavaScript and TypeScript, Python and Go: install, pages, errors and webhooks.
Updated October 22, 2026
Three libraries, one way of naming things: artists.list, changes.resolve, stats.trend, webhooks.create. Each reads the key from LABELSENTRY_KEY, follows pages for you, retries 429 and 5xx answers and sends an Idempotency-Key with every POST.
JavaScript and TypeScript
bash
npm install @labelsentry/sdkts
import { LabelSentry } from "@labelsentry/sdk";
const ls = new LabelSentry();
for await (const change of ls.changes.list({ severity: "critical", status: "open" })) {
console.log(change.artist.name, change.summary);
}Python
bash
pip install labelsentrypython
from labelsentry import LabelSentry
ls = LabelSentry()
trend = ls.stats.trend(days=28)
print(trend["streams_prev"], trend["buckets"][-1]["streams"])Go
bash
go get github.com/LabelSentrycom/labelsentry-sdks/gogo
client := labelsentry.New("")
releases, err := client.Releases.List(ctx, &labelsentry.ReleasesListParams{State: "down"}).All()Errors
A refused request raises an error with status, code, message and request_id: LabelSentryError in JavaScript and Python, *labelsentry.Error in Go, where labelsentry.IsCode(err, "not_found") checks the code.
Read next
The REST APIEverything the dashboard does, from your own systems: artists, catalog, changes, statistics, alerts, webhooks, team and exports. Addresses, pages, errors and limits.API keysCreate keys with exactly the rights they need, limit them to artists, addresses or a date, rotate and revoke them.WebhooksOn Business, receive events such as track.offline as signed requests at your own address. Events, the signature, retries and resending.
Still stuck? Write to [email protected].