Best URL Shortener plans

URL Shortener API Integration

Refer this page to integrate our URL shortening API with your system. Its really simple and easy to integrate our API, you just need to follow below instructions.

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


Table of content
1 Create SHORT URL View
2 Edit SHORT URL View
3 Disable SHORT URL View
4 Enable SHORT URL View
5 Delete SHORT URL View
6 Response Error codes View

1. Create SHORT URL

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

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 URL

POST https://api.lnnkin.com/client/api/url/shorten
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
 "password":""
}
{ 
 "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"
 }
}
{
 "success": false,
 "error_code": "LI05",
 "error_message": "Invalid destination link."
}

Sample request & response for creating CUSTOM URL

POST https://api.lnnkin.com/client/api/url/shorten
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
 "custom_name":"API-Test",
 "password":""
}
{ 
 "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"
 }
}
{
 "success": false,
 "error_code": "LI07",
 "error_message": "Custom name already taken. Try something else."
}

2. Edit SHORT URL

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 URL

POST https://api.lnnkin.com/client/api/url/edit
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "long_url":"https://www.lnnkin.com/api-integration/plans?test=query%20string",
 "tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5",
 "password":""
}
{ 
 "success": true
}
{
 "success": false,
 "error_code": "LI11",
 "error_message": "Invalid tracking ID."
}

3. Disable SHORT URL

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 URL

POST https://api.lnnkin.com/client/api/url/disable
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
}
{ 
 "success": true
}
{
 "success": false,
 "error_code": "LI11",
 "error_message": "Invalid tracking ID."
}

4. Enable SHORT URL

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 URL

POST https://api.lnnkin.com/client/api/url/enable
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
}
{ 
 "success": true
}
{
 "success": false,
 "error_code": "LI11",
 "error_message": "Invalid tracking ID."
}

5. Delete SHORT URL

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 URL

POST https://api.lnnkin.com/client/api/url/delete
Content-Type:application/json
Authorization:ZPX9blqJm2lJTsYyd9MFiVkb7wsdsudrefvMTz5Ud0UxgbGLua2DCU=
{ 
 "tracking_id": "ab2005c2-9c60-4e61-a36e-a44e51c1ede5"
}
{ 
 "success": true
}
{
 "success": false,
 "error_code": "LI11",
 "error_message": "Invalid tracking ID."
}

6. 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.