v1
latestOpenAPI 3.1.02026-07-245495176.5 KBLink 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:
- 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
- If URL with a given path already exists and originalURL is different from originalURL in database, it returns error with a status 409
- If URL with a given originalURL exists, and no path is given, it returns information about existing URL and does not create anything
- 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
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
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"
}
}