Lnk8 is a growing database of experts across industries. Sign up as an expert or book a service with an expert on Lnk8.
E mail : [email protected]Lnk8 is a growing database of experts across industries. Sign up as an expert or book a service with an expert on Lnk8.
E mail : [email protected]Aug 6, 2024 - 5 min read
https://lnk8.co/api/public/v1
To get the API Key, email [email protected] with associated email id.
Include the api key in headers with custom property 'x-api-key'
x-api-key : <Your API Key>
All the endpoints require this header
On erroring you will get an appropriate status code with the reason in the following structure
{
error:<Reason for error>
}
This will let you create new short urls.
Method - POST Path - /url/create
Payload -
{
"url":url,
"slug"?:string,
"domain"?:string,
"expiry"?:ISODateString
}
url - is compulsory and should be a valid url and should start with https://
domain - is optional, if not provided will default to lnk8.io . domain should not include the protocol. only domains which are verified in your account are accepted.
slug - is optional, if not provided will default to random 6 digit string. you can provide any valid slug which matches this regex ^[a-z0-9]+(?:-[a-z0-9]+)*$
expiry - is optional, if not provided, the shortened link will stay forever unless deleted. expiry should be an ISO Date string YYYY-MM-DDTHH:mm:ss.sssZ with at-least 1 minute from current time
Response -
{
"shortUrl": string,
"url": url,
"expiry":ISODateString
}
In response you will get the created short url and the original long url
This will let you update target urls for already created short urls
Method - PUT Path - /url/update
Payload -
{
"url":url,
"shortUrl":string,
"expiry"?:ISODateString
}
url - is compulsory and should be a valid url and should start with https://
shortUrl - is compulsory, in the format domain/slug, it should not include any protocol, shortUrl should be associated with your account .
expiry - is optional, if not provided, the shortened link will retain previous expiry setting. expiry should be an ISO Date string YYYY-MM-DDTHH:mm:ss.sssZ with at-least 1 minute from current time. To remove previously set expiry, pass an empty string, expiry:"" .
Response -
{
"shortUrl": string,
"url": url,
"expiry":ISODateString
}
In response you will get the same short url and the updated long url
This will let you delete short urls from your account
Method - DELETE Path - /url/delete
Search Params -
?shortUrl=<your-short-url>
shortUrl - is compulsory, in the format domain/slug, it should not include any protocol, shortUrl should be associated with your account
Response -
{
"shortUrl": string,
"url": url,
"expiry":ISODateString
}
In response you will get the deleted short url and its long url
This will let you read a short url and its target url
Method - GET Path - /url/read
SearchParams -
?shortUrl=<your-short-url>
shortUrl - is compulsory, in the format domain/slug, it should not include any protocol, shortUrl should be associated with your account
Response -
{
"shortUrl": string,
"url": url,
"expiry":ISODateString
}
In response you will get the short url and its associated long url
This will let you get the list of domains associated with your account
Method - GET Path - /domains
Response -
{
"domains": [
{
"name": string,
"active": boolean,
"verified": boolean,
"fallbackUrl": string,
"domainRedirect": string
}
]
}
In response you will get the list of domains associated with your account
Passwordless login with Lnk8 is simple authentication without relying on passwords or any memorised phrases.
All the hosted sites, payment pages, and redirection domains are SSL encrypted on Lnk8. The custom domains connected are provided with an SSL certificate.
At Lnk8, URL redirection always happens closest to your end users, with low latency and high throughput.