TailURL

API Documentation

Integrate TailURL into your applications with our powerful REST API. Create, manage, and track URLs programmatically.

Getting Started

Base URL

https://tailurl.com/api/v1

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Create Short URL

POST /urls
Content-Type: application/json

{
  "url": "https://example.com/very/long/url",
  "customSlug": "my-link",
  "title": "My Link",
  "description": "Link description"
}

API Endpoints

URLs

  • POST /urls - Create short URL
  • GET /urls - List URLs
  • GET /urls/:id - Get URL details
  • PUT /urls/:id - Update URL
  • DELETE /urls/:id - Delete URL

Analytics

  • GET /urls/:id/analytics - Get URL analytics
  • GET /analytics/summary - Get account summary

QR Codes

  • POST /qr - Generate QR code
  • GET /qr/:id - Get QR code

Get API Key

Generate your API key from the dashboard to start making requests.

Webhooks

Set up webhooks to receive real-time notifications when URLs are accessed.

Rate Limits

  • Free: 100 requests/hour
  • Starter: 1,000 requests/hour
  • Pro: 10,000 requests/hour
  • Enterprise: Unlimited

SDKs & Examples

JavaScript/Node.js

const response = await fetch(
  'https://tailurl.com/api/v1/urls',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      url: 'https://example.com'
    })
  }
)

Python

import requests

response = requests.post(
    'https://tailurl.com/api/v1/urls',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={'url': 'https://example.com'}
)

cURL

curl -X POST \
  https://tailurl.com/api/v1/urls \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://example.com"}'