URL Shortener
POST/api/shorten
{
"url": "https://maxhealth.tech/products/smart-id",
"slug": "smart-id", // optional, 1–64 chars [A-Za-z0-9_-]
"expires_at": "2026-06-01T00:00:00Z", // optional, ISO 8601 (60s+ in the future)
"max_uses": 100 // optional, positive integer
}
201{
"short_url": "https://go.maxhealth.tech/smart-id",
"slug": "smart-id",
"target_url": "https://maxhealth.tech/products/smart-id",
"expires_at": "2026-06-01T00:00:00.000Z",
"max_uses": 100
}
400 — Missing/invalid URL, bad slug, invalid expiration, or reserved slug403 — Domain not in whitelist409 — Slug already takenGET/:slug
Returns a 302 redirect to the target URL. Clicks are tracked.
Returns 410 Gone if the link has expired or reached its max uses.
http:// and https:// URLs accepted[A-Za-z0-9_-]api, admin, health, docscurl -X POST https://go.maxhealth.tech/api/shorten \
-H "Content-Type: application/json" \
-d '{"url": "https://maxhealth.tech/blog/launch"}'