# Dub

Short link management platform with analytics and API for creating, managing, and tracking branded short links

- **Category:** url shortener
- **Auth:** API_KEY, OAUTH2
- **Composio Managed App Available?** Yes
- **Tools:** 17
- **Triggers:** 0
- **Slug:** `DUB`
- **Version:** 20260211_00

## Tools

### Bulk Delete Links

**Slug:** `DUB_BULK_DELETE_LINKS`

Tool to delete multiple short links in bulk from Dub. Use when you need to remove multiple links at once. Maximum of 100 link IDs per request. Non-existing IDs are silently ignored.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `link_ids` | array | Yes | List of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored. Each ID should be in the format 'link_XXXXX' or similar. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Bulk Update Links

**Slug:** `DUB_BULK_UPDATE_LINKS`

Tool to update multiple short links in bulk. Use when you need to apply the same updates to multiple links at once by specifying link IDs or external IDs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | The fields to update for all specified links. |
| `linkIds` | array | No | The IDs of the links to update. Takes precedence over `externalIds`. Maximum 100 items. |
| `externalIds` | array | No | The external IDs of the links to update as stored in your database. Maximum 100 items. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Domain

**Slug:** `DUB_CREATE_DOMAIN`

Tool to add a domain to a Dub workspace. Use when you need to create a new domain for shortening links. The domain must be verified before it can be used for link shortening.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `logo` | string | No | The logo of the domain |
| `slug` | string | Yes | Name of the domain (e.g., yourbrand.com) |
| `archived` | boolean | No | Whether to archive this domain. False will unarchive a previously archived domain |
| `assetLinks` | string | No | assetLinks.json configuration file (for deep link support on Android) |
| `expiredUrl` | string | No | Redirect users to a specific URL when any link under this domain has expired |
| `notFoundUrl` | string | No | Redirect users to a specific URL when a link under this domain doesn't exist |
| `placeholder` | string | No | Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened |
| `appleAppSiteAssociation` | string | No | apple-app-site-association configuration file (for deep link support on iOS) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Tag

**Slug:** `DUB_CREATE_TAG`

Tool to create a new tag in Dub. Use when you need to organize links by creating custom tags. Tags help categorize and filter links for better organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the tag to create. Must be between 1 and 50 characters. |
| `color` | string ("red" | "yellow" | "green" | "blue" | "purple" | "brown" | "pink") | No | The color of the tag. If not provided, a random color will be assigned from the available options: red, yellow, green, blue, purple, brown, pink. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Domain

**Slug:** `DUB_DELETE_DOMAIN`

Tool to delete a domain from your Dub workspace. Use when you need to permanently remove a domain. The domain must exist and be owned by your workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | Yes | The domain name to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Tag

**Slug:** `DUB_DELETE_TAG`

Tool to delete a tag from Dub. Use when you need to remove a tag that is no longer needed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the tag to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Link Info

**Slug:** `DUB_GET_LINK_INFO`

Tool to retrieve details of a specific short link from Dub. Use when you need to get comprehensive information about a link including its configuration, targeting settings, and performance metrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `key` | string | No | The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`. Must be used together with domain parameter. |
| `domain` | string | No | The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`. Must be used together with key parameter. |
| `link_id` | string | No | The unique ID of the short link. |
| `external_id` | string | No | This is the ID of the link in your database. Must be prefixed with 'ext_' when querying. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Links

**Slug:** `DUB_GET_LINKS`

Tool to retrieve a paginated list of links for the authenticated workspace. Use when you need to list links with optional filtering by domain, tags, folder, search terms, or user. Supports pagination and sorting for efficient retrieval of large link collections.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | The page number for pagination. |
| `sort` | string ("createdAt" | "clicks" | "saleAmount" | "lastClicked") | No | DEPRECATED. Use `sort_by` instead. |
| `tagId` | string | No | Deprecated: Use `tag_ids` instead. The tag ID to filter the links by. |
| `domain` | string | No | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. |
| `search` | string | No | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. |
| `sortBy` | string ("createdAt" | "clicks" | "saleAmount" | "lastClicked") | No | The field to sort the links by. The default is `createdAt`. |
| `tagIds` | string | No | The tag IDs to filter the links by. |
| `userId` | string | No | The user ID to filter the links by. |
| `folderId` | string | No | The folder ID to filter the links by. |
| `pageSize` | integer | No | The number of items per page. |
| `tagNames` | string | No | The unique name of the tags assigned to the short link (case insensitive). |
| `tenantId` | string | No | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. |
| `withTags` | boolean | No | DEPRECATED. Filter for links that have at least one tag assigned to them. |
| `sortOrder` | string ("asc" | "desc") | No | The sort order. The default is `desc`. |
| `showArchived` | boolean | No | Whether to include archived links in the response. Defaults to `false` if not provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Links Count

