Dub icon

Dub

Interact with the Dub API

Link → Create or Update

AI-generated

Summary

Create or update a short link in Dub.

Inputs

  • url (required) — The destination URL of the short link (max 32,000 characters).
  • additionalFields — Optional collection of link properties including Android/iOS URLs, custom slug, description, expiry, geo targeting, tags, UTM parameters, and more.

Output shape

Link object returned by Dub API

The operation performs an upsert: if a link with the provided externalId or key exists, it is updated; otherwise a new link is created.

Examples

Example 1: Create a new short link with a custom slug

url: 'https://example.com', key: 'my-link'

Example 2: Update an existing link's destination and tracking settings

url: 'https://new-example.com', trackConversion: true, doIndex: false

Links

Discussion