Link management for scaling teams

Effortlessly manage massive campaigns, whether you’re handling millions of links or billions of clicks — we’ve got you covered.

Link management screenshot

Powering established enterprises and startups

VERCELPRISMARAYCASTCLERKHASHNODEPERPLEXITYCALREPLICATEFRAMERTINYBIRDATTIOAPPWRITE
See more of our fantastic customers
Vercel logo

Stripe for payments, Vercel for deployments, Dub for links.

Guillermo RauchCEO, VercelGuillermo Rauch
Scalability

Manage all your campaigns with confidence

Infinitely scale your campaigns with zero issues, with a 99.9% uptime SLA for our web platform and API. Dub is built to handle everything you want to track.
Clicks Tracked / Month50,000,000+
Links Created / Month100,000+
Customers Worldwide60,000+
# direct-dub-support
Edward Hart
Edward Hart
That fixed my issue, thanks!
Steven Tey
Steven Tey
Glad we could help!
Enterprise-level support

Priority support through a dedicated Slack channel, beta access to new features, and a smooth, hassle-free migration process.

Account security

Full account control with SAML/SSO and SCIM directory sync, compatible with Okta, Azure AD, and Google.

Data security

The core of web foundations

Dub is built with best-in-class security practices, trusted by enterprise teams and governments. This includes encryption for data both in transit and at rest.
Vercel logo
Vercel
Cloud infrastructure
Perplexity logo
Perplexity
AI search engine
Malaysia logo
Malaysia
Government services
dub/api/links/route.ts
import { getDomainOrThrow } from "@/lib/api/domains/get-domain-or-throw";
import { DubApiError, ErrorCodes } from "@/lib/api/errors";
import { createLink, processLink } from "@/lib/api/links";
import { throwIfLinksUsageExceeded } from "@/lib/api/links/usage-checks";
import { parseRequestBody } from "@/lib/api/utils";
import { withWorkspace } from "@/lib/auth";
import { ratelimit } from "@/lib/upstash";
import { sendWorkspaceWebhook } from "@/lib/webhook/publish";
import {
  createLinkBodySchema,
  getLinksQuerySchemaExtended,
  linkEventSchema,
} from "@/lib/zod/schemas/links";
import { getSearchParamsWithArray } from "@dub/utils";
import { waitUntil } from "@vercel/functions";
import { NextResponse } from "next/server";

// POST /api/links – create a link
export const POST = withWorkspace(
  async ({ req, headers, workspace }) => {
    const searchParams = getSearchParamsWithArray(req.url);

    const {
      domain,
Open source

Building trust and driving collaboration

Open source fuels innovation and trust. By sharing our code, we empower global collaboration and ensure secure link management for your enterprise.
18.9K Stars
Steven Tey
Kiran Krishnan
Tim Wilson
Marcus Farrell
Zach Waterfield
Florian Kiem
Snazzah
Suraj Gupta
60+ Contributors

Open source software tends to be more secure than their closed source alternatives.

Mark ZuckerbergCEO, MetaMark Zuckerberg

Get an Enterprise trial

Discover why Dub is the best choice for enterprise marketing teams. We'll give you a trial of the product and discuss your requirements.