URL Shortener API

URL Shortener API

In this blog post, we’ll be discussing the T.LY URL Shortener API. This API allows developers to create, manage, and track links. We’ll go over the features of the API and how to use it.

Creating a Link

The first thing you need to do is create a link. To do this, you’ll need to make a POST request to the /link/shorten endpoint. The body of the request should include the following parameters:

long_url: the long URL you want to shorten
domain (optional): the domain you want to use for the shortened URL. We’ll use our default domain if you don’t specify a domain (https://t.ly).

Here’s an example request body:

{ 
"long_url": "https://www.google.com", 
"domain": "https://example.com"
}

Managing Links

Once you’ve created a link, you can view information about that link by making a GET request to the /link endpoint, with the {short_url} as a parameter of the link you want to view information about. This endpoint will return information such as the date the link was created, the expiration date, QR code info, etc.

To view the stats about that link, make a GET request to the /link/stats endpoint, with the {short_url} as a parameter of the link you want to view the stats for. This endpoint will return information such as the number of clicks, unique clicks, and other additional analytics.

Finally, if you want to delete a link, you can make a DELETE request to the /link endpoint with the {short_url} in the request’s body. This endpoint will return information about the deleted link, including when it was deleted and how many clicks it had received up until that point.

The T.LY URL Shortener API is an excellent way for developers to create and manage short links. With this API, they can create short links and track how many people are clicking on them. Developers can also update and delete links as needed. The API documentation includes examples of how to use it in Javascript, Bash, Python, and PHP. Reach out to support if you need additional help implementing the API.


Author Tim Leland

Tim Leland

With over 15 years of experience, Tim Leland has been developing software that millions worldwide rely on. In 2019, he founded T.LY, aspiring to create the world's premier URL-shortening service. Recently, the platform has witnessed a remarkable increase in its popularity. Under Tim's expert direction, T.LY has transformed into one of the industry's most reliable and esteemed URL shorteners, serving millions of users globally.

Ready to improve how you manage links?

T.LY URL Shortener makes long links look cleaner and easier to share! Add your own Custom Domains to personalize your brand. Create Smart Links to customize a URL's destination. Generate QR codes to promote your business.

Sign Up for Free
About T.LY
T.LY is the best link management service to track, brand, and share short URLs. Install our free Browser Extension with over 450,000 users from the extension store to automatically shorten links in one easy click! We support Chrome, Firefox, Edge and Opera.