Skip to content
Dub logo

Connectors / Marketing · HTTP Connector

Dub integration and API

Create a link, create a domain and update a customer in Dub, and start a workflow when Dub sends “Link created”.

What can you do with Dub on Tray.ai?

Dub is a link management and attribution platform for creating branded short links, tracking clicks, leads and sales, and running affiliate partner programs. Tray.ai connects to Dub through the HTTP Connector, so your workflows can call the Dub API alongside the rest of your stack.

  • When Dub sends “Sale created”, record the attributed revenue against the campaign in your CRM.
  • Create a link for every new campaign added to your marketing calendar.
  • When Dub sends “Lead created”, add the lead to your CRM with its source link.
  • List commissions each month and send them to finance for partner payouts.
Connects through
HTTP Connector
Authentication
A bearer token
Base URL
https://api.dub.co

Set it up

Connect Dub to Tray.ai

Each step uses Dub's own API details, from its documentation.

Save Dub's API token

Save the token Dub issues as a Tray.ai authentication. The HTTP Client sends it as a bearer token on every call. The token stays out of the workflow and out of the logs.

Point the HTTP Client at the API

Add an HTTP Client step and use https://api.dub.co as the base URL. Or paste a cURL example from Dub's API docs, and Tray.ai fills in the method, URL, and headers.

Start with “List links”

It's one of 25 documented actions, under Links. The response comes back as data the next step can map into your other apps.

Start workflows from Dub events

Give Dub the URL of a Tray.ai webhook trigger. “Link created” can then start a workflow, and so can 7 other events.

Workflows to build with Dub

Connect Dub with Salesforce, Stripe, HubSpot and Slack

Each one uses actions and events from Dub's own API documentation.

Send Dub sales to Salesforce as closed revenue

When

Sale created

Then

  1. Retrieve a customer
  2. Update the matching account in Salesforce with the sale

With Salesforce

Track Stripe payments as sale events in Dub

When

A payment succeeds in Stripe

Then

  1. Track a sale event with the amount and customer
  2. Update a customer with the Stripe customer ID

With Stripe

Create Dub short links for new HubSpot campaigns

When

A campaign is created in HubSpot

Then

  1. Create a link with the campaign URL
  2. Post the short link to the marketing channel in Slack

With HubSpot and Slack

Apps you can build on Dub data

Internal tools your team can build with an AI assistant, each one using Dub calls from its API documentation.

Partner application review

Lists partners so the affiliate team can approve applications and create a link for each new partner.

Commission payout tracker

Lists commissions and payouts by partner so finance can see what is owed.

Link performance dashboard

Shows clicks, leads and sales for each short link so marketers can compare campaigns.

Give your AI agents Dub tools

Build an MCP server on Dub in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • Create a link
  • Create a domain
  • Track a lead event
  • List customers
  • Create or update a partner
  • List commissions
  • List links
  • Update a link

What the Dub API covers

6 resources and 25 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.

Links

  • Create a link
  • List links
  • Update a link
  • Delete a link
  • Bulk create links

Domains

  • Create a domain
  • Update a domain
  • Delete a domain
  • Check domain availability

Conversion tracking

  • Track a lead event
  • Track a sale event
  • Retrieve analytics
  • List events

Customers

  • List customers
  • Retrieve a customer
  • Update a customer
  • Delete a customer

Partners

  • Create or update a partner
  • List partners
  • Create a partner link
  • Approve a partner application

Commissions

  • List commissions
  • Create a commission
  • Update a commission
  • List payouts

Events Dub can send to a Tray.ai webhook trigger

  • Link created
  • Link updated
  • Link deleted
  • Link clicked
  • Lead created
  • Sale created
  • Partner enrolled
  • Commission created

Checked against Dub's own documentation on 2026-10-22

dub.co/docs/api-reference/introduction

Frequently asked questions

What can a Tray.ai workflow do in Dub?

The Dub API documents 25 actions across 6 resources (Links, Domains, Conversion tracking, Customers, Partners, Commissions). For example: Create a link; Create a domain; Track a lead event. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Dub?

The Dub API uses a bearer token. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

Which Dub events can start a Tray.ai workflow?

Dub sends 8 events to a webhook URL, for example: Link created; Link updated; Link deleted; Link clicked; Lead created; Sale created; Partner enrolled; Commission created. A Tray.ai webhook trigger receives them and starts a workflow.

See Dub working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great, a couple more details

This helps us connect you with the right person. Optional, and you can skip it.