AptlyStar

Dub

Link management with Dub

Instructions d'utilisation

Create, manage, and track short links with Dub. Supports custom domains, UTM parameters, link analytics, and more.

Outils

Create a new short link with Dub. Supports custom domains, slugs, UTM parameters, and more.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
urlstringOuiThe destination URL of the short link
domainstringNonCustom domain for the short link (defaults to dub.sh)
keystringNonCustom slug for the short link (randomly generated if not provided)
externalIdstringNonExternal ID for the link in your database
tagIdsstringNonComma-separated tag IDs to assign to the link
commentsstringNonComments for the short link
expiresAtstringNonExpiration date in ISO 8601 format
passwordstringNonPassword to protect the short link
rewritebooleanNonWhether to enable link cloaking
archivedbooleanNonWhether to archive the link
titlestringNonCustom OG title for the link preview
descriptionstringNonCustom OG description for the link preview
utm_sourcestringNonUTM source parameter
utm_mediumstringNonUTM medium parameter
utm_campaignstringNonUTM campaign parameter
utm_termstringNonUTM term parameter
utm_contentstringNonUTM content parameter

Sortie

ParamètreTypeDescription
idstringUnique ID of the created link
domainstringDomain of the short link
keystringSlug of the short link
urlstringDestination URL
shortLinkstringFull short link URL
qrCodestringQR code URL for the short link
archivedbooleanWhether the link is archived
externalIdstringExternal ID
titlestringOG title
descriptionstringOG description
tagsjsonTags assigned to the link (id, name, color)
clicksnumberNumber of clicks
leadsnumberNumber of leads
salesnumberNumber of sales
saleAmountnumberTotal sale amount in cents
lastClickedstringLast clicked timestamp
createdAtstringCreation timestamp
updatedAtstringLast update timestamp
utm_sourcestringUTM source parameter
utm_mediumstringUTM medium parameter
utm_campaignstringUTM campaign parameter
utm_termstringUTM term parameter
utm_contentstringUTM content parameter

Create or update a short link by its URL. If a link with the same URL already exists, update it. Otherwise, create a new link.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
urlstringOuiThe destination URL of the short link
domainstringNonCustom domain for the short link (defaults to dub.sh)
keystringNonCustom slug for the short link (randomly generated if not provided)
externalIdstringNonExternal ID for the link in your database
tagIdsstringNonComma-separated tag IDs to assign to the link
commentsstringNonComments for the short link
expiresAtstringNonExpiration date in ISO 8601 format
passwordstringNonPassword to protect the short link
rewritebooleanNonWhether to enable link cloaking
archivedbooleanNonWhether to archive the link
titlestringNonCustom OG title for the link preview
descriptionstringNonCustom OG description for the link preview
utm_sourcestringNonUTM source parameter
utm_mediumstringNonUTM medium parameter
utm_campaignstringNonUTM campaign parameter
utm_termstringNonUTM term parameter
utm_contentstringNonUTM content parameter

Sortie

ParamètreTypeDescription
idstringUnique ID of the link
domainstringDomain of the short link
keystringSlug of the short link
urlstringDestination URL
shortLinkstringFull short link URL
qrCodestringQR code URL for the short link
archivedbooleanWhether the link is archived
externalIdstringExternal ID
titlestringOG title
descriptionstringOG description
tagsjsonTags assigned to the link (id, name, color)
clicksnumberNumber of clicks
leadsnumberNumber of leads
salesnumberNumber of sales
saleAmountnumberTotal sale amount in cents
lastClickedstringLast clicked timestamp
createdAtstringCreation timestamp
updatedAtstringLast update timestamp
utm_sourcestringUTM source parameter
utm_mediumstringUTM medium parameter
utm_campaignstringUTM campaign parameter
utm_termstringUTM term parameter
utm_contentstringUTM content parameter

Retrieve information about a short link by its link ID, external ID, or domain + key combination.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
linkIdstringNonThe unique ID of the short link
externalIdstringNonThe external ID of the link in your database
domainstringNonThe domain of the link (use with key)
keystringNonThe slug of the link (use with domain)

Sortie

