MENU navbar-image

Introduction

T.LY URL Shortener API documentation to create URLs to track, brand, and share short links. This documentation aims to provide all the information you need to work with our API. Please contact [email protected] if you have any issues.

API docs for T.LY.

Base URL

https://t.ly

Authenticating requests

Authenticate requests to this API's endpoints by sending an Authorization header api_token in the request.

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Please sign in and generate an API Token to begin using the API.

Pixel Management

APIs for managing pixels

requires authentication

Example request:
curl --request POST \
    "https://t.ly/api/v1/link/pixel" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"GTMPixel\",
    \"pixel_id\": \"GTM-xxxx\",
    \"pixel_type\": \"googleTagManager\"
}"
const url = new URL(
    "https://t.ly/api/v1/link/pixel"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "GTMPixel",
    "pixel_id": "GTM-xxxx",
    "pixel_type": "googleTagManager"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://t.ly/api/v1/link/pixel',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'GTMPixel',
            'pixel_id' => 'GTM-xxxx',
            'pixel_type' => 'googleTagManager',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/pixel'
payload = {
    "name": "GTMPixel",
    "pixel_id": "GTM-xxxx",
    "pixel_type": "googleTagManager"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "id": 12345,
    "name": "GTMPixel",
    "pixel_id": "GTM-xxxx",
    "pixel_type": "googleTagManager",
    "created_at": "2024-01-16T19:32:20.000000Z",
    "updated_at": "2024-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request GET \
    --get "https://t.ly/api/v1/link/pixel" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/pixel"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://t.ly/api/v1/link/pixel',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/pixel'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


[
    {
        "id": 12345,
        "name": "GTM Pixel",
        "pixel_id": "GTM-xxxx",
        "pixel_type": "googleTagManager",
        "created_at": "2024-01-16T19:32:20.000000Z",
        "updated_at": "2024-01-16T19:32:20.000000Z"
    }
]
 

requires authentication

Example request:
curl --request GET \
    --get "https://t.ly/api/v1/link/pixel/12345" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/pixel/12345"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://t.ly/api/v1/link/pixel/12345',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/pixel/12345'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 12345,
    "name": "GTMPixel",
    "pixel_id": "GTM-xxxx",
    "pixel_type": "googleTagManager",
    "created_at": "2024-01-16T19:32:20.000000Z",
    "updated_at": "2024-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request PUT \
    "https://t.ly/api/v1/link/pixel/aut" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 12345,
    \"name\": \"GTMPixel\",
    \"pixel_id\": \"GTM-xxxx\",
    \"pixel_type\": \"googleTagManager\"
}"
const url = new URL(
    "https://t.ly/api/v1/link/pixel/aut"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 12345,
    "name": "GTMPixel",
    "pixel_id": "GTM-xxxx",
    "pixel_type": "googleTagManager"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://t.ly/api/v1/link/pixel/aut',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => 12345,
            'name' => 'GTMPixel',
            'pixel_id' => 'GTM-xxxx',
            'pixel_type' => 'googleTagManager',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/pixel/aut'
payload = {
    "id": 12345,
    "name": "GTMPixel",
    "pixel_id": "GTM-xxxx",
    "pixel_type": "googleTagManager"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "id": 12345,
    "name": "GTMPixel",
    "pixel_id": "GTM-xxxx",
    "pixel_type": "googleTagManager",
    "created_at": "2024-01-16T19:32:20.000000Z",
    "updated_at": "2024-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request DELETE \
    "https://t.ly/api/v1/link/pixel/12345" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/pixel/12345"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://t.ly/api/v1/link/pixel/12345',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/pixel/12345'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (202):


{}
 

Short Link Management

APIs for managing short links

requires authentication

Example request:
curl --request POST \
    "https://t.ly/api/v1/link/shorten" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"long_url\": \"http:\\/\\/example.com\\/\",
    \"domain\": \"https:\\/\\/t.ly\\/\",
    \"expire_at_datetime\": \"2035-01-17 15:00:00\",
    \"description\": \"Social Media Link\",
    \"public_stats\": true
}"
const url = new URL(
    "https://t.ly/api/v1/link/shorten"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "long_url": "http:\/\/example.com\/",
    "domain": "https:\/\/t.ly\/",
    "expire_at_datetime": "2035-01-17 15:00:00",
    "description": "Social Media Link",
    "public_stats": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://t.ly/api/v1/link/shorten',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'long_url' => 'http://example.com/',
            'domain' => 'https://t.ly/',
            'expire_at_datetime' => '2035-01-17 15:00:00',
            'description' => 'Social Media Link',
            'public_stats' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/shorten'
payload = {
    "long_url": "http:\/\/example.com\/",
    "domain": "https:\/\/t.ly\/",
    "expire_at_datetime": "2035-01-17 15:00:00",
    "description": "Social Media Link",
    "public_stats": true
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "short_url": "https://t.ly/c55j",
    "description": null,
    "long_url": "https://weatherextension.com/",
    "domain": "https://t.ly/",
    "short_id": "c55j",
    "expire_at_views": null,
    "expire_at_datetime": null,
    "public_stats": false,
    "created_at": "2022-01-16T19:32:20.000000Z",
    "updated_at": "2022-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request GET \
    --get "https://t.ly/api/v1/link?short_url=https%3A%2F%2Ft.ly%2Fc55j" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link"
);

const params = {
    "short_url": "https://t.ly/c55j",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://t.ly/api/v1/link',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'short_url'=> 'https://t.ly/c55j',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link'
params = {
  'short_url': 'https://t.ly/c55j',
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
 "short_url": "https://t.ly/c55j",
 "long_url": "https://weatherextension.com/",
 "domain": "https://t.ly/",
 "short_id": "c55j",
 "expire_at_views": null,
 "expire_at_datetime": null,
 "public_stats": false,
 "qr_code_url": "https://t.ly/qr?url=https://t.ly/c55j",
 "qr_code_base64": "data:image/png;base64,iVBORw0KGgoA..."
 "tags": []
 "pixels": []
}
 

requires authentication

Example request:
curl --request PUT \
    "https://t.ly/api/v1/link" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"short_url\": \"https:\\/\\/t.ly\\/OYXL\",
    \"long_url\": \"https:\\/\\/weatherextension.com\\/\",
    \"expire_at_datetime\": \"2035-01-17 15:00:00\",
    \"description\": \"Social Media Link\",
    \"public_stats\": true
}"
const url = new URL(
    "https://t.ly/api/v1/link"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "short_url": "https:\/\/t.ly\/OYXL",
    "long_url": "https:\/\/weatherextension.com\/",
    "expire_at_datetime": "2035-01-17 15:00:00",
    "description": "Social Media Link",
    "public_stats": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://t.ly/api/v1/link',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'short_url' => 'https://t.ly/OYXL',
            'long_url' => 'https://weatherextension.com/',
            'expire_at_datetime' => '2035-01-17 15:00:00',
            'description' => 'Social Media Link',
            'public_stats' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link'
payload = {
    "short_url": "https:\/\/t.ly\/OYXL",
    "long_url": "https:\/\/weatherextension.com\/",
    "expire_at_datetime": "2035-01-17 15:00:00",
    "description": "Social Media Link",
    "public_stats": true
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "short_url": "https://t.ly/c55j",
    "description": null,
    "long_url": "https://weatherextension.com/",
    "domain": "https://t.ly/",
    "short_id": "c55j",
    "expire_at_views": null,
    "expire_at_datetime": null,
    "public_stats": false,
    "created_at": "2022-01-16T19:32:20.000000Z",
    "updated_at": "2022-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request DELETE \
    "https://t.ly/api/v1/link" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"short_url\": \"https:\\/\\/t.ly\\/OYXL\"
}"
const url = new URL(
    "https://t.ly/api/v1/link"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "short_url": "https:\/\/t.ly\/OYXL"
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://t.ly/api/v1/link',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'short_url' => 'https://t.ly/OYXL',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link'
payload = {
    "short_url": "https:\/\/t.ly\/OYXL"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()

Example response (202):


{}
 

requires authentication

Example request:
curl --request POST \
    "https://t.ly/api/v1/link/expand" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"short_url\": \"https:\\/\\/t.ly\\/OYXL\",
    \"password\": \"password123\"
}"
const url = new URL(
    "https://t.ly/api/v1/link/expand"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "short_url": "https:\/\/t.ly\/OYXL",
    "password": "password123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://t.ly/api/v1/link/expand',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'short_url' => 'https://t.ly/OYXL',
            'password' => 'password123',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/expand'
payload = {
    "short_url": "https:\/\/t.ly\/OYXL",
    "password": "password123"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "long_url": "http: //example.com/",
    "expired": false
}
 

requires authentication

Example request:
curl --request GET \
    --get "https://t.ly/api/v1/link/list?search=amazon&tag_ids[]=1&pixel_ids[]=1&start_date=2035-01-17+15%3A00%3A00&end_date=2037-01-17+15%3A00%3A00&domains[]=1" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/list"
);

const params = {
    "search": "amazon",
    "tag_ids[]": "1",
    "pixel_ids[]": "1",
    "start_date": "2035-01-17 15:00:00",
    "end_date": "2037-01-17 15:00:00",
    "domains[]": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://t.ly/api/v1/link/list',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search'=> 'amazon',
            'tag_ids[]'=> '1',
            'pixel_ids[]'=> '1',
            'start_date'=> '2035-01-17 15:00:00',
            'end_date'=> '2037-01-17 15:00:00',
            'domains[]'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/list'
params = {
  'search': 'amazon',
  'tag_ids[]': '1',
  'pixel_ids[]': '1',
  'start_date': '2035-01-17 15:00:00',
  'end_date': '2037-01-17 15:00:00',
  'domains[]': '1',
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
"current_page": 1,
"data": [
   {
       "description": null,
       "long_url": "https:\/\/google.com\/",
       "short_url": "https:\/\/t.ly\/1234",
       "domain": "https:\/\/t.ly\/",
       "short_id": "1234",
       "user_id": 1,
       "team_id": 1,
       "domain_id": null,
       "expire_at_datetime": null,
       "expire_at_views": null,
       "public_stats": false,
       "meta": {
           "smart_urls": []
       },
       "created_at": "2024-03-12T13:24:52.000000Z",
       "updated_at": "2024-03-12T13:24:52.000000Z",
       "has_password": false,
       "short_stats": null,
       "user": {
           "id": 1,
           "name": "Tim",
           "email": "[email protected]",
       },
       "qr_code": null,
       "tags": [],
       "pixels": []
   }
]
}
 

Stats Management

APIs for managing stats

requires authentication

Example request:
curl --request GET \
    --get "https://t.ly/api/v1/link/stats?short_url=https%3A%2F%2Ft.ly%2FOYXL" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/stats"
);

const params = {
    "short_url": "https://t.ly/OYXL",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://t.ly/api/v1/link/stats',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'short_url'=> 'https://t.ly/OYXL',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/stats'
params = {
  'short_url': 'https://t.ly/OYXL',
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "clicks": 0,
    "unique_clicks": 0,
    "browsers": [],
    "countries": [],
    "referrers": [],
    "platforms": [],
    "daily_clicks": [],
    "data": {
        "description": null,
        "long_url": "https://weatherextension.com/",
        "short_url": "https://t.ly/c55j",
        "created_at": "2022-01-16T19:10:36.000000Z"
    }
}
 

Tag Management

APIs for managing tags

requires authentication

Example request:
curl --request GET \
    --get "https://t.ly/api/v1/link/tag" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/tag"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://t.ly/api/v1/link/tag',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/tag'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


[
    {
        "id": 12345,
        "tag": "fall2024",
        "created_at": "2024-01-16T19:32:20.000000Z",
        "updated_at": "2024-01-16T19:32:20.000000Z"
    }
]
 

requires authentication

Example request:
curl --request POST \
    "https://t.ly/api/v1/link/tag" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tag\": \"fall2024\"
}"
const url = new URL(
    "https://t.ly/api/v1/link/tag"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tag": "fall2024"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://t.ly/api/v1/link/tag',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tag' => 'fall2024',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/tag'
payload = {
    "tag": "fall2024"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "id": 12345,
    "tag": "fall2024",
    "created_at": "2024-01-16T19:32:20.000000Z",
    "updated_at": "2024-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request GET \
    --get "https://t.ly/api/v1/link/tag/12345" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/tag/12345"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://t.ly/api/v1/link/tag/12345',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/tag/12345'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 12345,
    "tag": "fall2024",
    "created_at": "2025-01-16T19:32:20.000000Z",
    "updated_at": "2025-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request PUT \
    "https://t.ly/api/v1/link/tag/12345" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tag\": \"fall2025\"
}"
const url = new URL(
    "https://t.ly/api/v1/link/tag/12345"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tag": "fall2025"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://t.ly/api/v1/link/tag/12345',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tag' => 'fall2025',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/tag/12345'
payload = {
    "tag": "fall2025"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "id": 12345,
    "tag": "fall2025",
    "created_at": "2025-01-16T19:32:20.000000Z",
    "updated_at": "2025-01-16T19:32:20.000000Z"
}
 

requires authentication

Example request:
curl --request DELETE \
    "https://t.ly/api/v1/link/tag/12345" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://t.ly/api/v1/link/tag/12345"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://t.ly/api/v1/link/tag/12345',
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://t.ly/api/v1/link/tag/12345'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (202):


{}