Best URL Shortener plans

1. URL Shortener API Integration


Refer this page to integrate our URL shortening API with your system and create short links right from your application.

We have made API integration really simple and easy, you just need to follow below instructions.

Contact us in case you face any issue while doing integration.


NOTE: API access is only available with paid plans. Explore all our plans here.

2. Create Short Link

https://api.lnnkin.com/client/api/url/shorten
Name Type Description
long_url String Destination link which you want to short.
NOTE : The long_url must be passed as encoded URL. For example:
Original URL -> https://www.lnnkin.com/api-integration/plans?test=query string
Encoded URL -> https://www.lnnkin.com/api-integration/plans?test=query%20string
custom_name (Optional) String Custom name for short link
password (Optional) String Password for short link
domain (Optional) String User's custom domains. Only domains with active status will work. You can check the domain's status here.

Name Type Description
Content-Type String Content type of the request body. (eg. application/json)
Authorization String API access token of user. It can be found on My Profile page after selecting an API plan.

Name Type Description
success Boolean Its "true" when short link successfully generated else "false".
short_url String Generated short link
track_url String Tracking link for the generated short link.
tracking_id String Unique ID for the generated short link.
error_code String Unique code for occurred error.
error_message String Error description for the occured error.

Sample request & response for creating SHORT LINK

    
    // REQUEST HEADERS:
	// POST https://api.lnnkin.com/client/api/url/shorten 
	// Content-Type:application/json
	// Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU= 
	
	// REQUEST BODY:
	{ 
		"long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
		"password":"",
		"domain":"lnnk.in"
	}

Sample response (Success)

    
	{ 
		"success": true,
		"body": 
			{
				"short_url": "http://lnnk.in/EIf",
				"track_url": "https://www.lnnkin.com/url/track/ab2005c2-9c60-4e61-a36e-a44e51c1ede5",
				"tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
			}
	}

Sample response (Failure)

    
	{
 		"success": false,
 		"error_code": "LI05",
 		"error_message": "Invalid destination link."
	}


Sample request & response for creating CUSTOM LINK

    
    // REQUEST HEADERS:
	// POST https://api.lnnkin.com/client/api/url/shorten 
	// Content-Type:application/json
	// Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU= 
	
	// REQUEST BODY:
	{ 
		"long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
		"custom_name":"API-Test",
		"password":"",
		"domain":"lnnk.in"
	}

Sample response (Success)

    
	{ 
		"success": true,
		"body": 
			{
  				"short_url": "http://lnnk.in/@API-Test",
 				"track_url": "https://www.lnnkin.com/url/track/ab2005c2-9c60-4e61-a36e-a44e51c1ede5",
				"tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
 			}
	}

Sample response (Failure)

    
	{
		"success": false,
		"error_code": "LI07",
		"error_message": "Custom name already taken. Try something else."
	}

3. Edit Short Link

https://api.lnnkin.com/client/api/url/edit
Name Type Description
long_url String New destination link which you want to update for existing short link.
NOTE : The long_url must be passed as encoded URL. For example:
Original URL -> https://www.lnnkin.com/api-integration/plans?test=query string
Encoded URL -> https://www.lnnkin.com/api-integration/plans?test=query%20string
tracking_id String Unique ID of the short link
password (Optional) String Password for short link

Name Type Description
Content-Type String Content type of the request body. (eg. application/json)
Authorization String API access token of user. It can be found on My Profile page after selecting an API plan.

Name Type Description
success Boolean Its "true" when short link successfully updated else "false".
error_code String Unique code for occurred error.
error_message String Error description for the occured error.

Sample request & response for editing SHORT LINK

    
    // REQUEST HEADERS:
	// POST https://api.lnnkin.com/client/api/url/edit 
	// Content-Type:application/json
	// Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU= 
	
	// REQUEST BODY:
	{ 
		"long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
		"tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5",
		"password":""
	}

Sample response (Success)

    
	{ 
 		"success": true
	}

Sample response (Failure)

    
	{
		"success": false,
		"error_code": "LI11",
		"error_message": "Invalid tracking ID."
	}

4. Disable Short Link

https://api.lnnkin.com/client/api/url/disable
Name Type Description
tracking_id String Unique ID of the short link

Name Type Description
Content-Type String Content type of the request body. (eg. application/json)
Authorization String API access token of user. It can be found on My Profile page after selecting an API plan.

Name Type Description
success Boolean Its "true" when short link successfully disabled else "false".
error_code String Unique code for occurred error.
error_message String Error description for the occured error.

Sample request & response for disabling SHORT LINK

    
    // REQUEST HEADERS:
	// POST https://api.lnnkin.com/client/api/url/disable 
	// Content-Type:application/json
	// Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU= 
	
	// REQUEST BODY:
	{ 
		"tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
	}

Sample response (Success)

    
	{ 
		"success": true
	}

Sample response (Failure)


	{
 		"success": false,
 		"error_code": "LI11",
 		"error_message": "Invalid tracking ID."
	}	

5. Enable Short Link

https://api.lnnkin.com/client/api/url/enable
Name Type Description
tracking_id String Unique ID of the short link

Name Type Description
Content-Type String Content type of the request body. (eg. application/json)
Authorization String API access token of user. It can be found on My Profile page after selecting an API plan.

Name Type Description
success Boolean Its "true" when short link successfully enabled else "false".
error_code String Unique code for occurred error.
error_message String Error description for the occured error.

Sample request & response for enabling SHORT LINK

    
    // REQUEST HEADERS:
	// POST https://api.lnnkin.com/client/api/url/enable 
	// Content-Type:application/json
	// Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU= 
	
	// REQUEST BODY:
	{ 
		"tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
	}

Sample response (Success)

    
	{ 
		"success": true
	}

Sample response (Failure)


	{
 		"success": false,
 		"error_code": "LI11",
 		"error_message": "Invalid tracking ID."
	}	

6. Delete Short Link

https://api.lnnkin.com/client/api/url/delete
Name Type Description
tracking_id String Unique ID of the short link

Name Type Description
Content-Type String Content type of the request body. (eg. application/json)
Authorization String API access token of user. It can be found on My Profile page after selecting an API plan.

Name Type Description
success Boolean Its "true" when short link successfully deleted else "false".
error_code String Unique code for occurred error.
error_message String Error description for the occured error.

Sample request & response for deleting SHORT LINK

    
    // REQUEST HEADERS:
	// POST https://api.lnnkin.com/client/api/url/delete 
	// Content-Type:application/json
	// Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU= 
	
	// REQUEST BODY:
	{ 
		"tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
	}

Sample response (Success)

    
	{ 
		"success": true
	}

Sample response (Failure)


	{
 		"success": false,
 		"error_code": "LI11",
 		"error_message": "Invalid tracking ID."
	}	

7. Response Error codes

Error code Error message
LI00 Invalid request.
LI01 Per second limit exceeded.
LI02 Monthly limit exceeded.
LI03 Unauthorized access.
LI04 Please select a plan from www.lnnkin.com which supports API access
LI05 Invalid destination link.
LI06 Invalid custom name. Only alphabets, numbers, underscore and hyphen are allowed.
LI07 Custom name already taken. Try something else.
LI08 Unable to generate short URL. Please try again.
LI09 Unable to generate custom URL. Please try again.
LI10 Email not verified.
LI11 Invalid tracking ID.
LI12 Short URL edit limit exceeded.
LI13 This domain is blacklisted in our system. Please read our terms of use.
LI14 Invalid custom domain.