NAV
shell javascript python

Introduction

Welcome to the Shortedlink API! You can use our API to access Shortedlink's features, you can create & manage link(s), get their stats and analytics and more!

We have language bindings in Shell, Javascript, and Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Version: 0.1

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "API_KEY: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const axios = require("axios");

const api = axios.create({
  baseURL: 'https://www.shortedlink.com/api/v1',
  timeout: 1000,
  headers: {'api_key': 'f492GVDIK1bzTJsMCyx7U1PfNyemEY'}
});
import requests

HEADERS = {"api_key": "f492GVDIK1bzTJsMCyx7U1PfNyemEY"}

Make sure to replace f492GVDIK1bzTJsMCyx7U1PfNyemEY with your API key.

Shortedlink uses API keys to allow access to the API. You can get your Shortedlink API key from your shortedlink dashboard.

Shortedlink expects the API key to be included in all API requests to the server in a header that looks like the following:

API_KEY: f492GVDIK1bzTJsMCyx7U1PfNyemEY

Shortlink

This endpoint creates a shortlink

curl -H 'Content-Type: application/json' \
     -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY" \ 
     -X POST \
     -d '{"config": {}}' \
     https://www.shortedlink.com/api/v1/link
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "link": ""
}

HTTP Request

POST https://www.shortedlink.com/api/v1/link

Body Parameters

Parameter Description
config Shortlink's configuration
type Shortlink's type
method Shortlink's method
status Shortlink's status

This endpoint retrieves the basic information of a shortlink

curl "https://www.shortedlink.com/api/v1/link/[id]" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "link": {
            "id": "",
            "config": {
                "token": "",
                "domain": ""
            },
            "type": {
                "name": "",
                "payload": {
                }
            },
            "method": {
                "name": "",
                "addons": {}
            },
            "createdAt": "",
            "status": "",
            "ownerId": "",
            "totalEngagements": 0,
            "domainId": null,
            "domain": null
        }
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]

Query Parameters

Parameter Description
id Shortlink's id

Get Engagements Stats

This endpoint retrieves a shortlink's engagements stats

curl "https://www.shortedlink.com/api/v1/link/[id]/stats/engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/engagements

Query Parameters

Parameter Description
id Shortlink's id

Get Referrers Stats

This endpoint retrieves a shortlink's referrers stats

curl "https://www.shortedlink.com/api/v1/link/[id]/stats/referrers" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "referrers": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/referrers

Query Parameters

Parameter Description
id Shortlink's id

Get Devices Stats

This endpoint retrieves a shortlink's devices stats

curl "https://www.shortedlink.com/api/v1/link/[id]/stats/devices" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "devices": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/devices

Get Languages Stats

This endpoint retrieves a shortlink's languages stats

curl "https://www.shortedlink.com/api/v1/link/[id]/stats/languages" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "languages": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/languages

Query Parameters

Parameter Description
id Shortlink's id

Get Locations Stats

This endpoint retrieves a shortlink's locations stats

curl "https://www.shortedlink.com/api/v1/link/[id]/stats/locations" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "locations": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/locations

Query Parameters

Parameter Description
id Shortlink's id

Get Total Engagements Analytics

This endpoint retrieves a shortlink's total engagements analytics

curl "https://www.shortedlink.com/api/v1/link/[id]/analytics/total-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "increase": "",
    "percentageIncrease": ""
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/total-engagements

Query Parameters

Parameter Description
id Shortlink's id

Get Bot Engagements Analytics

This endpoint retrieves a shortlink's bot engagements analytics

curl "https://www.shortedlink.com/api/v1/link/[id]/analytics/bot-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "increase": "",
    "percentageIncrease": ""
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/bot-engagements

Query Parameters

Parameter Description
id Shortlink's id

Get Unique Engagements Analytics

This endpoint retrieves a shortlink's unique engagements analytics

curl "https://www.shortedlink.com/api/v1/link/[id]/analytics/unique-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "increase": "",
    "percentageIncrease": ""
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/unique-engagements

Query Parameters

Parameter Description
id Shortlink's id

Get VPN Engagements Analytics

This endpoint retrieves a shortlink's VPN engagements analytics