ParamètreTypeDescription
idstringUnique ID of the link
domainstringDomain of the short link
keystringSlug of the short link
urlstringDestination URL
shortLinkstringFull short link URL
qrCodestringQR code URL for the short link
archivedbooleanWhether the link is archived
externalIdstringExternal ID
titlestringOG title
descriptionstringOG description
tagsjsonTags assigned to the link (id, name, color)
clicksnumberNumber of clicks
leadsnumberNumber of leads
salesnumberNumber of sales
saleAmountnumberTotal sale amount in cents
lastClickedstringLast clicked timestamp
createdAtstringCreation timestamp
updatedAtstringLast update timestamp
utm_sourcestringUTM source parameter
utm_mediumstringUTM medium parameter
utm_campaignstringUTM campaign parameter
utm_termstringUTM term parameter
utm_contentstringUTM content parameter

Update an existing short link. You can modify the destination URL, slug, metadata, UTM parameters, and more.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
linkIdstringOuiThe link ID or external ID prefixed with ext_
urlstringNonNew destination URL
domainstringNonNew custom domain
keystringNonNew custom slug
titlestringNonCustom OG title
descriptionstringNonCustom OG description
externalIdstringNonExternal ID for the link
tagIdsstringNonComma-separated tag IDs
commentsstringNonComments for the short link
expiresAtstringNonExpiration date in ISO 8601 format
passwordstringNonPassword to protect the link
rewritebooleanNonWhether to enable link cloaking
archivedbooleanNonWhether to archive the link
utm_sourcestringNonUTM source parameter
utm_mediumstringNonUTM medium parameter
utm_campaignstringNonUTM campaign parameter
utm_termstringNonUTM term parameter
utm_contentstringNonUTM content parameter

Sortie

ParamètreTypeDescription
idstringUnique ID of the updated link
domainstringDomain of the short link
keystringSlug of the short link
urlstringDestination URL
shortLinkstringFull short link URL
qrCodestringQR code URL for the short link
archivedbooleanWhether the link is archived
externalIdstringExternal ID
titlestringOG title
descriptionstringOG description
tagsjsonTags assigned to the link (id, name, color)
clicksnumberNumber of clicks
leadsnumberNumber of leads
salesnumberNumber of sales
saleAmountnumberTotal sale amount in cents
lastClickedstringLast clicked timestamp
createdAtstringCreation timestamp
updatedAtstringLast update timestamp
utm_sourcestringUTM source parameter
utm_mediumstringUTM medium parameter
utm_campaignstringUTM campaign parameter
utm_termstringUTM term parameter
utm_contentstringUTM content parameter

Delete a short link by its link ID or external ID (prefixed with ext_).

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
linkIdstringOuiThe link ID or external ID prefixed with ext_

Sortie

ParamètreTypeDescription
idstringID of the deleted link

Retrieve a paginated list of short links for the authenticated workspace. Supports filtering by domain, search query, tags, and sorting.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
domainstringNonFilter by domain
searchstringNonSearch query matched against the short link slug and destination URL
tagIdsstringNonComma-separated tag IDs to filter by
showArchivedbooleanNonWhether to include archived links (defaults to false)
pagenumberNonPage number (default: 1)
pageSizenumberNonNumber of links per page (default: 100, max: 100)

Sortie

ParamètreTypeDescription
linksjsonArray of link objects (id, domain, key, url, shortLink, clicks, tags, createdAt)
countnumberNumber of links returned

Retrieve the number of short links for the authenticated workspace, optionally filtered and grouped by domain, tag, user, or folder.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
domainstringNonFilter by domain
searchstringNonSearch query matched against the short link slug and destination URL
tagIdsstringNonComma-separated tag IDs to filter by
tagNamesstringNonComma-separated tag names to filter by (case-insensitive)
folderIdstringNonFilter by folder ID
showArchivedbooleanNonWhether to include archived links (defaults to false)
groupBystringNonGroup counts by: domain, tagId, userId, or folderId

Sortie

ParamètreTypeDescription
countnumberTotal number of links matching the filters
groupsjsonPer-group counts when groupBy is set (e.g. [{ domain, count }])

