Documentation Index Fetch the complete documentation index at: https://dub-partner-network.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Dub allows you to perform bulk operations on links. This is particularly useful when you need to create , update , or delete multiple links at once without having to make multiple API requests.
Bulk create links
Bulk create allows you to create up to 100 links at once.
Node.js
Go
Python
Ruby
PHP
cURL
import { Dub } from "dub" ;
export const dub = new Dub ({
token: process . env . DUB_API_KEY ,
});
const result = await dub . links . createMany ([
{
url: "https://google.com" ,
},
{
url: "https://google.uk" ,
},
]);
Check out the full API reference for the link bulk creation endpoint .
Bulk update links
Bulk update allows you to modify up to 100 links simultaneously with the same data .
Some potential use cases:
Tagging multiple links at once
Setting the same expiration date for multiple links
Updating UTM parameters for multiple links
You cannot update the domain or key of a link with this endpoint. Also,
webhook events will not be triggered when using
bulk link updates
Node.js
Go
Python
Ruby
PHP
cURL
import { Dub } from "dub" ;
export const dub = new Dub ({
token: process . env . DUB_API_KEY ,
});
const result = await dub . links . updateMany ({
linkIds: [ "clux0rgak00011..." , "clux0rgak00022..." ],
data: {
utm_source: "facebook" ,
utm_medium: "cpc" ,
},
});
Check out the full API reference for the link bulk update endpoint .
Bulk delete links
With bulk delete, you can delete up to 100 links at once.
This is a destructive action and cannot be undone. Proceed with caution. Also,
webhook events will not be triggered when using
this endpoint.
Node.js
Go
Python
Ruby
PHP
cURL
import { Dub } from "dub" ;
export const dub = new Dub ({
token: process . env . DUB_API_KEY ,
});
const result = await dub . links . deleteMany ({
linkIds: [ "clux0rgak00011..." , "clux0rgak00022..." ],
});
Check out the full API reference for the link bulk delete endpoint .