Create and manage Dub short links, domains, tags, folders and customers, read click analytics and events, and track lead and sale conversions.
Dub ships in the w6w first-party pack. It declares 29 actions, 3 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.dubDub is a link management and attribution platform. This app creates, updates, upserts and deletes short links one at a time or in bulk of up to 100, lists and counts them, and manages the domains, tags and folders that organise them.
It reads click, lead and sale analytics (grouped by time, location, device, referrer, UTM and more) and the raw event stream, lists and edits tracked customers, and records lead and sale conversions server-side.
Health checks verify the API key, whether api.dub.co is answering, Dub’s own status page, and the hourly rate-limit headroom.
Three routes to the same 29 actions. The Workflow tab is generated from Dub's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
analytics-get Retrieve click, lead or sale analytics for a link, a domain or the whole workspace, optionally grouped (time series, country, device, referrer, UTM, top links…). Requires a paid Dub plan.
customer-get Retrieve one customer by Dub ID, or by your own external ID prefixed with `ext_`.
customer-list List customers recorded by conversion tracking, one cursor page at a time. Pass `nextCursor` as `startingAfter` for the next page.
customer-update Update a customer's profile, Stripe link or subscription-canceled date.
domain-check-availability Check whether one or more domains can be registered. Dub supports `.link` domains only.
domain-create Add a custom domain to the workspace. DNS must then be configured and verified before it serves links.
domain-delete Delete a domain from the workspace. This cannot be undone and also deletes every link on the domain.
event-list List individual click, lead or sale events, newest first, one page at a time. Requires a paid Dub plan.
folder-delete Delete a folder. Its links keep working but are no longer in the folder.
link-bulk-create Create up to 100 short links in one request. A link that fails is reported in `errors` while the rest are still created.
link-bulk-delete Permanently delete up to 100 links by ID. IDs that do not exist are ignored, and the count of links actually removed is returned.
link-bulk-update Apply the same changes to up to 100 links, selected by link ID or external ID. Only the fields you set change.
link-create Create a short link. Leave the slug empty for a random one (7 characters unless `keyLength` says otherwise).
link-get Retrieve one short link by its ID, by its external ID, or by domain and slug together.
link-list List short links, newest first, one cursor page at a time. Pass `nextCursor` from the result as `startingAfter` for the next page.
link-upsert Create a short link, or update the existing one if a link with the same destination URL already exists in the workspace. Safe to repeat.
tag-create Create a tag for organising links. A random color is picked when none is given.
track-lead Record a lead conversion (a sign-up, trial start…) attributed to a click on a Dub link, and create or match the customer.
track-sale Record a sale conversion for a customer, optionally tied to an earlier lead event. For a sale with no prior lead, pass a click ID and the customer details (direct sale tracking).
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying Dub's real ids.
{
"manifestVersion": "2",
"name": "dub-example",
"steps": [
{
"id": "customer-get",
"uses": {
"app": "io.w6w.dub",
"action": "customer-get",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"customerId": "<customerId>"
}
}
]
}customer-get analytics-get customer-list customer-update domain-check-availability +24 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for Dub, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to Dub. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "customer-get",
payload: {
customerId: "<value>",
// includeExpandedFields: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action customer-get --payload '{"customerId":"<value>"}' Give an AI agent Dub — without giving it Dub's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.dub#customer-get",
"input": {
"customerId": "<customerId>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's Dub connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
Dub's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. Dub itself is MIT, and the runtime that executes it is source-available (FSL).
Dub declares its own checks, so its health is a property of the app rather than something the host guesses at.
status.dub.co (incident.io, Statuspage v2 shape). The `API` component decides; `Link Redirects` is capped at degraded; the dashboard and website are detail only.
Unauthenticated GET of api.dub.co/links. Dub's documented 401 error envelope is the expected healthy answer; credential validity is the `auth:api-key` check's job.
Requests left in this key's rate-limit window, read from the `X-RateLimit-*` headers of a signed `GET /links?pageSize=1`.