URL Shortener API - Create Short Links with Click Tracking
Submit a URL and receive a shortened link with an auto-generated or custom slug. Short links redirect via 302 and track click counts. Custom slugs support letters, numbers, hyphens, and underscores. If a slug is already taken, the API returns an error so you can retry with a different one.
Code examples
curl -X POST https://api.botoi.com/v1/short-url/create \
-H "Content-Type: application/json" \
-d '{"url":"https://docs.botoi.com/getting-started","custom_slug":"getting-started"}'When to use this API
Generate trackable short links for marketing campaigns
Create a custom-slug short link for each campaign (e.g., /launch-2026). Use the stats endpoint to track clicks and measure engagement without external analytics tools.
Build a link shortener feature into your SaaS product
Let your users create branded short links from within your app. The API handles slug generation, collision detection, and redirect tracking so you don't need to build that infrastructure.
Frequently asked questions
Do short links expire?
What happens if my custom slug is already taken?
What characters are allowed in custom slugs?
Are click counts tracked automatically?
What type of redirect does the short URL use?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.