curl "https://www.shortedlink.com/api/v1/link/[id]/analytics/vpn-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "increase": "",
    "percentageIncrease": ""
}

HTTP Request

GET https://www.shortedlink.com/api/v1/link/[id]/stats/vpn-engagements

Query Parameters

Parameter Description
id Shortlink's id

This endpoint updates a shortlink

curl "https://www.shortedlink.com/api/v1/link/[id]/analytics/total-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
}

HTTP Request

PATCH https://www.shortedlink.com/api/v1/link/[id]

Query Parameters

Parameter Description
id Shortlink's id

Body Parameters

Parameter Description
config Shortlink's configuration
type Shortlink's type
method Shortlink's method
status Shortlink's status

This endpoint deletes a shortlink

curl "https://www.shortedlink.com/api/v1/link/[id]/analytics/total-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
}

HTTP Request

DELETE https://www.shortedlink.com/api/v1/link/[id]

Query Parameters

Parameter Description
id Shortlink's id

Shortlinks

Description: Get the basic information about all your shortlinks

curl "https://www.shortedlink.com/api/v1/links" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "links": [
        {
            "id": "",
            "config": {
                "token": "",
                "domain": ""
            },
            "type": {
                "name": "",
                "payload": {
                    "longUrl": ""
                }
            },
            "method": {
                "name": "",
                "addons": {}
            },
            "createdAt": "2023-07-22T07:40:28.417Z",
            "status": "",
            "ownerId": "",
            "totalEngagements": 1,
            "domainId": null,
            "domain": null
        },
    ],
    "total": 1
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links

Query Parameters

Parameter Default
skip 0
take 10

Get Engagements Stats

This endpoint retrieves all shortlinks engagements stats

curl "https://www.shortedlink.com/api/v1/links/stats/engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/stats/engagements

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Referrers Stats

This endpoint retrieves all shortlinks referrers stats

curl "https://www.shortedlink.com/api/v1/links/stats/referrers" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/stats/referrers

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Devices Stats

This endpoint retrieves all shortlinks devices stats

curl "https://www.shortedlink.com/api/v1/links/stats/devices" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "devices": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/stats/devices

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Languages Stats

This endpoint retrieves all shortlinks languages stats

curl "https://www.shortedlink.com/api/v1/links/stats/languages" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "languages": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/stats/languages

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Locations Stats

This endpoint retrieves all shortlinks locations stats

curl "https://www.shortedlink.com/api/v1/links/stats/locations" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/stats/locations

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Average Engagements Analytics

This endpoint retrieves all shortlinks average engagements Analytics

curl "https://www.shortedlink.com/api/v1/links/analytics/average-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/analytics/average-engagements

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Bot Engagements Analytics

This endpoint retrieves all shortlinks bot engagements Analytics

curl "https://www.shortedlink.com/api/v1/links/analytics/bot-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "bots": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/analytics/bot-engagements

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Created Analytics

This endpoint retrieves all shortlinks created analytics

curl "https://www.shortedlink.com/api/v1/links/analytics/created" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/analytics/created

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Total Engagements Analytics

This endpoint retrieves all shortlinks total engagements analytics

curl "https://www.shortedlink.com/api/v1/links/analytics/total-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/analytics/total-engagements

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get Unique Engagements Analytics

This endpoint retrieves all shortlinks unique engagements analytics

curl "https://www.shortedlink.com/api/v1/links/analytics/unique-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/analytics/unique-engagements

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Get VPN Engagements Analytics

This endpoint retrieves all shortlinks VPN engagements analytics

curl "https://www.shortedlink.com/api/v1/links/analytics/vpn-engagements" \
  -H "api_key: f492GVDIK1bzTJsMCyx7U1PfNyemEY"
const kittn = require("kittn");

let api = kittn.authorize("meowmeowmeow");
let kittens = api.kittens.get();

The above command returns JSON structured like this:

{
    "success": true,
    "engagements": {}
}

HTTP Request

GET https://www.shortedlink.com/api/v1/links/analytics/vpn-engagements

Query Parameters

Parameter Description
link_type shortlink or linkpage or all

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.