Skip to main content
The Link object represents a shortened URL in your workspace. It contains configuration for redirection, analytics, and metadata.

Schema

id
string
required
The unique ID of the link.
domain
string
required
The domain of the link (e.g. dub.sh).
key
string
required
The short key of the link (e.g. github).
url
string
required
The destination URL where the short link redirects to.
archived
boolean
Whether the link is archived. Archived links still work but don’t show up in the dashboard.
publicStats
boolean
Whether the link has public statistics enabled.
tags
array
The tags assigned to the link.
clicks
number
The number of clicks on the link.
leads
number
The number of leads collected via the link.
sales
number
The number of sales collected via the link.
createdAt
string
The date the link was created.
updatedAt
string
The date the link was last updated.

Example

{
  "id": "link_clj8...",
  "domain": "dub.sh",
  "key": "github",
  "url": "https://github.com/dubinc/dub",
  "archived": false,
  "publicStats": false,
  "tags": [],
  "clicks": 4521,
  "leads": 120,
  "sales": 5,
  "createdAt": "2023-11-07T14:00:00.000Z",
  "updatedAt": "2023-11-07T14:00:00.000Z"
}