API Documentation

Integrate Koly into your applications with our RESTful API. Create, manage, and track short links programmatically.

Base URL: https://koly.com.tr/api/v1

Authentication: Bearer token using your API key

Required Plan: Pro or Team

Authentication

All API requests require authentication using an API key. You can generate API keys from your account settings.

Include your API key in the Authorization header:

Authorization: Bearer koly_your_api_key_here
POST

Create a new short link.

Request Body

ParameterTypeRequiredDescription
urlstringYesThe destination URL to shorten
slugstringNoCustom slug (auto-generated if not provided)
titlestringNoA title for the link

Example Request

curl -X POST https://koly.com.tr/api/v1/links \
  -H "Authorization: Bearer koly_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/very-long-url",
    "slug": "my-link",
    "title": "My Example Link"
  }'

Example Response

{
  "data": {
    "id": "clx1234567890",
    "url": "https://example.com/very-long-url",
    "slug": "my-link",
    "shortUrl": "https://koly.com.tr/s/my-link",
    "title": "My Example Link",
    "createdAt": "2026-02-10T12:00:00.000Z"
  }
}
GET

Retrieve a paginated list of your short links.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger20Items per page (max 100)

Example Request

curl https://koly.com.tr/api/v1/links?page=1&limit=10 \
  -H "Authorization: Bearer koly_your_api_key"

Example Response

{
  "data": [
    {
      "id": "clx1234567890",
      "url": "https://example.com",
      "slug": "my-link",
      "shortUrl": "https://koly.com.tr/s/my-link",
      "title": "My Example Link",
      "clicks": 142,
      "createdAt": "2026-02-10T12:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1
  }
}
GET

Retrieve details for a specific link.

Example Request

curl https://koly.com.tr/api/v1/links/clx1234567890 \
  -H "Authorization: Bearer koly_your_api_key"
DELETE

Delete a short link permanently.

Example Request

curl -X DELETE https://koly.com.tr/api/v1/links/clx1234567890 \
  -H "Authorization: Bearer koly_your_api_key"

Example Response

{
  "data": {
    "deleted": true
  }
}

Error Codes

Status CodeDescription
200Success
201Created successfully
400Bad request - missing required fields
401Unauthorized - invalid or missing API key
403Forbidden - plan does not support this feature
404Not found
409Conflict - slug already taken
500Internal server error

Rate Limits

PlanRate Limit
Pro100 requests/minute
Team500 requests/minute

Ready to integrate?

Sign up for a Pro or Team plan to get your API key and start building.