API & SDKs

Dub API & SDKs: link infrastructure you can build on.

Dub is open source and API-first. If you want links and attribution inside your product, this is where it gets interesting.

Short answer

Dub exposes a REST API and native SDKs so you can create and manage links, track lead and sale events, and read analytics programmatically.

The standout is the embedded referral dashboard: you can drop your affiliate/referral program straight into your app, so users join without leaving for a third-party portal. Great for product-led growth.

What you can build

Because Dub treats links as infrastructure, the API covers the full lifecycle: create branded short links on the fly, attach metadata, track conversions, and pull real-time analytics into your own dashboards.

Its open-source roots and multi-language SDKs make integration fast, and reviewers specifically praise the clarity of the codebase. For teams that want link management native to their product rather than bolted on, that's the appeal.

  • Create/update/delete links programmatically with custom domains.
  • Track lead and sale conversion events from your backend.
  • Native SDKs across popular languages, plus clear docs.
  • Embed a referral dashboard inside your own app UI.

API-first vs bolt-on

Why developer teams lean toward Dub.

NeedBolt-on toolsDub API/SDK
Create links in-appManual/dashboardProgrammatic
Custom conversion eventsLimitedFull via API/SDK
Embed referral UIRareYes
Open sourceNoYes
Multi-language SDKsVariesYes

Capabilities evolve; check Dub's developer docs for current endpoints, SDK coverage and rate limits.

Getting started

Step 1

Grab an API key

Create a Dub account and generate a key; the free plan includes API access to prototype.

Step 2

Install an SDK

Add the SDK for your stack and create your first branded link programmatically.

Step 3

Track & embed

Send conversion events from your backend and, if you're running referrals, embed the dashboard in-app.

Who this is for

This is the sweet spot for product-led SaaS and developer teams that want links, attribution and referrals as part of the product experience — not a separate tool users have to visit.

If you're non-technical and just want a dashboard, you won't need the API — Dub's UI covers that. But if engineering owns growth infrastructure, the API and SDKs are a genuine differentiator.

Link infrastructure, by API.

Build branded links, conversion tracking and referrals directly into your product.

Try Dub free
Does Dub have an API?+

Yes. Dub offers a REST API and native SDKs to create and manage links, track conversion events and read analytics programmatically. API access is available even on the free plan for prototyping.

Can I embed Dub's referral dashboard in my app?+

Yes — one of Dub's signature features is an embedded referral dashboard you can place inside your own product, so users join your program without leaving for a third-party portal.

Is Dub open source?+

Yes. Dub is open source, which appeals to developers who want transparency, the option to self-host, or the ability to audit and extend the platform. Its codebase is publicly available.

Which languages have SDKs?+

Dub provides native SDKs across several popular languages. Check Dub's developer documentation for the current list, endpoints and rate limits.