API Documentation
Integrate LinkSnap with Google Sheets, n8n, Pabbly Connect, or any HTTP client
Quick Setup
1
Set your API key
Set the LINKSNAP_API_KEY environment variable on your deployment
2
Include the API key in requests
Pass it as x-api-key header or Authorization: Bearer <key>
3
Make API calls
Use the endpoints below to create, list, and manage short links
http
// =============================================================
// LinkSnap — REST API Reference
// =============================================================
// Base URL: https://your-domain.com
// Auth: x-api-key header or Authorization: Bearer <key>
// --- Create Link ---
// POST /api/links
// Body: { "url": "https://...", "alias?": "custom", "domain?": "go.example.com", "title?": "My Link" }
// Response: { "id", "short_code", "short_url", "long_url", "domain", "created_at" }
// --- Bulk Create ---
// POST /api/links/bulk
// Body: { "links": [{ "url": "https://...", "alias?": "...", "title?": "..." }], "domain?": "..." }
// Response: { "created": 10, "errors": 0, "results": [{ "short_code", "short_url", "long_url", "id" }] }
// --- List Links ---
// GET /api/links?page=1&limit=20&search=term
// --- Get Link ---
// GET /api/links/:id
// --- Delete Link ---
// DELETE /api/links/:id
// --- List Domains ---
// GET /api/domains
// --- Add Domain ---
// POST /api/domains
// Body: { "domain_name": "go.example.com" }
// --- Delete Domain ---
// DELETE /api/domains/:id