API quickstart

Programmatic access to your links + analytics. Five endpoints, bearer auth, JSON in/out. From signup to first POST in 90 seconds.

BlinkLink ships a small REST API for everything the dashboard does. Full reference at /api with curl examples; this guide is the friendlier intro.

Step 1: Mint an API key

  • Settings → API keys → + New key.
  • Give it a name (e.g. "production server").
  • Copy the key: it starts with blnk_live_. You'll never see it again after this screen.

Free accounts get 1 read-only key (GET only). Pro gets 5 keys with full read/write.

Step 2: Your first request

List your links:

curl https://bnkl.me/api/v1/links \
  -H "Authorization: Bearer blnk_live_..."

Create a new link (Pro):

curl -X POST https://bnkl.me/api/v1/links \
  -H "Authorization: Bearer blnk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com", "slug": "hello" }'

Delete a link (Pro):

curl -X DELETE https://bnkl.me/api/v1/links/hello \
  -H "Authorization: Bearer blnk_live_..."

Step 3: Read analytics

curl 'https://bnkl.me/api/v1/links/hello/stats?range=30d' \
  -H "Authorization: Bearer blnk_live_..."

Returns total clicks + QR scans for the window, per-day series, and top countries / browsers / devices. Same shape the dashboard charts use.

Rate limits

  • Free: 30 read requests / minute / key.
  • Pro: 200 requests / minute / key.
  • Past the limit: HTTP 429 with a Retry-After header. Back off and retry; the dashboard's own rate-limit code handles this automatically.

OpenAPI spec

The full machine-readable spec lives at https://bnkl.me/openapi.yaml; drop it into Postman, Insomnia, or your codegen tool of choice. The /api page on the site has a Download button that grabs the same file.

Error responses

  • 400: body invalid (URL missing, slug malformed).
  • 401: bearer token missing or revoked.
  • 403: token authenticated but the user isn't on Pro (write endpoints only).
  • 404: link not found / not visible to this token.
  • 409: slug already taken.
  • 429: rate-limited.