tcgo.co.za URL Shortener REST API
Protected endpoints require an API key
via the x-api-key header.
x-api-key: tcgo-hc-xxxxxxxx
Read-only endpoints (list, stats, search, health) are open. Mutating endpoints (create, edit, delete) require a key.
requires api key
Create a short link.
{
"short_code": "mylink",
"url": "https://example.com",
"go_set": "campaign_q2",
"hits_expires": 1000,
"time_expires": "2026-12-31 23:59:59",
"password": "optional",
"split_variants": ["https://a.com", "https://b.com"],
"split_weights": [70, 30]
}
List all links. Query params:
go_set, limit (50),
offset (0).
Link stats: hits, geo breakdown, A/B split results.
Search by code, URL, or GoSet.
requires api key
Update target URL.
{"url": "https://new-target.com"}
requires api key
Delete a link.
Redirect to target URL (303). Appends UTM params if present.
Preview page with QR code, stats, and "Go to link" button.
Branded QR code PNG.
Analytics dashboard (HTML). Auto-refreshes every 30s.
Service status with heatmap.
?format=json for JSON.
Bulk CSV import form.
Health check with uptime, link counts, click counts, system metrics.