Linkbreakers SDKTypeScript

Linkbreakers TypeScript SDK

Build link management, QR code tracking, and visitor identification into your TypeScript and JavaScript applications. Full type safety with dual-key authentication for frontend and backend.

npmGitHubv1.1.0linkbreakers
Install via npm / pnpm / yarn
One command
Open source
GitHub
API coverage
Complete

Why use the TypeScript SDK

Integrate Linkbreakers into your TypeScript / JavaScript stack with type-safe, production-ready methods.

Full API coverage

Every Linkbreakers dashboard feature is available through the SDK — links, workflows, QR codes, analytics, domains, and visitor tracking.

Type-safe and documented

Generated from the OpenAPI specification with full type definitions, IDE autocomplete, and inline documentation.

Production-ready

Built-in error handling, retry logic support, and authentication management. Open source on GitHub with active maintenance.

Quick start

Install the SDK, authenticate, and make your first API call.

Install
npm / pnpm / yarn
pnpm add linkbreakers
Create a tracked link
import { Configuration, LinksApi } from 'linkbreakers';

const config = new Configuration({
  accessToken: process.env.LINKBREAKERS_SECRET_KEY,
  basePath: 'https://api.linkbreakers.com',
});

const api = new LinksApi(config);
const response = await api.linksServiceCreate({
  createLinkRequest: {
    destination: 'https://example.com',
    name: 'Campaign Link',
    tags: ['marketing'],
  },
});

console.log(response.link.shortlink);
Identify a visitor (frontend)
import { Configuration, VisitorsApi } from 'linkbreakers';

const config = new Configuration({
  accessToken: process.env.NEXT_PUBLIC_LINKBREAKERS_PK,
  basePath: 'https://api.linkbreakers.com',
});

const visitorsApi = new VisitorsApi(config);
const lbid = new URLSearchParams(window.location.search).get('lbid');

await visitorsApi.visitorsServiceIdentify({
  identifyRequest: {
    lbid,
    visitor: {
      data: {
        '$email': 'user@example.com',
        '$firstName': 'Jane',
        plan: 'premium',
      },
    },
  },
});
List links with filters
const links = await api.linksServiceList({
  tags: ['marketing'],
  pageSize: 20,
});

for (const link of links.links) {
  console.log(`${link.name}: ${link.shortlink}`);
}

Common use cases

What teams build with the Linkbreakers TypeScript SDK.

Next.js and React frontend visitor tracking

Express and Node.js backend link management

Browser-safe publishable keys for visitor identification

Part of the Linkbreakers developer ecosystem

The TypeScript SDK is one of five official SDKs. Linkbreakers also offers an MCP server for AI assistants and a CLI for terminal workflows.

Ready to build with the TypeScript SDK?

Sign up for Linkbreakers, create an API token, and start integrating in minutes.

Create your workspace