Skip to main content

List all links

Retrieve a paginated list of links for the authenticated workspace.
1 min read
get/links
Request example
Response
get/links

Authorization

Authorizationstringheaderrequired#
Default authentication mechanism

Query parameters

domainstring#
The domain to filter the links by. E.g. ac.me. If not provided, all links for the workspace will be returned.
tagIdstringdeprecated#
Deprecated: Use tagIds instead. The tag ID to filter the links by.
tagIdsstring · string[]#
The tag IDs to filter the links by.
tagNamesstring · string[]#
The unique name of the tags assigned to the short link (case insensitive).
folderIdstring#
The folder ID to filter the links by.
userIdstring#
The user ID to filter the links by.
tenantIdstring#
The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant.
showArchivedboolean#
Whether to include archived links in the response. Defaults to false if not provided.

Default: false

withTagsbooleandeprecated#
DEPRECATED. Filter for links that have at least one tag assigned to them.

Default: false

endingBeforestring#
If specified, the query only searches for results before this cursor. Mutually exclusive with startingAfter.
startingAfterstring#
If specified, the query only searches for results after this cursor. Mutually exclusive with endingBefore.
pageintegerdeprecated#
DEPRECATED. Use startingAfter instead.

Range: true < x <= 9007199254740991

pageSizeinteger#
The number of items per page.

Default: 100

Range: true < x <= 100

Responses

application/json
A list of links
idstringrequired#
The unique ID of the short link.
domainstringrequired#
The domain of the short link. If not provided, the primary domain for the workspace will be used (or dub.sh if the workspace has no domains).
keystringrequired#
The short link slug. If not provided, a random 7-character slug will be generated.
urlstringrequired#
The destination URL of the short link.
trackConversionbooleanrequired#
Whether to track conversions for the short link.

Default: false

externalIdstringrequired#
The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.
tenantIdstringrequired#
The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.
programIdstringrequired#
The ID of the program the short link is associated with.
partnerIdstringrequired#
The ID of the partner the short link is associated with.
archivedbooleanrequired#
Whether the short link is archived.

Default: false

expiresAtstringrequired#
The date and time when the short link will expire in ISO-8601 format.
expiredUrlstringrequired#
The URL to redirect to when the short link has expired.
disabledAtstringrequired#
The date and time when the short link was disabled. When a short link is disabled, it will redirect to its domain's not found URL, and its stats will be excluded from your overall stats.
passwordstringrequired#
The password required to access the destination URL of the short link.
proxybooleanrequired#
Whether the short link uses Custom Link Previews feature.

Default: false

titlestringrequired#
The title of the short link. Will be used for Custom Link Previews if proxy is true.
descriptionstringrequired#
The description of the short link. Will be used for Custom Link Previews if proxy is true.
imagestringrequired#
The image of the short link. Will be used for Custom Link Previews if proxy is true.
videostringrequired#
The custom link preview video (og:video). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og
rewritebooleanrequired#
Whether the short link uses link cloaking.

Default: false

doIndexbooleanrequired#
Whether to allow search engines to index the short link.

Default: false

iosstringrequired#
The iOS destination URL for the short link for iOS device targeting.
androidstringrequired#
The Android destination URL for the short link for Android device targeting.
geoobjectrequired#
Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
Show child attributes
{key}string#
publicStatsbooleanrequired#
Whether the short link's stats are publicly accessible.

Default: false

tagsobject[]required#
The tags assigned to the short link.
Show child attributes
idstringrequired#
The unique ID of the tag.
namestringrequired#
The name of the tag.
colorenum<string>required#
The color of the tag.
Options:redyellowgreenbluepurplebrowngraypink
folderIdstringrequired#
The unique ID of the folder assigned to the short link.
commentsstringrequired#
The comments for the short link.
qrCodestringrequired#
The full URL of the QR code for the short link (e.g. https://api.dub.co/qr?url=https://dub.sh/try).
utm_sourcestringrequired#
The UTM source of the short link.
utm_mediumstringrequired#
The UTM medium of the short link.
utm_campaignstringrequired#
The UTM campaign of the short link.
utm_termstringrequired#
The UTM term of the short link.
utm_contentstringrequired#
The UTM content of the short link.
testVariantsobject[]#
An array of A/B test URLs and the percentage of traffic to send to each URL.

Items: 2–4

Show child attributes
urlstringrequired#
percentagenumberrequired#

Range: 10–90

testStartedAtstring#
The date and time when the tests started.
testCompletedAtstring#
The date and time when the tests were or will be completed.
userIdstringrequired#
The user ID of the creator of the short link.
workspaceIdstringrequired#
The workspace ID of the short link.
clicksnumberrequired#
The number of clicks on the short link.

Default: 0

leadsnumberrequired#
The number of leads the short link has generated.

Default: 0

conversionsnumberrequired#
The number of leads that converted to paying customers.

Default: 0

salesnumberrequired#
The total number of sales (includes recurring sales) generated by the short link.

Default: 0

saleAmountnumberrequired#
The total dollar value of sales (in cents) generated by the short link.

Default: 0

lastClickedstringrequired#
The date and time when the short link was last clicked.
createdAtstringrequired#
The date and time when the short link was created.
updatedAtstringrequired#
The date and time when the short link was last updated.
tagIdstringrequireddeprecated#
Deprecated: Use tags instead. The unique ID of the tag assigned to the short link.
projectIdstringrequireddeprecated#
Deprecated: Use workspaceId instead. The project ID of the short link.
webhookIdsstring[]requireddeprecated#
Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.