KlipLink API

A RESTful API for managing short links.

Authentication

All API requests require an API key. Include it in your request headers:

Authorization: Bearer YOUR_API_KEY

Endpoints

GET /v1/links

Retrieve a list of all links for the authenticated user.

curl -X GET "https://api.klipl.ink/v1/links" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Format

{
  "success": true,
  "links": [
    {
      "short_url": "https://klipl.ink/your-link",
      "destination_url": "https://example.com/",
      "clicks": 255,
      "created_at": "2025-11-06T14:30:00+00:00",
      "title": "Example Link"
    },
    {
      "short_url": "https://link.your-domain.com/custom-link",
      "destination_url": "https://example.com/page",
      "clicks": 128,
      "created_at": "2025-11-05T10:15:00+00:00",
      "title": "Custom Domain Link"
    }
  ]
}

GET /v1/links/{short_url}

Retrieve a single link by its identifier.

curl -X GET "https://api.klipl.ink/v1/links/klipl.ink/your-link" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Format

{
  "success": true,
  "short_url": "https://klipl.ink/your-link",
  "destination_url": "https://example.com/",
  "created_at": "2025-11-06T14:30:00+00:00",
  "clicks": 255,
  "title": "Example Link"
}

POST /v1/links

Create a new short link.

curl -X POST "https://api.klipl.ink/v1/links" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destination_url": "https://example.com/",
    "back_half": "your-link", # This field is optional
    "title": "KlipLink API Guide" # This field is optional
    "domain": "links.your-website.com" # This field is optional
  }'

Response Format

{
  "success": true,
  "short_url": "https://klipl.ink/your-link",
  "destination_url": "https://example.com/",
  "created_at": "2025-11-06T14:30:00+00:00",
  "clicks": 0,
  "title": "KlipLink API Guide"
}

PUT /v1/links/{short_url}

Update an existing short link.

curl -X PUT "https://api.klipl.ink/v1/links/klipl.ink/your-link" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ 
    # At least one of these fields is required
    "destination_url": "https://www.example.com/new-destination",
    "title": "Updated KlipLink API Guide"
  }'

Response Format

{
  "success": true,
  "short_url": "https://klipl.ink/your-link",
  "destination_url": "https://www.example.com/new-destination",
  "clicks": 255,
  "created_at": "2025-11-06T14:30:00+00:00",
  "title": "Updated KlipLink API Guide"
}

DELETE /v1/links/{short_url}

Delete a link permanently.

curl -X DELETE "https://api.klipl.ink/v1/links/klipl.ink/your-link" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Format

{
  "success": true,
  "message": "Link deleted successfully."
}

GET /v1/domains

Get a list of the user's current domains.

curl -X GET "https://api.klipl.ink/v1/domains" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Format

{
  "success": true,
  "domains": [
    {
      "domain": "go.example.com",
      "subdomain": "go",
      "root_domain": "example.com",
      "created_at": "2025-06-14T17:15:50+00:00"
    },
    {
      "domain": "link.your-website.com",
      "subdomain": "link",
      "root_domain": "your-website.com",
      "created_at": "2025-05-10T09:30:00+00:00"
    }
  ]
}

Additional Information

The KlipLink API is currently only available to users with paid plans. It is still experimental and may undergo changes. Please contact us if you encounter any bugs or issues while using this API.

Error codes:

  • 400 - Bad Request
  • 401 - Unauthorized
  • 404 - Not Found
  • 405 - Method Not Allowed
  • 500 - Internal Server Error