Developer API

Build on
bah.is.

Create links, pull analytics, and generate QR codes — all from your own code. One clean REST API, no overhead.

Quick start

Create a link in one request.

POST /v1/links
curl -X POST https://api.bah.is/v1/links \
  -H "Authorization: Bearer bah_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/very/long/path?with=params",
    "slug": "my-link"
  }'
201 Created
{
  "data": {
    "id": "abc123def456",
    "slug": "my-link",
    "short_url": "https://bah.is/my-link",
    "destination": "https://example.com/very/long/path?with=params",
    "created_at": "2026-03-26T10:00:00Z"
  }
}
Capabilities

What the API covers.

Create links

Create, update, and delete short links programmatically with custom slugs and destinations.

Get analytics

Query click counts, country breakdowns, device types, and referrers for any link in your account.

Generate QR codes

Fetch a production-ready SVG QR code for any short link via a single GET request.

Authentication

Bearer token auth. Simple.

Every request requires an Authorization header with your API key. Generate keys from your dashboard under Settings → API Keys.

Authorization: Bearer bah_live_xxxxxxxxxxxx

Never expose keys in client-side code or public repositories. Keys are scoped per account.

Pro plan required

API access is available on the Pro plan ($19/mo). Includes unlimited links, full analytics, custom domains, and API key management.

View pricing →
Explore API docs

Full OpenAPI 3.1 documentation.