Welcome to the nums API. Increment, read, and display counters as JSON, text, or badges.

Base URL

  • Hosted instance: https://nums.advay.ca/
  • Self-host: https://<project>.vercel.app

Authentication

  • Only /hit requires your secret. Send as X-Auth-Token header or ?token= query.
  • Read endpoints (/count, /count.txt, /badge, /badge.json) are public.

Environment

  • SECRET_TOKEN — required for write access to /hit
  • UPSTASH_REDIS_URL and UPSTASH_REDIS_PASSWORD — recommended for persistence (or set REDIS_URL)

Quick examples

curl -H "X-Auth-Token: $SECRET_TOKEN" "https://nums.advay.ca/hit?id=home"
Use your own deployment for POST /hit tests that require your secret.