otherapi_key

Dub

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

Verdict

Dub is a link management platform that shortens URLs and tracks their performance. In Switchy, @mentioning Dub lets your team create branded short links, organize them with tags, manage custom domains, and pull analytics — all without leaving the conversation. Marketing and growth teams get the most value: they can generate campaign links on the fly, audit existing URLs in bulk, and check click metrics during planning sessions. The MCP requires an API key with workspace access, and some operations (like domain verification) still need the Dub dashboard.

Common use cases

  • Generate campaign links during planning meetings
  • Audit and clean up expired short URLs
  • Tag links by channel for attribution tracking
  • Pull click metrics for weekly performance reviews
  • Bulk update UTM parameters across link sets

Integration

Vendor
Dub
Category
other
Auth
API_KEY
Tools
17
Composio slug
dub

Tools

  • Bulk Delete Links
    destructive

    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.

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

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

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

  • Delete Domain
    destructive

    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.

  • Delete Tag
    destructive

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

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

  • 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 l

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

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

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

  • Retrieve List of 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.

  • Track Deep Link Open Event

    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.

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

  • Update Tag

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

  • Update Workspace

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

  • Upsert a 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.

Setup

Setup guide

  1. 11. Go to your Dub workspace settings and navigate to the API section to generate a new API key with read and write permissions. 2. In Switchy, open your workspace settings and click 'Add Integration' under the MCP section. 3. Select Dub from the list and paste your API key when prompted. 4. Click 'Connect' and wait for Switchy to verify the key against Dub's API. 5. Once connected, open any Space and type '@Dub create a short link for https://example.com' to test the integration. 6. If the MCP returns a shortened URL, the connection is working. 7. You can now invoke any of Dub's 17 tools by @mentioning Dub and describing what you need — creating links, fetching analytics, managing tags, or bulk-updating URLs.

What teammates see: by default, memories from Dub are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Spaces have used this MCP together with a given model.

How Switchy teams use it

Not enough Spaces yet to publish anonymised usage stats (we require ≥ 50 Spaces per week).

Starter prompts

Organize by Tag

@Dub create a tag called 'Q2-Launch' and then find all links containing 'product-page' in the URL and tag them with it
Open in a Space →

Bulk Update Expiry

@Dub find all links tagged 'flash-sale' and update them to expire on March 31, 2025 at 11:59 PM UTC
Open in a Space →

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@Dub show me all short links tagged 'campaign-q1' that have more than 1000 clicks

Output

Found 7 links tagged 'campaign-q1' with >1000 clicks: 1. dub.sh/spring-sale → yoursite.com/promo (2,847 clicks) 2. dub.sh/webinar-reg → events.yoursite.com (1,523 clicks) 3. dub.sh/newsletter-mar → newsletter.yoursite.com/march (1,204 clicks) 4. dub.sh/partner-offer → partners.yoursite.com/q1 (1,156 clicks) 5. dub.sh/launch-announce → blog.yoursite.com/launch (3,012 clicks) 6. dub.sh/early-bird → checkout.yoursite.com/early (1,891 clicks) 7. dub.sh/social-promo → yoursite.com/social-q1 (1,445 clicks) Total clicks across these links: 13,078. The spring-sale and launch-announce links are your top performers this quarter.

Notes

This example demonstrates Dub's filtering and analytics retrieval. The Get Links tool supports filtering by tags and can return click metrics. Note that click counts are workspace-specific and require appropriate API key permissions. Results are paginated (default 100 per page), so high-volume workspaces may need multiple queries.

Prompt

@Dub create 5 short links for our new product pages using the domain go.acme.com, and tag them all 'product-launch-2024'

Output

Created 5 short links on go.acme.com, all tagged 'product-launch-2024': 1. go.acme.com/feature-a → acme.com/products/feature-a 2. go.acme.com/feature-b → acme.com/products/feature-b 3. go.acme.com/pricing → acme.com/products/pricing 4. go.acme.com/demo → acme.com/products/demo-request 5. go.acme.com/docs → docs.acme.com/getting-started All links are active and ready to share. Each link is configured with click tracking enabled and will appear in your workspace analytics under the 'product-launch-2024' tag for easy performance monitoring.

Notes

This showcases Dub's bulk link creation capability. The domain (go.acme.com) must already exist and be verified in your workspace before creating links. The Create Tag tool runs first if the tag doesn't exist. This is a write operation that immediately affects your workspace—links are live as soon as they're created.

Prompt

@Dub analyze our top 20 links from last month and draft a summary of which campaigns drove the most traffic

Output

