All API requests require an API key. Pass it as X-API-Key header or ?api=YOUR_KEY query parameter.
Get your API key from Settings.
Shorten a URL
url | Required. The URL to shorten |
alias | Optional. Custom alias |
curl -X POST https://downlx.com/api/v1/shorten \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"url": "https://example.com"}'
{
"short": "https://downlx.com/abc12",
"alias": "abc12",
"url": "https://example.com"
}
Get all your links
curl https://downlx.com/api/v1/links?api=YOUR_API_KEY
Get stats for a specific link
curl https://downlx.com/api/v1/stats/1?api=YOUR_API_KEY