Dub icon

Dub

Interact with the Dub API

Link → Update

AI-generated

Summary

Update a Dub short link by its unique identifier.

Inputs

  • linkId (required) — The unique ID of the short link to update
  • android — The Android destination URL for device targeting (max 32,000 characters)
  • archived — Whether the short link is archived
  • comments — Comments for the short link
  • key — The short link slug (max 190 characters)
  • description — The custom link preview description (og:description)
  • url — The destination URL of the short link (max 32,000 characters)
  • doIndex — Whether to allow search engines to index your short link
  • domain — The domain of the short link without protocol (max 190 characters)
  • expiredUrl — The URL to redirect to when the short link has expired (max 32,000 characters)
  • expiresAt — The date and time when the short link expires (ISO-8601 format)
  • externalId — The ID of the link in your database (1-255 characters)
  • folderId — The unique ID of existing folder to assign the short link to
  • geo — Geo targeting as JSON object mapping country codes to destination URLs
  • image — The custom link preview image (og:image). Can be Base64-encoded or URL.
  • ios — The iOS destination URL for device targeting (max 32,000 characters)
  • partnerId — The ID of the partner the short link is associated with
  • password — The password required to access the destination URL
  • programId — The ID of the program the short link is associated with
  • proxy — Whether the short link uses Custom Link Previews feature
  • ref — The referral tag of the short link
  • rewrite — Whether the short link uses link cloaking
  • tagIds — IDs of tags assigned to the short link (comma-separated)
  • tagNames — Tag names assigned to the short link, case-insensitive (comma-separated)
  • tenantId — The ID of the tenant that created the link (max 255 characters)
  • title — The custom link preview title (og:title)
  • trackConversion — Whether to track conversions for the short link
  • utm_campaign — UTM campaign parameter value
  • utm_content — UTM content parameter value
  • utm_medium — UTM medium parameter value
  • utm_source — UTM source parameter value
  • utm_term — UTM term parameter value

Output shape

The Dub API returns the updated link object representing the modified short link.

The operation sends a PATCH request to the Dub API endpoint /links/{linkId} with the provided fields. The linkId parameter is required; all other fields are optional and correspond to the Dub link update schema.

Links

Discussion