Short Link

Last updated: Feb 12th, 2020

Introduction

With the help of Lnkiy, you can convert your long URL into the short links that make it shareable, manageable and trackable. When sharing URL online, we need to keep in mind the length limitations of social media platform.

For Example: Social media sites, messaging and etc. have a character limit so you have to be concise and relevant when posting a tweet.

For your better reach of the customer and the market, now we also provide REST API that can be include on multiple platforms like Android, IOS, and web.

Types of Short URL

We provide two different types of short Link

    Let's see the API to generate Random Link

    We also provide API, that can be integrated in your website or application

    Before integrating API in your project, you will have to get your API key from Lnkiy Dashboard.

    Request: http://api.lnkiy.com/url/shortener/createrandomurl

    Headers: Accept: application/json
    Content-Type: application/json

    Different Parameters and its use
    Parameters Description Required
    longUrl This is the URL for which you want to create the short link Yes
    urlType This tells the type of the URL, it should be Random Optional
    urlTitle This helps to give the title. Optional
    authKey This is the unique auth key Yes
    expiryDate This parameter is used to give an expiry date to the URL Optional
    Body
    
    									{
    										"longUrl":"http://drive.arraycode.com/",
    										"urlType": "Random",
    										"urlTitle":"Arraycode Drive",
    										"authKey":"3TFXXXXXXXXXXXXXXXXXXXXXXXXXXXXns"
    										"expiryDate": "24-09-2024 03:26:30"
    									}
    Response
    
    									{
    										"responseCode": "200",
    										"responseStatus": "SUCCESS",
    										"responseMessage": "Short link successfully created",
    										"result": {
    											"createdOn": "24-09-2019 03:26:30",
    											"lastModifiedOn": "24-09-2019 03:26:30",
    											"status": "Active",
    											"longUrl": "http://drive.arraycode.com/",
    											"shortUrl": "lnkiy.in/kgBw628",
    											"urlType": "Random",
    											"urlTitle": "Arraycode Drive",
    											"expiryDate": "24-09-2024 03:26:30"
    										}
    									}

    The short url is case sensitive.

    Example: If short url is "http://lnkiy.in/njgurqj" (lower case), and "http://lnkiy.in/NjGUrqj" (upper case) they both will redirect to different site.

    Let's see the API to generate Custom Link

    We also provide API, that can be integrated in your website or application

    Before integrating API in your project, you will have to get your API key from Lnkiy Dashboard.

    Request: http://api.lnkiy.com/url/shortener/createcustomurl

    Headers: Accept: application/json
    Content-Type: application/json

    Different Parameters and its use
    Parameters Description Required
    longUrl This is the URL for which you want to create the short link Yes
    shortUrl This is the keyword or title which will be added after the base URL Yes
    urlType This tells the type of the URL, it should be Custom Optional
    urlTitle This helps to give the title. Optional
    authKey This is the unique auth key Yes
    expiryDate This parameter is used to give an expiry date to the URL Optional
    Body
    
    										{
    											"longUrl":"http://drive.arraycode.com",
    											"urlTitle":"Arraycode Drive",
    											"urlType":"Custom",
    											"shortUrl":"ArraycodeDrive",
    											"authKey":"3TFXXXXXXXXXXXXXXXXXXXXXXXXXXXXns"
    										}
    Response
    
    										{
    											"responseCode": "200",
    											"responseStatus": "SUCCESS",
    											"responseMessage": "Short link successfully created",
    											"result": {
    												"createdOn": "24-09-2019 03:31:21",
    												"lastModifiedOn": "24-09-2019 03:31:21",
    												"status": "Active",
    												"longUrl": "http://drive.arraycode.com",
    												"shortUrl": "http://lnkiy.in/ArraycodeDrive",
    												"urlType": "Custom",
    												"urlTitle": "Arraycode Drive",
    												"expiryDate": "24-09-2024 03:31:21"
    											}
    										}

Error Codes

Whenever a requested resource is not available or an API call fails for following reason, a JSON error is returned. Errors always come with an responseCode and a responseMessage.

Example Error: The following error is returned if your monthly API request volume has been exceeded.


										{
										    "responseCode": "429",
										    "responseStatus": "WARNING",
										    "responseMessage": "Your API limit exceeded",
										    "result": null
										}

Other Errors

Response Code Response Status Description
199 WARNING Please provide longUrl parameter with valid url
401 WARNING When your auth key is invalid
429 WARNING The maximum allowed amount of API requests has been reached.
500 ERROR Something went wrong, Please try again