v1

latestOpenAPI 3.1.02026-07-245495176.5 KB
Link Management

Create a new link

This method creates a new link. If parameter "path" is omitted, it generates path by algorithm, chosen in domain settings.

Notes:

  1. If URL with a given path already exists and originalURL of the URL in database is equal to originalURL argument, it returns information about existing URL
  2. If URL with a given path already exists and originalURL is different from originalURL in database, it returns error with a status 409
  3. If URL with a given originalURL exists, and no path is given, it returns information about existing URL and does not create anything
  4. If URL with a given originalURL exists, and custom path is given, it creates a new short URL

Rate limit: 50/s

post/links

Request body

originalURLstring required

Original URL

cloakingboolean

Cloaking

passwordstring

Link password

redirectType301 | 302 | 307 | 308 nullable

HTTP code for redirect

expiredURLstring nullable

Expired URL

titlestring

Link title

tagsstring[]

Array of link tags

utmSourcestring

set utm_source parameter to destination link

utmMediumstring

set utm_medium parameter to destination link

utmCampaignstring

set utm_campaign parameter to destination link

utmTermstring

set utm_term parameter to destination link

utmContentstring

set utm_content parameter to destination link

pathstring nullable

Link slug

androidURLstring nullable

Android URL

iphoneURLstring nullable

iPhone URL

clicksLimitinteger nullable

disable link after specified number of clicks

passwordContactboolean nullable

Provide your email to users to get a password

skipQSboolean

Skip query string merging

archivedboolean

Link is archived

splitURLstring nullable

Split URL

splitPercentinteger nullable

Split URL percentage

integrationAdrollstring nullable

Adroll integration

integrationFBstring nullable

Facebook integration

integrationGAstring nullable

Google Analytics integration

integrationGTMstring nullable

Google Tag Manager integration

domainstring hostname required

Domain hostname

allowDuplicatesboolean

Allow duplicates

folderIdstring

Folder ID

Example request

{
  "originalURL": "https://example.com",
  "password": "s3cur3p@ssw0rd",
  "redirectType": 301,
  "expiredURL": "https://example.com/expired",
  "utmSource": "cpc",
  "utmMedium": "banner",
  "utmCampaign": "summer_sale",
  "utmTerm": "running_shoes",
  "utmContent": "cta_button",
  "path": "my-link",
  "androidURL": "https://play.google.com/store/apps/details?id=com.example.app",
  "iphoneURL": "https://apps.apple.com/us/app/example-app/id1234567890",
  "createdAt": 1730998522307,
  "clicksLimit": 100,
  "splitURL": "https://example.com/split",
  "splitPercent": 50
}

Response

Default Response

originalURLstring required

Original URL

cloakingboolean

Cloaking

passwordstring

Link password

expiredURLstring nullable

Expired URL

titlestring

Link title

tagsstring[]

Array of link tags

utmSourcestring

set utm_source parameter to destination link

utmMediumstring

set utm_medium parameter to destination link

utmCampaignstring

set utm_campaign parameter to destination link

utmTermstring

set utm_term parameter to destination link

utmContentstring

set utm_content parameter to destination link

pathstring nullable required

Link slug

androidURLstring nullable

Android URL

iphoneURLstring nullable

iPhone URL

clicksLimitinteger nullable

disable link after specified number of clicks

passwordContactboolean nullable

Provide your email to users to get a password

skipQSboolean

Skip query string merging

archivedboolean

Link is archived

splitURLstring nullable

Split URL

splitPercentinteger nullable

Split URL percentage

integrationAdrollstring nullable

Adroll integration

integrationFBstring nullable

Facebook integration

integrationGAstring nullable

Google Analytics integration

integrationGTMstring nullable

Google Tag Manager integration

idStringstring required

Link ID

idstring required

Link ID

shortURLstring required

Short URL

secureShortURLstring required

Secure short URL

redirectType'301' | '302' | '307' | '308'

HTTP code for redirect

FolderIdstring nullable

Folder ID

DomainIdinteger

Domain ID

OwnerIdinteger

Owner ID

hasPasswordboolean

Link has password

successboolean
duplicateboolean

Example response

{
  "originalURL": "https://example.com",
  "password": "s3cur3p@ssw0rd",
  "expiredURL": "https://example.com/expired",
  "utmSource": "cpc",
  "utmMedium": "banner",
  "utmCampaign": "summer_sale",
  "utmTerm": "running_shoes",
  "utmContent": "cta_button",
  "path": "my-link",
  "androidURL": "https://play.google.com/store/apps/details?id=com.example.app",
  "iphoneURL": "https://apps.apple.com/us/app/example-app/id1234567890",
  "createdAt": 1730998522307,
  "clicksLimit": 100,
  "splitURL": "https://example.com/split",
  "splitPercent": 50,
  "shortURL": "https://short.gy/abc123",
  "secureShortURL": "https://short.gy/abc123",
  "FolderId": "abc123",
  "DomainId": 1,
  "OwnerId": 1,
  "User": {
    "id": 123,
    "name": "John Doe",
    "email": "a@example.com",
    "photoURL": "https://example.com/photo.jpg"
  }
}