Dub
Manage Dub short links, read click, lead and sale analytics, track conversions, and run a partner program's partners, bounties, commissions and payouts. Connect with OAuth or a Dub API key.
- rest
https://api.superagnt.com/v1/connections/dubplus the vendor's own path, with your superagnt_ API key asAuthorization: Bearer.- mcp
- Tools named
connection_dub_*onhttps://mcp.superagnt.com/mcp, served once the account is connected. - billing
- Dub bills your own account. Calls cost no superagnt_ data credits.
- rate limit
- 60 requests a second, 600 a minute: the vendor's ceiling as the registry records it, for sizing bursts. Your plan's own limit is on Connections.
The Dub connection lets an agent work your Dub workspace: create, update and delete short links one at a time or in bulk, organize them with tags, folders and custom domains, read click, lead and sale analytics and the events behind them, track lead and sale conversions, read and update customers, and run a partner program (partners and their links, bounty submissions, commissions and payouts). Connect it with OAuth or a pasted Dub API key. Either way the tools and REST routes are the same, and superagnt_ attaches the Dub credential to each call.
01
Setup
Connect with Dub
- Start the install. In the superagnt app open Integrations, pick Dub and click Connect with Dub.
- Approve the scopes. superagnt_ asks for
workspaces.read,links.read,links.write,tags.read,tags.write,domains.read,domains.write,folders.read,folders.write,analytics.readanduser.read. - Call Dub. Dub access tokens are short-lived, and superagnt_ refreshes them for you with the stored refresh token.
Customers, conversion tracking and the partner program are not among those scopes, so a call there can fail with a 403 on an OAuth connection. A Dub API key with that access covers them.
Paste an API key
If Connect with Dub is not offered, the dialog asks for a Dub API key straight away. When it is offered and you would rather use a key, click Use API key instead and paste one. Create the key in your Dub workspace settings.
Prefer OAuth when it is offered: there is no long-lived key to rotate. When a workspace has both an OAuth install and a pasted key, calls use the OAuth install, so disconnect it on the Dub connection in the superagnt app to fall back to the key. Both are stored encrypted.
02
Plans and limits
- Analytics needs a Dub Pro plan or higher, and listing the individual events a Business plan or higher.
- Tracking a lead or a sale needs a Business plan or higher.
- Listing partners and a partner's links needs an Advanced plan or higher.
- When Dub rate limits a call, it comes back as
RATE_LIMITEDwith HTTP 429. That is Dub's limit on your account, so back off and retry.
03
Examples
List links
curl "https://api.superagnt.com/v1/connections/dub/links" \
-H "Authorization: Bearer $AGNTDATA_API_KEY"Create a short link
curl -X POST "https://api.superagnt.com/v1/connections/dub/links" \
-H "Authorization: Bearer $AGNTDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://superagnt.com", "key": "welcome" }'Leave key out and Dub generates a random 7-character slug. domain defaults to the workspace's primary domain.
Clicks over the last 7 days
curl "https://api.superagnt.com/v1/connections/dub/analytics?event=clicks&interval=7d" \
-H "Authorization: Bearer $AGNTDATA_API_KEY"Add groupBy (for example timeseries, countries or top_links) to break the count down.
24 tools, one per resource and risk
MCP servers and agents on the grouped surface list Dub as these tools. Each takes an action, and the ones that work across record types an object. Every operation also keeps its own per-operation name, in the next table, which works on every server. How grouping works: Grouped tools.
| Tool | Risk | Actions |
|---|---|---|
connection_dub_links_readRead Dub links List, look up and count the workspace's short links. Click, lead and sale stats for a link are in connection_dub_analytics_read. | read | listgetcount |
connection_dub_links_writeCreate and edit Dub links Create, upsert or update short links, one at a time or in bulk (bulk_update changes up to 100 links with the same data). | write | createupsertupdatebulk_createbulk_update |
connection_dub_links_deleteDelete Dub links Delete a link, or up to 100 links at once. Deletions cannot be undone. | destructive | deletebulk_delete |
connection_dub_tags_readList Dub tags List the workspace's link tags. | read | list |
connection_dub_tags_writeCreate and edit Dub tags Create or update a link tag. | write | createupdate |
connection_dub_folders_readList Dub folders List the workspace's link folders. | read | list |
connection_dub_folders_writeCreate and edit Dub folders Create or update a link folder. | write | createupdate |
connection_dub_folders_deleteDelete a Dub folder Delete a folder; its links keep working. | destructive | delete |
connection_dub_domains_writeAdd and edit Dub domains Add a custom domain for short links, or update one. | write | createupdate |
connection_dub_domains_deleteDelete a Dub domain Delete a custom domain together with all of its links. Cannot be undone. | destructive | delete |
connection_dub_analytics_readRead Dub analytics Read click, lead and sale analytics for a link, a domain or the whole workspace (a count, a timeseries, or grouped by country, device, referrer and more), and list the individual events behind them. Analytics needs a Pro plan, events a Business plan. | read | analyticsevents |
connection_dub_customers_readRead Dub customers List or look up customers (the people behind tracked leads and sales). | read | listget |
connection_dub_customers_writeUpdate a Dub customer Update a customer's name, email, avatar or external id. | write | update |
connection_dub_customers_deleteDelete a Dub customer Permanently delete a customer. | destructive | delete |
connection_dub_conversions_writeTrack Dub conversions Record a lead or a sale conversion for a short-link click (Business plan or higher). In a partner program, a tracked lead or sale can earn the referring partner a commission (connection_dub_commissions_read). | write | track_leadtrack_sale |
connection_dub_partners_readRead Dub partners List the partners in your partner program, or a partner's referral links. Partner listings need an Advanced plan. | read | listlinks |
connection_dub_partners_writeManage Dub partners Create a partner or update one matched by email, create or upsert a partner's referral links, or deactivate a partner (they can be reactivated). | write | upsertcreate_linkupsert_linkdeactivate |
connection_dub_partners_deleteBan a Dub partner Ban a partner, which disables their links and cancels their commissions. | destructive | ban |
connection_dub_bounties_readRead Dub bounty submissions List the submissions to a bounty of your partner program. | read | list_submissions |
connection_dub_bounties_writeReject Dub bounty submissions Reject a submission to a bounty, with a reason and an optional note. Approving one rewards the partner: connection_dub_bounties_approve. | write | reject_submission |
connection_dub_bounties_approveApprove Dub bounty submissions Moves money: approve a submission to a bounty, which rewards the partner (rewardAmount sets the reward of a performance bounty that has no fixed one). | paid | approve_submission |
connection_dub_commissions_readRead Dub commissions List the partner program's commissions. | read | list |
connection_dub_commissions_writeAdjust a Dub commission Moves money: change an unpaid commission's amount, earnings or status (for a refund, a fraudulent sale or a duplicate). Paid commissions cannot be changed. | paid | update |
connection_dub_payouts_readRead Dub payouts List the partner program's payouts. | read | list |
All 41 operations
Each operation is a REST path under https://api.superagnt.com/v1/connections/dub and an MCP tool. The per-operation tool name is the one permissions, approvals and usage records use.
| Operation | MCP tool |
|---|---|
GET /linksRetrieve a list of links | connection_dub_getlinksgrouped: connection_dub_links_read, action list |
POST /linksCreate a link | connection_dub_createlinkgrouped: connection_dub_links_write, action create |
PUT /linksUpsert a link | connection_dub_upsertlinkgrouped: connection_dub_links_write, action upsert |
GET /links/infoRetrieve a link | connection_dub_getlinkinfogrouped: connection_dub_links_read, action get |
GET /links/countRetrieve links count | connection_dub_getlinkscountgrouped: connection_dub_links_read, action count |
PATCH /links/{linkId}Update a link | connection_dub_updatelinkgrouped: connection_dub_links_write, action update |
DELETE /links/{linkId}Delete a link | connection_dub_deletelinkgrouped: connection_dub_links_delete, action delete |
POST /links/bulkBulk create links | connection_dub_bulkcreatelinksgrouped: connection_dub_links_write, action bulk_create |
PATCH /links/bulkBulk update links | connection_dub_bulkupdatelinksgrouped: connection_dub_links_write, action bulk_update |
DELETE /links/bulkBulk delete links | connection_dub_bulkdeletelinksgrouped: connection_dub_links_delete, action bulk_delete |
GET /analyticsRetrieve analytics | connection_dub_retrieveanalyticsgrouped: connection_dub_analytics_read, action analytics |
GET /eventsRetrieve a list of events | connection_dub_listeventsgrouped: connection_dub_analytics_read, action events |
GET /tagsRetrieve a list of tags | connection_dub_gettagsgrouped: connection_dub_tags_read, action list |
POST /tagsCreate a tag | connection_dub_createtaggrouped: connection_dub_tags_write, action create |
PATCH /tags/{id}Update a tag | connection_dub_updatetaggrouped: connection_dub_tags_write, action update |
GET /foldersRetrieve a list of folders | connection_dub_listfoldersgrouped: connection_dub_folders_read, action list |
POST /foldersCreate a folder | connection_dub_createfoldergrouped: connection_dub_folders_write, action create |
PATCH /folders/{id}Update a folder | connection_dub_updatefoldergrouped: connection_dub_folders_write, action update |
DELETE /folders/{id}Delete a folder | connection_dub_deletefoldergrouped: connection_dub_folders_delete, action delete |
GET /customersRetrieve a list of customers | connection_dub_listcustomersgrouped: connection_dub_customers_read, action list |
GET /customers/{id}Retrieve a customer | connection_dub_getcustomergrouped: connection_dub_customers_read, action get |
PATCH /customers/{id}Update a customer | connection_dub_updatecustomergrouped: connection_dub_customers_write, action update |
DELETE /customers/{id}Delete a customer | connection_dub_deletecustomergrouped: connection_dub_customers_delete, action delete |
POST /domainsCreate a domain | connection_dub_createdomaingrouped: connection_dub_domains_write, action create |
PATCH /domains/{slug}Update a domain | connection_dub_updatedomaingrouped: connection_dub_domains_write, action update |
DELETE /domains/{slug}Delete a domain | connection_dub_deletedomaingrouped: connection_dub_domains_delete, action delete |
POST /track/leadTrack a lead | connection_dub_trackleadgrouped: connection_dub_conversions_write, action track_lead |
POST /track/saleTrack a sale | connection_dub_tracksalegrouped: connection_dub_conversions_write, action track_sale |
GET /partnersList partners | connection_dub_listpartnersgrouped: connection_dub_partners_read, action list |
POST /partnersCreate or update a partner | connection_dub_createpartnergrouped: connection_dub_partners_write, action upsert |
GET /partners/linksRetrieve a partner's links | connection_dub_retrievepartnerlinksgrouped: connection_dub_partners_read, action links |
POST /partners/linksCreate a partner link | connection_dub_createpartnerlinkgrouped: connection_dub_partners_write, action create_link |
PUT /partners/links/upsertUpsert a partner link | connection_dub_upsertpartnerlinkgrouped: connection_dub_partners_write, action upsert_link |
POST /partners/banBan a partner | connection_dub_banpartnergrouped: connection_dub_partners_delete, action ban |
POST /partners/deactivateDeactivate a partner | connection_dub_deactivatepartnergrouped: connection_dub_partners_write, action deactivate |
GET /bounties/{bountyId}/submissionsList bounty submissions | connection_dub_listbountysubmissionsgrouped: connection_dub_bounties_read, action list_submissions |
POST /bounties/{bountyId}/submissions/{submissionId}/approveApprove a bounty submission | connection_dub_approvebountysubmissiongrouped: connection_dub_bounties_approve, action approve_submission |
POST /bounties/{bountyId}/submissions/{submissionId}/rejectReject a bounty submission | connection_dub_rejectbountysubmissiongrouped: connection_dub_bounties_write, action reject_submission |
GET /commissionsList commissions | connection_dub_listcommissionsgrouped: connection_dub_commissions_read, action list |
PATCH /commissions/{id}Update a commission | connection_dub_updatecommissiongrouped: connection_dub_commissions_write, action update |
GET /payoutsList payouts | connection_dub_listpayoutsgrouped: connection_dub_payouts_read, action list |