Skip to main content
Whether you are using Dub’s API or not, this page is a quick way to understand how Dub works. Within Dub, all data belongs to a Workspace. Within a workspace, you have Links, Domains, Tags, and more.

Workspace

Workspaces is the defacto way of organizing your links and working with your team on Dub. You can think of a Dub workspace like a workspace on Slack or Discord – it’s a shared space where you can invite your team members to collaborate on links. When interacting with Dub’s API, you’ll also need to create a workspace API key to authenticate your requests.
id
string
required
The unique ID of the workspace.
name
string
required
The name of the workspace.
slug
string
required
The slug of the workspace.
The logo of the workspace.
usage
number
required
The usage of the workspace.
usageLimit
number
required
The usage limit of the workspace.
The links usage of the workspace.
The links limit of the workspace.
domainsLimit
number
required
The domains limit of the workspace.
tagsLimit
number
required
The tags limit of the workspace.
usersLimit
number
required
The users limit of the workspace.
plan
string
required
The plan of the workspace.
stripeId
string | null
required
The Stripe ID of the workspace.
billingCycleStart
number
required
The date and time when the billing cycle starts for the workspace.
createdAt
string
required
The date and time when the workspace was created.
users
object[]
required
The role of the authenticated user in the workspace.
domains
object[]
required
The domains of the workspace.
Links are the bread and butter of Dub. You can shorten any URL to a Dub link, which you can then share with your audience. Links can be created, updated, and deleted via the Dub API or the Dub dashboard.

Domains

On Dub, you can add custom domains to create branded short links for better brand recognition. You can also set a primary domain for it to be used as the default domain for new links (both via the API and the dashboard).
id
string
required
The unique identifier of the domain.
slug
string
required
The domain name.
verified
boolean
default:false
required
Whether the domain is verified.
primary
boolean
default:false
required
Whether the domain is the primary domain for the workspace.
archived
boolean
default:false
required
Whether the domain is archived.
placeholder
string
default:"https://dub.co/help/article/what-is-dub"
required
Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.
expiredUrl
string | null
required
The URL to redirect to when a link under this domain has expired.
notFoundUrl
string | null
required
The URL to redirect to when a link under this domain doesn’t exist.
createdAt
string
required
The date the domain was created.
updatedAt
string
required
The date the domain was last updated.
registeredDomain
object | null
required
The registered domain record.

Tags

Tags are a way to organize your links. You can add tags to your links to categorize them and make them easier to find. You can also filter analytics by tags to get a better understanding of how your campaigns are performing.
id
string
required
The unique ID of the tag.
name
string
required
The name of the tag.
color
string
required
The color of the tag.