Short URL Stats API - GET /short-url/{slug}/stats
REST-convention read endpoint. Pass the short-URL slug in the path and receive the click counter, original URL, and creation timestamp. Clicks increment in real time as redirects happen through /v1/short-url/r/{slug}. Returns 404 NOT_FOUND when the slug does not exist.
Code examples
curl -X POST https://api.botoi.com/v1/short-url/{slug}/stats \
-H "Content-Type: application/json" \
-d '{"slug":"getting-started"}'When to use this API
Dashboard widgets for link performance
Render a "Top links this week" card in your admin panel by GETting stats for each slug. GET makes the response cacheable at your browser or CDN with a short max-age.
Bot-driven click reports
Schedule a daily job that hits GET /v1/short-url/{slug}/stats for every campaign slug and posts a summary in Slack. The per-slug path makes it trivial to parallelize.
Threshold-based alerts
Poll the endpoint and fire an alert the first time clicks crosses 1,000 for a promo link. Use the created_at field to compute the time-to-threshold for marketing reports.
Frequently asked questions
Why the /{slug}/stats path shape?
How real-time are click counts?
Does GET count as a click?
What happens when the slug is unknown?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.