Getting Started
Welcome to the lnk24co API documentation. This guide will help you get up and running quickly.
This documentation is available in English only.
Base URL
All API requests should be sent to the following base URL:
https://lnk24.co/api/v1Authentication
Authenticate your API requests by including your API key in the Authorization header as a Bearer token. Authorization
curl https://lnk24.co/api/v1/links \
-H "Authorization: Bearer lnk_live_abc123def456" \
-H "Content-Type: application/json"You can generate API keys in your dashboard settings. Keep your keys secure and never expose them in client-side code. dashboard settings
Create Your First Link
Here is a complete example of creating a short link via the API:
curl -X POST https://lnk24.co/api/v1/links \
-H "Authorization: Bearer lnk_live_abc123def456" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/my-very-long-url-here",
"custom_code": "my-link",
"title": "My First Short Link",
"tags": "marketing,launch"
}'Response Format
All API responses are returned in JSON format. Successful responses include a "data" field. Errors include an "error" field with a message and code.
// Success response
{
"data": {
"id": "lnk_abc123",
"short_url": "https://lnk24.co/my-link",
"url": "https://example.com/my-very-long-url-here",
"clicks": 0,
"created_at": "2026-03-15T10:30:00Z"
}
}
// Error response
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The url field is required."
}
}Pagination
List endpoints support cursor-based pagination using "cursor" and "limit" query parameters. The default page size is 25 and the maximum is 100.
GET /v1/links?limit=10&cursor=eyJpZCI6Imxua18xMjM0NSJ9
{
"data": [...],
"pagination": {
"next_cursor": "eyJpZCI6Imxua18xMjM1NSJ9",
"has_more": true
}
}Quick Links
Jump to common API endpoints: