Links

Create or update a link

Changed on

Create a new shortened link or update an existing one. To create: provide url and workspace_id. To update: provide id and any fields to change. Supports custom slugs, UTM parameters, retargeting pixels, Open Graph metadata, and redirect rules.

post/api/v1/link

Request

Request body

fb_pixel_idstring

fb_pixel_id

tiktok_pixel_idstring

tiktok_pixel_id

hide_referrerboolean

hide_referrer

expiry_datetimestring date-time

When the link expires (ISO 8601). After this time visitors are sent to expiry_destination. The year must be between 2000 and 2100.

expiry_destinationstring uri

Where visitors are sent once the link has expired (by date or by click count). Must start with http.

cloakingboolean

cloaking

linkify_wordsstring

linkify_words

og_descriptionstring

og_description

body_tagsstring

body_tags

spamboolean

spam

og_titlestring

og_title

notestring

note

namestring

name

idinteger

Link ID. Required to update an existing link

gtm_idstring

gtm_id

og_imagestring

og_image

block_botsboolean

block_bots

utm_contentstring

utm_content

enabledboolean

enabled

urlstring uri

URL. Required to create a new link.

replacementsstring

replacements

deletedboolean

deleted

expiry_clicksinteger

Expire the link after this many clicks; visitors are then sent to expiry_destination.

workspace_idinteger

Workspace ID

utm_sourcestring

utm_source

slugstring

slug

domainstring

domain

forward_paramsboolean

forward_params

utm_mediumstring

utm_medium

head_tagsstring

head_tags

ga4_tag_idstring

ga4_tag_id

utm_termstring

utm_term

utm_campaignstring

utm_campaign

Example request

{
  "url": "www.somelink.com",
  "workspace_id": 33
}

Response

Link

fb_pixel_idstring nullable
linkedin_partner_idstring nullable
microsoft_uet_tag_idstring nullable
reddit_pixel_idstring nullable
tiktok_pixel_idstring nullable
hide_referrerboolean nullable
expiry_datetimestring nullable
expiry_destinationstring uri nullable
twitter_pixel_idstring nullable
cloakingboolean nullable
linkify_wordsstring nullable
full_urlstring uri
sticky_rotatorboolean

Rotator links only: a visitor who has been sent to one of the rotator's destinations is sent to the same one again when they click the link again, remembered in a cookie for 30 days.

og_descriptionstring nullable
skip_social_crawler_trackingboolean nullable
body_tagsstring nullable
og_titlestring nullable
notestring nullable
namestring nullable
idinteger
gtm_idstring nullable
og_imagestring nullable
block_botsboolean nullable
snapchat_pixel_idstring nullable
utm_contentstring nullable
enabledboolean nullable
privacy_modeboolean

Privacy mode: clicks are counted, but no IP address, location, network, user agent, referrer or query parameters are stored, and click times are kept to the hour. Paid plans only.

urlstring uri
replacementsstring nullable
deletedboolean nullable
qr_stylesobject nullable
webhooksstring[] nullable
created_by_user_idinteger nullable
expiry_clicksinteger nullable
notify_slackboolean nullable
notify_user_idsinteger[] nullable
workspace_idinteger
public_analyticsboolean nullable
pinterest_tag_idstring nullable
passwordstring nullable
utm_sourcestring nullable
slugstring nullable
domainstring nullable
forward_paramsboolean nullable
utm_mediumstring nullable
head_tagsstring nullable
ga4_tag_idstring nullable
utm_termstring nullable
utm_campaignstring nullable

Example response

{
  "fb_pixel_id": null,
  "linkedin_partner_id": null,
  "microsoft_uet_tag_id": null,
  "reddit_pixel_id": null,
  "tiktok_pixel_id": null,
  "hide_referrer": false,
  "expiry_datetime": null,
  "expiry_destination": null,
  "rules": [],
  "twitter_pixel_id": null,
  "cloaking": false,
  "linkify_words": null,
  "full_url": "https://l.linklyhq.com/l/1uXyz",
  "sticky_rotator": false,
  "og_description": null,
  "skip_social_crawler_tracking": false,
  "body_tags": null,
  "og_title": null,
  "note": null,
  "name": "Summer sale — newsletter",
  "id": 41657524,
  "gtm_id": null,
  "og_image": null,
  "block_bots": false,
  "snapchat_pixel_id": null,
  "utm_content": null,
  "enabled": true,
  "privacy_mode": false,
  "url": "https://www.example.com/summer-sale?ref=newsletter",
  "replacements": null,
  "deleted": false,
  "qr_styles": null,
  "webhooks": [],
  "created_by_user_id": 7,
  "expiry_clicks": null,
  "notify_slack": false,
  "notify_user_ids": [],
  "workspace_id": 42,
  "public_analytics": false,
  "pinterest_tag_id": null,
  "password": null,
  "utm_source": "newsletter",
  "slug": null,
  "domain": null,
  "forward_params": false,
  "utm_medium": "email",
  "head_tags": null,
  "ga4_tag_id": null,
  "utm_term": null,
  "utm_campaign": "summer_sale"
}

Changes