| Field | Type | Required | Description | Example |
|---|---|---|---|---|
url |
Optional[str] | ➖ | The destination URL of the short link. | https://google.com |
domain |
Optional[str] | ➖ | The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or dub.sh if the workspace has no domains). |
|
key |
Optional[str] | ➖ | The short link slug. If not provided, a random 7-character slug will be generated. | |
external_id |
OptionalNullable[str] | ➖ | The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace. | 123456 |
tenant_id |
OptionalNullable[str] | ➖ | The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant. | |
program_id |
OptionalNullable[str] | ➖ | The ID of the program the short link is associated with. | |
partner_id |
OptionalNullable[str] | ➖ | The ID of the partner the short link is associated with. | |
track_conversion |
Optional[bool] | ➖ | Whether to track conversions for the short link. Defaults to false if not provided. |
|
archived |
Optional[bool] | ➖ | Whether the short link is archived. Defaults to false if not provided. |
|
tag_ids |
Optional[operations.UpdateLinkTagIds] | ➖ | The unique IDs of the tags assigned to the short link. | [ "clux0rgak00011..." ] |
tag_names |
Optional[operations.UpdateLinkTagNames] | ➖ | The unique name of the tags assigned to the short link (case insensitive). | |
folder_id |
OptionalNullable[str] | ➖ | The unique ID existing folder to assign the short link to. | |
comments |
OptionalNullable[str] | ➖ | The comments for the short link. | |
expires_at |
OptionalNullable[str] | ➖ | The date and time when the short link will expire at. | |
expired_url |
OptionalNullable[str] | ➖ | The URL to redirect to when the short link has expired. | |
password |
OptionalNullable[str] | ➖ | The password required to access the destination URL of the short link. | |
proxy |
Optional[bool] | ➖ | Whether the short link uses Custom Link Previews feature. Defaults to false if not provided. |
|
title |
OptionalNullable[str] | ➖ | The custom link preview title (og:title). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
|
description |
OptionalNullable[str] | ➖ | The custom link preview description (og:description). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
|
image |
OptionalNullable[str] | ➖ | N/A | |
video |
OptionalNullable[str] | ➖ | The custom link preview video (og:video). Will be used for Custom Link Previews if proxy is true. Learn more: https://d.to/og |
|
rewrite |
Optional[bool] | ➖ | Whether the short link uses link cloaking. Defaults to false if not provided. |
|
ios |
OptionalNullable[str] | ➖ | The iOS destination URL for the short link for iOS device targeting. | |
android |
OptionalNullable[str] | ➖ | The Android destination URL for the short link for Android device targeting. | |
geo |
Dict[str, str] | ➖ | N/A | |
do_index |
Optional[bool] | ➖ | Allow search engines to index your short link. Defaults to false if not provided. Learn more: https://d.to/noindex |
|
utm_source |
OptionalNullable[str] | ➖ | The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. | |
utm_medium |
OptionalNullable[str] | ➖ | The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. | |
utm_campaign |
OptionalNullable[str] | ➖ | The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL. | |
utm_term |
OptionalNullable[str] | ➖ | The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL. | |
utm_content |
OptionalNullable[str] | ➖ | The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL. | |
ref |
OptionalNullable[str] | ➖ | The referral tag of the short link. If set, this will populate or override the ref query parameter in the destination URL. |
|
test_variants |
List[operations.UpdateLinkTestVariants] | ➖ | An array of A/B test URLs and the percentage of traffic to send to each URL. | [ { "url": "https://example.com/variant-1", "percentage": 50 }, { "url": "https://example.com/variant-2", "percentage": 50 } ] |
test_started_at |
OptionalNullable[str] | ➖ | The date and time when the tests started. | |
test_completed_at |
OptionalNullable[str] | ➖ | The date and time when the tests were or will be completed. | |
public_stats |
Optional[bool] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Deprecated: Use dashboard instead. Whether the short link's stats are publicly accessible. Defaults to false if not provided. |
|
tag_id |
OptionalNullable[str] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Deprecated: Use tagIds instead. The unique ID of the tag assigned to the short link. |
|
webhook_ids |
List[str] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Deprecated: You can now enable link.clicked webhooks for all links in a workspace or folder without passing this field manually. An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data. |