Endpoint

https://tyny.to/api/


Endpoint: /links/create
Method: POST

Headers
  • Authorization :
  • Content-Type: application/json:
  • string 'url' :
  • bool 'enableTracking' (optional):
  • bool 'enablePassword' (optional):
  • string 'password' (optional)
  • string 'custom' (optional):
curl -X POST https://tyny.to/api/links/create \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com", "enableTracking":true, "enablePassword":false, "custom":"mycustomlink"}'
  • 200 OK:
  • 400 Bad Request:
  • 401 Unauthorized:

List Links

Endpoint: /links/list
Method: GET

Headers
  • Authorization :
curl -X GET https://tyny.to/api/links/list \
-H "Authorization: your_api_key"
  • 200 OK:
  • 400 Bad Request:
  • 401 Unauthorized:
Response Example
{
    "success": true,
    "list": {
        "12b7d": {
            "statsUrl": "https://tyny.to/get/04afg67a-4d85-4f50-98b2-7d12a35fb311",
            "shortnedUrl": "https://tyny.to/12b7d",
            "originalUrl": "https://example1.com/longurl",
            "totalVisitors": 10,
            "uniqueVisitors": 8
        },
        "f2103": {
            "statsUrl": "https://tyny.to/get/1def9cdf-2f84-422e-a5fd-7cf7a58b05c1",
            "shortnedUrl": "https://tyny.to/f2103",
            "originalUrl": "https://example2.com/longurl",
            "totalVisitors": 12,
            "uniqueVisitors": 3
        }
    }
}