Linkly URL Shortener API
The Linkly URL shortener API (also known as a link shortener API) lets you create and manage short links, track clicks, configure custom domains, and subscribe to webhooks — all programmatically.
You don't need to read this documentation to use the API. The Linkly interface shows the exact API request inline whenever you create a link or pull analytics — just copy and paste it directly into your code or terminal.
Looking for step-by-step guides, tutorials, and FAQs? The Linkly API documentation covers a broader range of topics. This page is the complete endpoint reference.
Authentication
All API requests require an API key. You can find your API key in your Linkly workspace settings.
Pass your API key as a query parameter on every request:
GET https://api.linklyhq.com/api/v1/workspaces?api_key=YOUR_API_KEY
Alternatively, you can authenticate using HTTP Basic Auth with your API key as the username and an empty password, or as a Bearer token:
Authorization: Basic base64(YOUR_API_KEY:)
Authorization: Bearer YOUR_API_KEY
A request with a missing or invalid API key returns 401 with the plain-text body Not authorized. A request for a workspace your key cannot access returns 404 Not found (workspaces you don't belong to are not distinguished from ones that don't exist). Plan- or permission-related failures return 403 with a JSON { "error": "..." } body.
Base URL
https://api.linklyhq.com/api/v1
Workspaces
Most endpoints are scoped to a workspace. Use GET /workspaces to list your available workspaces and retrieve their IDs.
Rate Limits
API requests are rate-limited per API key. When you exceed the limit, the API returns 429 Too Many Requests. Check the response body for your current usage and limit.