bito.li

bito.li docs

Build with bito.li

Everything you need to shorten links, read click statistics and manage your links, whether you use the website or call the HTTP API from your own code. No API key or sign-up is required to get started.

Base URL https://bito.li/api

Quickstart

Shorten your first link with a single request. The response includes the short URL and a secret code that lets you manage the link later.

  1. 1

    Send a request

    POST the destination to /api/links as JSON. No authentication is needed.

  2. 2

    Keep the secret code

    The secretCode in the response is shown only once. Store it to view stats, edit or delete the link.

  3. 3

    Share the short URL

    Use shortUrl anywhere. Clicks appear on the stats page at statsUrl.

curl -X POST 'https://bito.li/api/links' \
  -H 'Content-Type: application/json' \
  -d '{
  "originalUrl": "https://example.com/spring-sale?utm_source=newsletter"
}'
Response · 201
{
  "originalUrl": "https://example.com/spring-sale?utm_source=newsletter",
  "shortUrl": "https://bito.li/Xk3b9",
  "shortCode": "Xk3b9",
  "statsUrl": "https://bito.li/d/Xk3b9",
  "clicks": 0,
  "expiresAt": null,
  "maxClicks": null,
  "controlMode": "full",
  "secretCode": "s-3f9-a1c-07b",
  "password": null,
  "userId": null
}

Key concepts

Need help?

Found something unclear or a behaviour that doesn’t match these docs? Write to [email protected] and include the request you sent and the errorKey you received.