Analyzed your top 20 links from the past 30 days (47,392 total clicks): **Top Performers by Campaign:** - 'email-newsletter' tag: 6 links, 18,234 clicks (38% of traffic) Best: dub.sh/weekly-digest with 6,891 clicks - 'social-media' tag: 8 links, 15,678 clicks (33%) Best: dub.sh/twitter-thread with 4,223 clicks - 'partner-referral' tag: 4 links, 9,156 clicks (19%) Best: dub.sh/partner-acme with 3,445 clicks - Untagged: 2 links, 4,324 clicks (9%) **Key Insight:** Email newsletters are your most consistent traffic driver, with 3x higher average clicks per link (3,039) compared to social media (1,960). Consider expanding email cadence or testing more newsletter CTAs.

Notes

This example pairs Dub's link retrieval with AI reasoning to surface campaign insights. The MCP fetches link data with click metrics and tags, then the AI synthesizes patterns. Accuracy depends on consistent tagging practices in your workspace. Click data reflects the time range you specify—Dub's analytics are real-time but historical queries may hit rate limits on large workspaces.

Use-case deep-dives

Marketing campaign link cleanup

When Dub MCP makes post-campaign teardown painless

A 6-person growth team runs 8-12 campaigns per quarter, each generating 30-50 short links across email, social, and paid channels. After a campaign closes, they need to archive dead links and update evergreen ones without clicking through Dub's UI. The bulk delete and bulk update tools handle this in one Switchy prompt: 'archive all links tagged Q1-launch and update the pricing-page links to the new domain'. The 17-tool scope is overkill if you only create links, but if you're managing link hygiene at this cadence—pruning old UTM variants, reassigning domains, retagging for the next quarter—the MCP pays off. Below 20 links per campaign, the UI is faster. Above 50, especially with custom domains per vertical, the MCP becomes the only sane way to keep your workspace clean.

Multi-brand domain provisioning

Why agencies use this MCP for client onboarding

A 3-person agency manages short-link infrastructure for 15 clients, each with their own branded domain. Every new client means creating a domain in Dub, verifying DNS, creating a tag set, and seeding initial links. The create domain and create tag tools let them script this in Switchy: 'onboard client Acme with domain go.acme.co and tags product, support, sales'. The MCP handles the API dance; the agent confirms DNS before moving to link creation. This scenario breaks down if your clients share one domain or if you onboard fewer than 2 clients per month—the manual flow is fine at that scale. But when you're spinning up domains weekly and need to audit which client owns which short links, the MCP turns a 20-minute checklist into a 2-minute prompt.

Support ticket link forensics

When you need to trace a short link back to its campaign

A 4-person support team fields tickets about broken or misleading short links—customers click a link from an old email and land on a 404 or the wrong product page. The get link info tool pulls the full config: original destination, UTM params, creation date, tags, who created it. In Switchy, the agent prompts 'look up dub.co/promo23 and tell me which campaign it belonged to and when it was last updated'. The MCP returns targeting rules, click counts, and metadata the UI buries three clicks deep. This is overkill if your link volume is under 100 or if you never reuse short codes across campaigns. But if you're troubleshooting user-reported links daily and need to cross-reference tags or domains without leaving your support thread, the MCP saves the context-switch tax.

Frequently asked

What does the Dub MCP let me do in Switchy?

The Dub MCP lets AI agents create, update, and delete branded short links across your workspace. Agents can bulk-manage up to 100 links at once, organize them with tags, add custom domains, and pull link performance metrics. It's useful when your team needs to generate campaign URLs, track click data, or manage link libraries without switching to Dub's dashboard.

Do I need a Dub API key to connect this MCP?

Yes. You need a Dub API key with workspace-level permissions. Generate one from your Dub workspace settings, then paste it into Switchy's connection flow. The key determines which workspace the MCP can access, so make sure it's scoped to the right account. If your key expires or gets revoked, the MCP stops working until you update it.

Can the Dub MCP edit links after they're created?

Yes. The MCP includes Bulk Update Links, which lets agents change destinations, tags, expiration dates, or targeting rules for existing short links. You can update up to 100 links in one operation by specifying link IDs or external IDs. It won't let you change the short link slug itself — you'd need to delete and recreate for that.

How is this different from using Dub's API directly?

The MCP wraps Dub's API so AI agents can call it through natural language instead of you writing code. You describe what you want — "archive all expired campaign links" — and the agent figures out which tools to chain. If you're already automating Dub via scripts, the MCP won't add much. If you're not, it removes the engineering step.

Who on my team should connect the Dub MCP?

Whoever owns your Dub workspace and can generate API keys. That's usually a marketing ops lead or growth engineer. Once connected, any Switchy user with access to the shared workspace can ask agents to manage links. The API key's permissions apply to everyone, so don't connect it if you don't trust your team with bulk delete access.

Data last verified 607 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.