// connections

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.

24 mcp tools41 operations
rest
https://api.superagnt.com/v1/connections/dub plus the vendor's own path, with your superagnt_ API key as Authorization: Bearer.
mcp
Tools named connection_dub_* on https://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

  1. Start the install. In the superagnt app open Integrations, pick Dub and click Connect with Dub.
  2. 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.read and user.read.
  3. 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_LIMITED with HTTP 429. That is Dub's limit on your account, so back off and retry.

03

Examples

list linksbash
curl "https://api.superagnt.com/v1/connections/dub/links" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY"
create a short linkbash
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

clicks in the last 7 daysbash
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.

04// mcp tools

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.

ToolRiskActions
connection_dub_links_read

Read 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_write

Create 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_delete

Delete Dub links

Delete a link, or up to 100 links at once. Deletions cannot be undone.

destructive
deletebulk_delete
connection_dub_tags_read

List Dub tags

List the workspace's link tags.

read
list
connection_dub_tags_write

Create and edit Dub tags

Create or update a link tag.

write
createupdate
connection_dub_folders_read

List Dub folders

List the workspace's link folders.

read
list
connection_dub_folders_write

Create and edit Dub folders

Create or update a link folder.

write
createupdate
connection_dub_folders_delete

Delete a Dub folder

Delete a folder; its links keep working.

destructive
delete
connection_dub_domains_write

Add and edit Dub domains

Add a custom domain for short links, or update one.

write
createupdate
connection_dub_domains_delete

Delete a Dub domain

Delete a custom domain together with all of its links. Cannot be undone.

destructive
delete
connection_dub_analytics_read

Read 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_read

Read Dub customers

List or look up customers (the people behind tracked leads and sales).

read
listget
connection_dub_customers_write

Update a Dub customer

Update a customer's name, email, avatar or external id.

write
update
connection_dub_customers_delete

Delete a Dub customer

Permanently delete a customer.

destructive
delete
connection_dub_conversions_write

Track 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_read

Read 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_write

Manage 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_delete

Ban a Dub partner

Ban a partner, which disables their links and cancels their commissions.

destructive
ban
connection_dub_bounties_read

Read Dub bounty submissions

List the submissions to a bounty of your partner program.

read
list_submissions
connection_dub_bounties_write

Reject 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_approve

Approve 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_read

Read Dub commissions

List the partner program's commissions.

read
list
connection_dub_commissions_write

Adjust 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_read

Read Dub payouts

List the partner program's payouts.

read
list
05// operations

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.

OperationMCP tool
GET/links

Retrieve a list of links

connection_dub_getlinksgrouped: connection_dub_links_read, action list
POST/links

Create a link

connection_dub_createlinkgrouped: connection_dub_links_write, action create
PUT/links

Upsert a link

connection_dub_upsertlinkgrouped: connection_dub_links_write, action upsert
GET/links/info

Retrieve a link

connection_dub_getlinkinfogrouped: connection_dub_links_read, action get
GET/links/count

Retrieve 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/bulk

Bulk create links

connection_dub_bulkcreatelinksgrouped: connection_dub_links_write, action bulk_create
PATCH/links/bulk

Bulk update links

connection_dub_bulkupdatelinksgrouped: connection_dub_links_write, action bulk_update
DELETE/links/bulk

Bulk delete links

connection_dub_bulkdeletelinksgrouped: connection_dub_links_delete, action bulk_delete
GET/analytics

Retrieve analytics

connection_dub_retrieveanalyticsgrouped: connection_dub_analytics_read, action analytics
GET/events

Retrieve a list of events

connection_dub_listeventsgrouped: connection_dub_analytics_read, action events
GET/tags

Retrieve a list of tags

connection_dub_gettagsgrouped: connection_dub_tags_read, action list
POST/tags

Create 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/folders

Retrieve a list of folders

connection_dub_listfoldersgrouped: connection_dub_folders_read, action list
POST/folders

Create 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/customers

Retrieve 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/domains

Create 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/lead

Track a lead

connection_dub_trackleadgrouped: connection_dub_conversions_write, action track_lead
POST/track/sale

Track a sale

connection_dub_tracksalegrouped: connection_dub_conversions_write, action track_sale
GET/partners

List partners

connection_dub_listpartnersgrouped: connection_dub_partners_read, action list
POST/partners

Create or update a partner

connection_dub_createpartnergrouped: connection_dub_partners_write, action upsert
GET/partners/links

Retrieve a partner's links

connection_dub_retrievepartnerlinksgrouped: connection_dub_partners_read, action links
POST/partners/links

Create a partner link

connection_dub_createpartnerlinkgrouped: connection_dub_partners_write, action create_link
PUT/partners/links/upsert

Upsert a partner link

connection_dub_upsertpartnerlinkgrouped: connection_dub_partners_write, action upsert_link
POST/partners/ban

Ban a partner

connection_dub_banpartnergrouped: connection_dub_partners_delete, action ban
POST/partners/deactivate

Deactivate a partner

connection_dub_deactivatepartnergrouped: connection_dub_partners_write, action deactivate
GET/bounties/{bountyId}/submissions

List bounty submissions

connection_dub_listbountysubmissionsgrouped: connection_dub_bounties_read, action list_submissions
POST/bounties/{bountyId}/submissions/{submissionId}/approve

Approve a bounty submission

connection_dub_approvebountysubmissiongrouped: connection_dub_bounties_approve, action approve_submission
POST/bounties/{bountyId}/submissions/{submissionId}/reject

Reject a bounty submission

connection_dub_rejectbountysubmissiongrouped: connection_dub_bounties_write, action reject_submission
GET/commissions

List 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/payouts

List payouts

connection_dub_listpayoutsgrouped: connection_dub_payouts_read, action list