API v1

API Documentation

Integrate URL shortening into your applications

Your API Credentials

Login to get your personal API key.

Login

Overview

The ShortLink API allows you to programmatically shorten URLs. Each request consumes 1 credit. You need a valid API key and sufficient credits.

Endpoint

POST https://www.shortboss.kypro.top/api/v1/shorten.php

Also supports GET requests. Accepts both JSON and form data.

Parameters

ParameterTypeRequiredDescription
api_keyStringYesYour API key
urlStringYesThe URL to shorten
aliasStringNoCustom alias (requires plan with alias support)
passwordStringNoPassword protect (requires plan with password protection)

Example: cURL

# Shorten a URL using POST
curl -X POST https://www.shortboss.kypro.top/api/v1/shorten.php \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","url":"https://example.com/very-long-url"}'

Example: JavaScript

const response = await fetch('https://www.shortboss.kypro.top/api/v1/shorten.php', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    url: 'https://example.com/very-long-url'
  })
});
const data = await response.json();
console.log(data.short_url);

Example: Python

import requests

response = requests.post('https://www.shortboss.kypro.top/api/v1/shorten.php', json={
  'api_key': 'YOUR_API_KEY',
  'url': 'https://example.com/very-long-url'
})
print(response.json()['short_url'])

Success Response

{
  "success": true,
  "short_url": "https://www.shortboss.kypro.top/abc123",
  "original_url": "https://example.com/very-long-url",
  "credits_remaining": 49,
  "code": 200
}

Error Responses

// Invalid API Key (401)
{ "error": "Invalid API key", "code": 401 }

// Insufficient Credits (402)
{ "error": "Insufficient credits...", "code": 402 }

// No API Access (403)
{ "error": "API access not available...", "code": 403 }

Credit System

PlanCreditsCost per Request
Free 40 1 credit
Starter 50 1 credit
Growth 200 1 credit
Premium 100,000 1 credit
Business 5,000,000 1 credit

Credits are granted when you purchase a subscription. Admin can also manually add credits.