The TinyLink API allows you to programmatically create and manage shortened URLs. All API endpoints are accessible via HTTPS and return JSON responses.
Base URL:
https://tlnk.ink/api/
Integrate TinyLink into your applications with our simple REST API
The TinyLink API allows you to programmatically create and manage shortened URLs. All API endpoints are accessible via HTTPS and return JSON responses.
Base URL:
https://tlnk.ink/api/
API authentication is required for Business and Enterprise plans. Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY
Create a new shortened URL.
| Parameter | Type | Required | Description |
|---|---|---|---|
| long_url | string | Yes | The URL to shorten |
| custom_code | string | No | Custom short code (Business+ only) |
curl -X POST https://tlnk.ink/api/shorten \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"long_url": "https://example.com/very-long-url"}'
{
"success": true,
"short_url": "https://tlnk.ink/abc12345",
"long_url": "https://example.com/very-long-url",
"short_code": "abc12345",
"created_at": "2025-01-14T16:30:00Z"
}
Retrieve statistics for a shortened URL.
curl -X GET https://tlnk.ink/api/stats/abc12345 \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"short_code": "abc12345",
"long_url": "https://example.com/very-long-url",
"clicks": 42,
"created_at": "2025-01-14T16:30:00Z"
}
| Plan | Rate Limit |
|---|---|
| Free | 10 requests/minute |
| Standard | 100 requests/minute |
| Business | 1,000 requests/minute |
| Enterprise | Custom |
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Quota exceeded |
| 404 | Not Found - Short code does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |