Skip to main content
Understanding the core data models is key to using the Dub API and platform effectively. All data in Dub belongs to a Workspace, which acts as the top-level container for your organization. This page provides a conceptual overview of the primary entities you’ll interact with and how they relate to each other, whether you’re using the Dub dashboard or the Dub API.

Core Entities

The following table defines the primary data models in Dub:
EntityDescription
WorkspaceThe top-level container for all your data. Invite team members, manage roles, and configure billing here.
ProgramA partner program you create with configurable reward rules, commission structures, and enrolled partners.
PartnerA user who joined a program. They receive a unique referral link and can earn commissions on conversions.
LinkA short link that redirects to a destination URL. Can be standalone or associated with a partner for tracking.
AnalyticsAggregated data about link performance including clicks, geographic location, devices, referrers, and UTMs.
CustomerAn end-user who clicked a partner’s link and converted (e.g., signed up or made a purchase).
CommissionA record of a successful conversion attributed to a partner, with a status (pending, approved, paid) and amount.
DomainA custom domain for branded short links. Improves brand recognition and click-through rates.
TagA label to organize, filter, and group links for easier management and analytics segmentation.

Entity Relationships

The diagram below illustrates how these entities relate to one another:
Dub Data Model - Entity Relationship Diagram

Key Relationships

The relationships between entities follow a clear hierarchy:
  1. Workspace → Program: A workspace can have multiple partner programs. Each program operates independently with its own reward rules and partners.
  2. Program → Partner: Partners join a specific program. A single user could be a partner in multiple programs across different workspaces.
  3. Partner → Link: When a partner joins a program, they receive a unique referral link. This link is used to track all referrals back to that partner.
  4. Link → Customer: When a visitor clicks a partner’s link and converts, they become a Customer. The customer is permanently associated with the referring link.
  5. Customer → Commission: Each qualifying action by a customer (e.g., a purchase) generates a Commission record for the partner who referred them.

Next Steps

Now that you understand the data model, you can: