---
title: Dub API Integration on Truto
slug: dub
category: Marketing Automation
canonical: "https://truto.one/integrations/detail/dub/"
---

# Dub API Integration on Truto



**Category:** Marketing Automation  
**Status:** Generally available

## MCP-ready AI tools

Truto exposes 47 tools for Dub that AI agents can call directly.

- **list_all_dub_analytics** — Retrieve analytics for a dub link, domain, or workspace. Returns data shaped by the `event` and `groupBy` parameters — including counts, timeseries, countries, cities, devices, browsers, and more. No parameters are required; optionally filter by domain, linkId, interval, country, device, and other dimensions.
- **update_a_dub_bounty_submission_by_id** — Approve a bounty submission in dub, marking it as accepted. Required: bounty_id, id.
- **list_all_dub_bounty_submissions** — List all submissions for a dub bounty. Required: bounty_id.
- **delete_a_dub_bounty_submission_by_id** — Reject a bounty submission in dub, marking it as declined. Required: bounty_id, id.
- **dub_commissions_bulk_create** — Create multiple commissions in dub in a single POST request to the partner program commissions endpoint.
- **list_all_dub_commissions** — List all commissions in dub for your partner program. Returns id, amount, earnings, status, partner, and customer per commission. Supports filtering by type, status, partnerId, customerId, payoutId, and date range.
- **update_a_dub_commission_by_id** — Update an existing commission in dub by id, useful for handling partial or full refunds and fraudulent sales. Returns the updated commission including id, amount, earnings, currency, and status. Required: id. Paid commissions cannot be updated.
- **delete_a_dub_customer_by_id** — Delete a Dub customer from a workspace by id. Returns the deleted customer's id on success. Required: id.
- **list_all_dub_customers** — List all Dub customers in a workspace. Returns: id, name, email, externalId, createdAt, saleAmount. Optionally filter by email, externalId, search, country, linkId, programId, or partnerId.
- **get_single_dub_customer_by_id** — Retrieve a single Dub customer by id. Returns the full customer object including id, name, email, externalId, createdAt, and saleAmount. Required: id. Prefix id with ext_ to look up by externalId.
- **update_a_dub_customer_by_id** — Update a Dub customer's profile fields by id. Returns the updated customer object including id, name, email, externalId, and createdAt. Required: id.
- **create_a_dub_domain** — Create a domain for the authenticated dub workspace. Returns the created domain object including slug and configuration. Required: slug.
- **delete_a_dub_domain_by_id** — Delete a dub domain by id. This action is irreversible and also permanently deletes all links associated with the domain. Returns: slug. Required: id.
- **update_a_dub_domain_by_id** — Update a domain in the authenticated dub workspace by id. Returns the updated domain object. Required: id.
- **dub_domains_register** — Register a new domain in dub via the domain registration endpoint.
- **dub_domains_status** — Retrieve domain status information in dub.
- **list_all_dub_events** — List dub events (clicks, leads, or sales) for the authenticated workspace. Returns an array of event objects including event type, timestamp, click details (id, url, country, device, browser), and associated link metadata. No required parameters; supports filtering by event type, domain, link ID, date range, geography, device, and UTM parameters.
- **create_a_dub_folder** — Create a folder in dub for the authenticated workspace. Returns the created folder object. Required: name.
- **delete_a_dub_folder_by_id** — Delete a dub folder by id. Returns the id of the deleted folder. Existing links remain functional but are no longer associated with the folder. Required: id.
- **list_all_dub_folders** — List all dub folders for the authenticated workspace. Returns an array of folder objects. Optionally filter results by a search term.
- **update_a_dub_folder_by_id** — Update a dub folder by id. Returns the updated folder object including its name, description, and accessLevel. Required: id.
- **dub_links_bulk_create** — Bulk create up to 100 links in dub for the authenticated workspace. Returns an array of created link objects. Webhook events are not triggered for bulk link creation.
- **dub_links_bulk_delete** — Bulk delete up to 100 links in dub for the authenticated workspace. This action is permanent and cannot be undone; webhook events are not triggered. Required: linkIds.
- **dub_links_bulk_update** — Bulk update up to 100 dub links with the same data for the authenticated workspace. Useful for batch-tagging, setting expiration dates, or updating UTM parameters. Domain and key cannot be changed via this endpoint; webhook events are not triggered. Required: linkIds.
- **get_single_dub_link_by_id** — Get a specific dub link by its domain and key. Returns the full link object for the authenticated workspace. Required: domain, key.
- **create_a_dub_link** — Create a new link in dub for the authenticated workspace. Returns the created link object including id and shortLink. Required: url.
- **delete_a_dub_link_by_id** — Delete a dub link by id for the authenticated workspace. Returns an empty response on success. Required: id.
- **list_all_dub_links** — List all links for the authenticated dub workspace. Returns a paginated list of link objects.
- **update_a_dub_link_by_id** — Update a dub link by id for the authenticated workspace. Returns the updated link object, or the existing object unchanged if no modifications were made. Required: id.
- **dub_links_count** — Retrieve the total number of links for the authenticated dub workspace. Returns a count as a number.
- **dub_links_upsert** — Upsert a link in dub for the authenticated workspace — creates the link if it does not exist, or updates it if it already does. Returns the link object including id and shortLink. Required: url.
- **list_all_dub_partner_applications** — List partner applications in dub. Returns a collection of partner application records.
- **dub_partner_applications_approve** — Approve a partner application in dub. Submits an approval decision for a pending partner application.
- **dub_partner_applications_reject** — Reject a partner application in dub. Submits a rejection decision for a pending partner application.
- **create_a_dub_partner** — Create or update (upsert) a partner in dub. If a partner with the same email already exists their program enrollment is updated; otherwise a new partner is created. Returns id, status, links, and tenantId. Required: email.
- **list_all_dub_partners** — List partners in dub.
- **dub_partners_ban** — Ban a partner in dub via the ban endpoint.
- **dub_partners_deactivate** — Deactivate a partner in dub via the deactivate endpoint.
- **create_a_dub_partner_link** — Create a new partner link in dub. Returns the created partner link object.
- **list_all_dub_partner_links** — List partner links in dub. Returns a collection of partner link objects.
- **dub_partner_links_bulk_update** — Bulk upsert partner links in dub, inserting or updating multiple records in a single request. Returns the upserted partner link objects.
- **list_all_dub_payouts** — List all payouts for your Dub partner program. Returns an array of payout objects including id, amount, currency, status, and partner details. Optionally filter by status, partnerId, tenantId, or invoiceId.
- **create_a_dub_tag** — Create a tag in dub for the authenticated workspace. Returns the created tag object including its id, name, and color.
- **list_all_dub_tags** — List all tags in dub for the authenticated workspace. Returns an array of tag objects including id, name, and color. Supports filtering by search term or specific tag ids.
- **update_a_dub_tag_by_id** — Update a tag in dub by id. Returns the updated tag object including its id, name, and color. Required: id.
- **create_a_dub_track** — Track a lead conversion event in dub by submitting lead data to the lead tracking endpoint. Associates a lead action with a dub link click.
- **create_a_dub_track_sale** — Track a sale for a short link in dub. Returns: eventName, customer (id, email, externalId), and sale (amount, currency, paymentProcessor). Required: customerExternalId, amount.

## How it works

1. **Link your customer's Dub account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Dub.** The Proxy API is a 1-to-1 mapping of the Dub API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Embed branded link shortening in marketing tools** — Let your users shorten URLs using their own Dub-connected custom domains directly inside your email, SMS, or social composer. This keeps branding consistent across outbound channels without forcing users to context-switch.
- **Power affiliate and partner programs in billing platforms** — Billing and subscription tools can offer turnkey affiliate tracking by syncing paid invoices to Dub as tracked sales and clawing back commissions on refunds. End users get a full affiliate program without leaving your product.
- **Enrich CRM and CDP profiles with attribution data** — Pull clickstream events and conversion data from Dub to attach UTM, geo, device, and referrer context to user profiles in your CRM or analytics product. This closes the loop between top-of-funnel link clicks and downstream revenue.
- **Automate partner onboarding for PRM platforms** — Partner Relationship Management tools can programmatically create Dub partners, generate unique tracking links, and approve applications when users sign up new affiliates. Eliminates manual link provisioning for partner managers.
- **Build dashboards with unified link analytics** — Analytics and reporting platforms can blend Dub's aggregated timeseries click data with their own metrics to give users a single view of campaign performance. Useful for agencies and growth teams managing multi-channel reporting.

## What you can build

- **Bulk link generation with embedded UTMs** — Use bulk link creation to spin up thousands of trackable short links per campaign, with predefined UTM parameters, tags, and custom domains attached.
- **Sale and lead conversion tracking** — Fire conversion events from your billing or CRM workflows to Dub so clicks get attributed to the right customer, partner, or campaign with full revenue context.
- **Refund-aware commission adjustments** — Automatically update or reverse affiliate commissions in Dub when your platform processes a refund, chargeback, or subscription cancellation.
- **Clickstream event ingestion pipeline** — Pull raw click, lead, and sale events with browser, OS, city, country, and referrer metadata to enrich user profiles or feed downstream warehouses.
- **Affiliate onboarding workflows** — Create partners, generate their unique tracking links, and approve or reject partner applications directly from your product's partner management UI.
- **Custom domain provisioning** — Let users register and verify their branded short domains during onboarding by creating domains and polling status checks through your interface.

## FAQs

### How does authentication work for end users connecting their Dub account?

Truto handles the auth handshake with Dub on your behalf, so end users connect their Dub workspace once and your app receives a managed connection. You don't need to store or refresh credentials yourself.

### Can I create many links at once without hitting rate limits?

Yes. The bulk link create, update, and delete operations let you batch link operations in a single call, which is the recommended pattern for high-volume campaigns instead of looping individual create calls.

### How do I report a conversion or sale back to Dub?

Use the track and track sale operations to send conversion events with a customer external ID and amount. Dub will attribute the sale to the originating click and calculate any associated partner commissions.

### What level of analytics granularity is available?

You can fetch raw event-level data (clicks, leads, sales with browser, OS, city, country, referrer) via the events endpoint, or aggregated timeseries and grouped counts via the analytics endpoint for dashboard use cases.

### Can I automate partner program management?

Yes. You can create partners, list and approve or reject partner applications, generate partner-specific links, deactivate or ban partners, and update commissions — covering the full affiliate lifecycle.

### Does Truto normalize Dub data into a unified schema?

Not currently. Dub is available as a direct integration with tool-level access to its native API surface, so you work with Dub's own data model. If you need normalization across multiple marketing tools, that can be built on request.