**Slug:** `DUB_GET_LINKS_COUNT`

Tool to retrieve the count of links in workspace with optional filters. Use when you need to get the total number of links matching specific criteria such as domain, tags, folder, or search terms.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tagId` | string | No | Deprecated: Use `tag_ids` instead. The tag ID to filter the links by. |
| `domain` | string | No | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. |
| `search` | string | No | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. |
| `tagIds` | string | No | The tag IDs to filter the links by. |
| `userId` | string | No | The user ID to filter the links by. |
| `groupBy` | string | No | The field to group the links by. |
| `folderId` | string | No | The folder ID to filter the links by. |
| `tagNames` | string | No | The unique name of the tags assigned to the short link (case insensitive). |
| `tenantId` | string | No | The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant. |
| `withTags` | boolean | No | DEPRECATED. Filter for links that have at least one tag assigned to them. |
| `showArchived` | boolean | No | Whether to include archived links in the response. Defaults to `false` if not provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve List of Tags

**Slug:** `DUB_GET_TAGS`

Tool to retrieve a list of tags from Dub. Use when you need to fetch all tags or search for specific tags by name or IDs. Supports pagination and sorting by name or creation date.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ids` | string | No | IDs of tags to filter by. |
| `page` | integer | No | The page number for pagination. |
| `search` | string | No | The search term to filter the tags by. |
| `sort_by` | string ("name" | "createdAt") | No | The field to sort the tags by. |
| `page_size` | integer | No | The number of items per page. |
| `sort_order` | string ("asc" | "desc") | No | The order to sort the tags by. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Workspace

**Slug:** `DUB_GET_WORKSPACE`

