Thanks to visit codestin.com
Credit goes to docs.sim.ai

Dub

Dub is an open-source link management platform for modern marketing teams. It provides powerful short link creation, analytics, and tracking capabilities with enterprise-grade infrastructure.

With the Dub integration in Sim, you can:

  • Create short links: Generate branded short links with custom domains, slugs, and UTM parameters
  • Upsert links: Create or update links idempotently by destination URL
  • Retrieve link info: Look up link details by ID, external ID, or domain + key combination
  • Update links: Modify destination URLs, metadata, UTM parameters, and link settings
  • Delete links: Remove short links by ID or external ID
  • List links: Search and filter links with pagination, sorting, and tag filtering
  • Get analytics: Retrieve click, lead, and sales analytics with grouping by time, geography, device, browser, referer, and more

In Sim, the Dub integration enables your agents to manage short links and track their performance programmatically. Use it to create trackable links as part of marketing workflows, monitor link engagement, and make data-driven decisions based on click analytics and conversion metrics.

Usage Instructions

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

Actions

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

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
urlstringYesThe destination URL of the short link
domainstringNoCustom domain for the short link (defaults to dub.sh)
keystringNoCustom slug for the short link (randomly generated if not provided)
externalIdstringNoExternal ID for the link in your database
tagIdsstringNoComma-separated tag IDs to assign to the link
commentsstringNoComments for the short link
expiresAtstringNoExpiration date in ISO 8601 format
passwordstringNoPassword to protect the short link
rewritebooleanNoWhether to enable link cloaking
archivedbooleanNoWhether to archive the link
titlestringNoCustom OG title for the link preview
descriptionstringNoCustom OG description for the link preview
utm_sourcestringNoUTM source parameter
utm_mediumstringNoUTM medium parameter
utm_campaignstringNoUTM campaign parameter
utm_termstringNoUTM term parameter
utm_contentstringNoUTM content parameter

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
urlstringYesThe destination URL of the short link
domainstringNoCustom domain for the short link (defaults to dub.sh)
keystringNoCustom slug for the short link (randomly generated if not provided)
externalIdstringNoExternal ID for the link in your database
tagIdsstringNoComma-separated tag IDs to assign to the link
commentsstringNoComments for the short link
expiresAtstringNoExpiration date in ISO 8601 format
passwordstringNoPassword to protect the short link
rewritebooleanNoWhether to enable link cloaking
archivedbooleanNoWhether to archive the link
titlestringNoCustom OG title for the link preview
descriptionstringNoCustom OG description for the link preview
utm_sourcestringNoUTM source parameter
utm_mediumstringNoUTM medium parameter
utm_campaignstringNoUTM campaign parameter
utm_termstringNoUTM term parameter
utm_contentstringNoUTM content parameter

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
linkIdstringNoThe unique ID of the short link
externalIdstringNoThe external ID of the link in your database
domainstringNoThe domain of the link (use with key)
keystringNoThe slug of the link (use with domain)

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
linkIdstringYesThe link ID or external ID prefixed with ext_
urlstringNoNew destination URL
domainstringNoNew custom domain
keystringNoNew custom slug
titlestringNoCustom OG title
descriptionstringNoCustom OG description
externalIdstringNoExternal ID for the link
tagIdsstringNoComma-separated tag IDs
commentsstringNoComments for the short link
expiresAtstringNoExpiration date in ISO 8601 format
passwordstringNoPassword to protect the link
rewritebooleanNoWhether to enable link cloaking
archivedbooleanNoWhether to archive the link
utm_sourcestringNoUTM source parameter
utm_mediumstringNoUTM medium parameter
utm_campaignstringNoUTM campaign parameter
utm_termstringNoUTM term parameter
utm_contentstringNoUTM content parameter

Output

ParameterTypeDescription
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_).

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
linkIdstringYesThe link ID or external ID prefixed with ext_

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
domainstringNoFilter by domain
searchstringNoSearch query matched against the short link slug and destination URL
tagIdsstringNoComma-separated tag IDs to filter by
showArchivedbooleanNoWhether to include archived links (defaults to false)
pagenumberNoPage number (default: 1)
pageSizenumberNoNumber of links per page (default: 100, max: 100)

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
domainstringNoFilter by domain
searchstringNoSearch query matched against the short link slug and destination URL
tagIdsstringNoComma-separated tag IDs to filter by
tagNamesstringNoComma-separated tag names to filter by (case-insensitive)
folderIdstringNoFilter by folder ID
showArchivedbooleanNoWhether to include archived links (defaults to false)
groupBystringNoGroup counts by: domain, tagId, userId, or folderId

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
linksjsonYesJSON array of link objects to create. Each object requires a "url" and may include domain, key, tagIds, and other link fields (max 100).

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
linkIdsstringNoComma-separated link IDs to update (max 100, takes precedence over externalIds)
externalIdsstringNoComma-separated external IDs to update (max 100)
datajsonYesJSON object of fields to apply to every selected link (e.g. { "archived": true, "tagIds": ["..."] })

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
linkIdsstringYesComma-separated link IDs to delete (max 100)

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
eventstringNoEvent type: clicks (default), leads, sales, or composite
groupBystringNoGroup results by: count (default), timeseries, countries, cities, devices, browsers, os, referers, top_links, top_urls
linkIdstringNoFilter by link ID
externalIdstringNoFilter by external ID (prefix with ext_)
domainstringNoFilter by domain
intervalstringNoTime interval: 24h (default), 7d, 30d, 90d, 1y, mtd, qtd, ytd, or all
startstringNoStart date/time in ISO 8601 format (overrides interval)
endstringNoEnd date/time in ISO 8601 format (defaults to now)
countrystringNoFilter by country (ISO 3166-1 alpha-2 code)
timezonestringNoIANA timezone for timeseries data (defaults to UTC)

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
eventstringNoEvent type: clicks (default), leads, or sales
linkIdstringNoFilter by link ID
externalIdstringNoFilter by external ID (prefix with ext_)
domainstringNoFilter by domain
intervalstringNoTime interval: 24h (default), 7d, 30d, 90d, 1y, mtd, qtd, ytd, or all
startstringNoStart date/time in ISO 8601 format (overrides interval)
endstringNoEnd date/time in ISO 8601 format (defaults to now)
countrystringNoFilter by country (ISO 3166-1 alpha-2 code)
timezonestringNoIANA timezone for event timestamps (defaults to UTC)
pagenumberNoPage number (default: 1)
limitnumberNoNumber of events per page (default: 100, max: 1000)
sortOrderstringNoSort order: desc (default) or asc

Output

ParameterTypeDescription
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.

Input

ParameterTypeRequiredDescription
apiKeystringYesDub API key
urlstringYesThe short link URL to encode in the QR code
sizenumberNoQR code size in pixels (default: 600)
levelstringNoError correction level: L (default), M, Q, or H
fgColorstringNoForeground color in hex (default: #000000)
bgColorstringNoBackground color in hex (default: #FFFFFF)
hideLogobooleanNoWhether to hide the logo in the center of the QR code (default: false)
marginnumberNoMargin (quiet zone) around the QR code (default: 2)

Output

ParameterTypeDescription
filefileGenerated QR code image stored in execution files
contentstringBase64-encoded PNG image data

On this page