Linkbreakers SDKGo

Linkbreakers Go SDK

Build high-performance link management and QR code tracking into your Go services. Zero external dependencies with native error handling and concurrency support.

pkg.go.devGitHubv1.1.0github.com/linkbreakers-com/linkbreakers-go
Install via go get
One command
Open source
GitHub
API coverage
Complete

Why use the Go SDK

Integrate Linkbreakers into your Go 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
go get
go get github.com/linkbreakers-com/linkbreakers-go
Create a tracked link
package main

import (
    "context"
    "fmt"
    "os"
    linkbreakers "github.com/linkbreakers-com/linkbreakers-go"
)

func main() {
    config := linkbreakers.NewConfiguration()
    config.AddDefaultHeader("Authorization",
        "Bearer "+os.Getenv("LINKBREAKERS_SECRET_KEY"))
    config.Servers = linkbreakers.ServerConfigurations{
        {URL: "https://api.linkbreakers.com"},
    }

    client := linkbreakers.NewAPIClient(config)
    request := linkbreakers.NewCreateLinkRequest("https://example.com")
    request.SetName("Campaign Link")
    request.SetTags([]string{"marketing"})

    response, _, err := client.LinksAPI.LinksServiceCreate(
        context.Background()).CreateLinkRequest(*request).Execute()
    if err != nil {
        panic(err)
    }
    fmt.Println("Short URL:", response.Link.Shortlink)
}
List links with pagination
resp, _, err := client.LinksAPI.LinksServiceList(ctx).
    PageSize(20).
    Execute()
if err != nil {
    log.Fatal(err)
}

for _, link := range resp.Links {
    fmt.Printf("%s -> %s\n", link.Name, link.Shortlink)
}
Check custom domain status
domain, _, err := client.DomainsAPI.DomainsServiceCheck(ctx).
    DomainId("dom_abc123").
    Execute()
if err != nil {
    log.Fatal(err)
}

fmt.Printf("DNS: %s, TLS: %s\n", domain.DnsStatus, domain.TlsStatus)

Common use cases

What teams build with the Linkbreakers Go SDK.

High-throughput microservices and API gateways

Custom CLI tools and system utilities

Kubernetes operators and infrastructure automation

Part of the Linkbreakers developer ecosystem

The Go 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 Go SDK?

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

Create your workspace