Tool to retrieve detailed information for a specific workspace. Use when you need to get workspace details including plan, usage limits, domains, users, and configuration settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id_or_slug` | string | Yes | The ID or slug of the workspace. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Domains

**Slug:** `DUB_LIST_DOMAINS`

Tool to retrieve a list of domains for the authenticated workspace. Use when you need to view all domains, search for specific domains, or filter domains by archived status. Supports pagination for large result sets.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | The page number for pagination. |
| `search` | string | No | The search term to filter the domains by. |
| `archived` | boolean | No | Whether to include archived domains in the response. Defaults to false if not provided. |
| `page_size` | integer | No | The number of items per page. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Track Deep Link Open Event

**Slug:** `DUB_TRACK_OPEN`

Tool to track a deep link open event in Dub. Use when you need to record when a user opens your app via a deep link. Supports both direct tracking via deepLink parameter or probabilistic tracking via dubDomain parameter.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `deep_link` | string | No | The deep link that brought the user to the app. If left blank, Dub will fallback to probabilistic tracking by using the dubDomain parameter to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl |
| `dub_domain` | string | No | Your deep link custom domain on Dub (e.g. 'acme.link'). This is used in probabilistic tracking to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Domain

**Slug:** `DUB_UPDATE_DOMAIN`

Tool to update a domain configuration in Dub. Use when you need to modify domain settings like redirect URLs, placeholder text, archive status, or deep linking configurations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `logo` | string | No | The logo of the domain (URL or data URI) |
| `slug` | string | Yes | The domain name to update (e.g., 'acme.com'). This is the identifier of the domain you want to modify. |
| `archived` | boolean | No | Whether to archive this domain. Set to false to unarchive a previously archived domain |
| `new_slug` | string | No | New name of the domain if you want to rename it |
| `asset_links` | string | No | assetLinks.json configuration file (for deep link support on Android) |
| `expired_url` | string | No | Redirect users to a specific URL when any link under this domain has expired |
| `placeholder` | string | No | Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened |
| `not_found_url` | string | No | Redirect users to a specific URL when a link under this domain doesn't exist |
| `apple_app_site_association` | string | No | apple-app-site-association configuration file (for deep link support on iOS) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Tag

**Slug:** `DUB_UPDATE_TAG`

Tool to update an existing tag by ID. Use when you need to change the name or color of a tag.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The ID of the tag to update. |
| `name` | string | No | The name of the tag to update. |
| `color` | string ("red" | "yellow" | "green" | "blue" | "purple" | "brown" | "pink") | No | The color of the tag. Must be one of: red, yellow, green, blue, purple, brown, pink. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Workspace

**Slug:** `DUB_UPDATE_WORKSPACE`

Tool to update workspace settings in Dub. Use when you need to modify workspace name, slug, logo, or conversion tracking settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `logo` | string | No | URL of the workspace logo image. |
| `name` | string | No | The name of the workspace. Must be between 1 and 32 characters. |
| `slug` | string | No | The slug of the workspace. Must be between 3 and 48 characters. |
| `id_or_slug` | string | Yes | The ID or slug of the workspace to update. |
| `conversion_enabled` | boolean | No | Whether the workspace has conversion tracking enabled automatically for new links (d.to/conversions). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Upsert a Link

**Slug:** `DUB_UPSERT_LINK`

Tool to create or update a short link in Dub. Use when you need to create a new short link or update an existing one. If the link already exists (matching domain and key), it will be updated; otherwise, a new link will be created.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `geo` | object | No | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information |
| `ios` | string | No | The iOS destination URL for the short link for iOS device targeting |
| `key` | string | No | The short link slug. If not provided, a random 7-character slug will be generated |
| `ref` | string | No | The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL |
| `url` | string | Yes | The destination URL of the short link |
| `image` | string | No | The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og |
| `proxy` | boolean | No | Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided |
| `tagId` | string | No | Deprecated: Use `tagIds` instead. The unique ID of the tag assigned to the short link |
| `title` | string | No | The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og |
| `video` | string | No | The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og |
| `domain` | string | No | The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains) |
| `prefix` | string | No | The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided |
| `tagIds` | string | No | The unique IDs of the tags assigned to the short link. Can be a single tag ID string or an array of tag IDs |
| `android` | string | No | The Android destination URL for the short link for Android device targeting |
| `doIndex` | boolean | No | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex |
| `rewrite` | boolean | No | Whether the short link uses link cloaking. Defaults to `false` if not provided |
| `archived` | boolean | No | Whether the short link is archived. Defaults to `false` if not provided |
| `comments` | string | No | The comments for the short link |
| `folderId` | string | No | The unique ID existing folder to assign the short link to |
| `password` | string | No | The password required to access the destination URL of the short link |
| `tagNames` | string | No | The unique name of the tags assigned to the short link (case insensitive). Can be a single tag name string or an array of tag names |
| `tenantId` | string | No | 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 |
| `utm_term` | string | No | The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL |
| `expiresAt` | string | No | The date and time when the short link will expire at in ISO-8601 format |
| `keyLength` | integer | No | The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength` |
| `partnerId` | string | No | The ID of the partner the short link is associated with |
| `programId` | string | No | The ID of the program the short link is associated with |
| `expiredUrl` | string | No | The URL to redirect to when the short link has expired |
| `externalId` | string | No | 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 |
| `utm_medium` | string | No | The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL |
| `utm_source` | string | No | The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL |
| `webhookIds` | array | No | An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data |
| `description` | string | No | The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og |
| `publicStats` | boolean | No | Deprecated: Use `dashboard` instead. Whether the short link's stats are publicly accessible. Defaults to `false` if not provided |
| `utm_content` | string | No | The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL |
| `testVariants` | array | No | An array of A/B test URLs and the percentage of traffic to send to each URL. Must have 2-4 variants |
| `utm_campaign` | string | No | The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL |
| `testStartedAt` | string | No | The date and time when the tests started in ISO-8601 format |
| `testCompletedAt` | string | No | The date and time when the tests were or will be completed in ISO-8601 format |
| `trackConversion` | boolean | No | Whether to track conversions for the short link. Defaults to `false` if not provided |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