Create up to 100 short links in a single request. Returns the created links alongside any per-link errors.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
linksjsonOuiJSON array of link objects to create. Each object requires a "url" and may include domain, key, tagIds, and other link fields (max 100).

Sortie

ParamètreTypeDescription
createdjsonArray of successfully created link objects
errorsjsonArray of per-link errors ({ link, error, code }) for links that failed
countnumberNumber of links successfully created

Apply the same set of field updates to up to 100 links at once, selected by link IDs or external IDs.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
linkIdsstringNonComma-separated link IDs to update (max 100, takes precedence over externalIds)
externalIdsstringNonComma-separated external IDs to update (max 100)
datajsonOuiJSON object of fields to apply to every selected link (e.g. { "archived": true, "tagIds": ["..."] })

Sortie

ParamètreTypeDescription
updatedjsonArray of updated link objects
countnumberNumber of links updated

Delete up to 100 short links in a single request by their link IDs. Non-existing IDs are ignored.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
linkIdsstringOuiComma-separated link IDs to delete (max 100)

Sortie

ParamètreTypeDescription
deletedCountnumberNumber of links that were deleted

dub_get_analytics

Retrieve analytics for links including clicks, leads, and sales. Supports filtering by link, time range, and grouping by various dimensions.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
eventstringNonEvent type: clicks (default), leads, sales, or composite
groupBystringNonGroup results by: count (default), timeseries, countries, cities, devices, browsers, os, referers, top_links, top_urls
linkIdstringNonFilter by link ID
externalIdstringNonFilter by external ID (prefix with ext_)
domainstringNonFilter by domain
intervalstringNonTime interval: 24h (default), 7d, 30d, 90d, 1y, mtd, qtd, ytd, or all
startstringNonStart date/time in ISO 8601 format (overrides interval)
endstringNonEnd date/time in ISO 8601 format (defaults to now)
countrystringNonFilter by country (ISO 3166-1 alpha-2 code)
timezonestringNonIANA timezone for timeseries data (defaults to UTC)

Sortie

ParamètreTypeDescription
clicksnumberTotal number of clicks
leadsnumberTotal number of leads
salesnumberTotal number of sales
saleAmountnumberTotal sale amount in cents
datajsonGrouped analytics data (timeseries, countries, devices, etc.)

dub_get_events

Retrieve a paginated stream of individual click, lead, and sale events for links, with filtering by link, time range, and location.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
eventstringNonEvent type: clicks (default), leads, or sales
linkIdstringNonFilter by link ID
externalIdstringNonFilter by external ID (prefix with ext_)
domainstringNonFilter by domain
intervalstringNonTime interval: 24h (default), 7d, 30d, 90d, 1y, mtd, qtd, ytd, or all
startstringNonStart date/time in ISO 8601 format (overrides interval)
endstringNonEnd date/time in ISO 8601 format (defaults to now)
countrystringNonFilter by country (ISO 3166-1 alpha-2 code)
timezonestringNonIANA timezone for event timestamps (defaults to UTC)
pagenumberNonPage number (default: 1)
limitnumberNonNumber of events per page (default: 100, max: 1000)
sortOrderstringNonSort order: desc (default) or asc

Sortie

ParamètreTypeDescription
eventsjsonArray of event objects (event, timestamp, click, link, and customer/sale data when applicable)
countnumberNumber of events returned

dub_get_qr_code

Generate a customizable QR code (PNG) for a short link, with control over size, error correction, colors, and margin.

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDub API key
urlstringOuiThe short link URL to encode in the QR code
sizenumberNonQR code size in pixels (default: 600)
levelstringNonError correction level: L (default), M, Q, or H
fgColorstringNonForeground color in hex (default: #000000)
bgColorstringNonBackground color in hex (default: #FFFFFF)
hideLogobooleanNonWhether to hide the logo in the center of the QR code (default: false)
marginnumberNonMargin (quiet zone) around the QR code (default: 2)

Sortie

ParamètreTypeDescription
filefileGenerated QR code image stored in execution files
contentstringBase64-encoded PNG image data

On this page