Skip to content

Latest commit

 

History

History
58 lines (55 loc) · 93 KB

File metadata and controls

58 lines (55 loc) · 93 KB

Data

Fields

Field Type Required Description Example
id str ✔️ The unique ID of the short link.
domain str ✔️ The domain of the short link. If not provided, the primary domain for the workspace will be used (or dub.sh if the workspace has no domains).
key str ✔️ The short link slug. If not provided, a random 7-character slug will be generated.
url str ✔️ N/A
track_conversion bool ✔️ N/A
external_id Nullable[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.
tenant_id Nullable[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 Nullable[str] ✔️ The ID of the program the short link is associated with.
partner_id Nullable[str] ✔️ The ID of the partner the short link is associated with.
archived bool ✔️ N/A
expires_at Nullable[str] ✔️ N/A
expired_url Nullable[str] ✔️ N/A
disabled_at Nullable[str] ✔️ N/A
password Nullable[str] ✔️ The password required to access the destination URL of the short link.
proxy bool ✔️ N/A
title Nullable[str] ✔️ The title of the short link. Will be used for Custom Link Previews if proxy is true.
description Nullable[str] ✔️ The description of the short link. Will be used for Custom Link Previews if proxy is true.
image Nullable[str] ✔️ The image of the short link. Will be used for Custom Link Previews if proxy is true.
video Nullable[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 bool ✔️ N/A
do_index bool ✔️ N/A
ios Nullable[str] ✔️ The iOS destination URL for the short link for iOS device targeting.
android Nullable[str] ✔️ The Android destination URL for the short link for Android device targeting.
geo Dict[str, str] ✔️ Geo targeting information for the short link in JSON format {[COUNTRY]: https://example.com }. See https://d.to/geo for more information.
public_stats bool ✔️ N/A
tags List[components.LinkTagSchema] ✔️ The tags assigned to the short link.
folder_id Nullable[str] ✔️ The unique ID of the folder assigned to the short link.
comments Nullable[str] ✔️ The comments for the short link.
short_link str ✔️ The full URL of the short link, including the https protocol (e.g. https://dub.sh/try).
qr_code str ✔️ The full URL of the QR code for the short link (e.g. https://api.dub.co/qr?url=https://dub.sh/try).
utm_source Nullable[str] ✔️ The UTM source of the short link.
utm_medium Nullable[str] ✔️ The UTM medium of the short link.
utm_campaign Nullable[str] ✔️ The UTM campaign of the short link.
utm_term Nullable[str] ✔️ The UTM term of the short link.
utm_content Nullable[str] ✔️ The UTM content of the short link.
test_variants List[components.LinkWebhookEventTestVariants] 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 Nullable[str] ✔️ N/A
test_completed_at Nullable[str] ✔️ N/A
user_id Nullable[str] ✔️ N/A
workspace_id str ✔️ The workspace ID of the short link.
clicks Optional[float] The number of clicks on the short link.
leads Optional[float] The number of leads the short link has generated.
conversions Optional[float] The number of leads that converted to paying customers.
sales Optional[float] The total number of sales (includes recurring sales) generated by the short link.
sale_amount Optional[float] The total dollar value of sales (in cents) generated by the short link.
last_clicked Nullable[str] ✔️ N/A
created_at str ✔️ N/A
updated_at str ✔️ N/A
tag_id Nullable[str] ✔️ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Use tags instead. The unique ID of the tag assigned to the short link.
project_id str ✔️ : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: Use workspaceId instead. The project ID of 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.