API Documentation

go.maxhealth.tech

URL Shortener

Create a Short Link

POST/api/shorten

Request

{
  "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
}

Response 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
}

Errors

Redirect

GET/: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.

Rules

Example

curl -X POST https://go.maxhealth.tech/api/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://maxhealth.tech/blog/launch"}'