Base URL
All API requests should be made to:API Features
The Dub API provides comprehensive endpoints for:- Links: Create, update, retrieve, and delete short links with advanced features
- Analytics: Retrieve detailed analytics for links, domains, or entire workspaces
- Domains: Manage custom domains for your short links
- Tags: Organize links with custom tags
- Folders: Organize links into folders for better management
- Customers: Track and manage customer data for attribution
- Partners: Manage affiliate partners and track commissions
- Events: Stream real-time click events and conversion data
- Tracking: Track leads and sales for conversion attribution
Quick Start
To get started with the Dub API:- Create a workspace on dub.co
- Generate an API token from your workspace settings
- Include the token in the
Authorizationheader of your requests - Start making API calls
Workspace ID
Most API endpoints require a workspace ID to identify which workspace the request belongs to. You can provide this in two ways:- As a query parameter:
?workspaceId=ws_... - As a path parameter:
/workspaces/{idOrSlug}/...
Workspace IDs start with
ws_. You can find your workspace ID in your workspace settings or use your workspace slug instead.SDKs
Dub provides official SDKs to make integration easier:Support
Need help with the API? Here are some resources:API Versioning
The current API version is0.0.1. The API uses semantic versioning, and breaking changes will be communicated in advance.