Install
- npm
- yarn
- pnpm
Options
The SDK constructor accepts an options object with the following properties:string
required
The API token for the Dub API. You can create your token from the Dub
dashboard.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
TypeScript SDK for Dub
npm install dub
yarn add dub zod # zod is a peer dependency
pnpm add dub
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
});
await dub.links.create({
url: "https://google.com",
});