API

Everything the app does, over plain JSON. Create a token in Settings → API and send it as a bearer token. Short links keep working at /bitlyisdead/s/<code>; QR scans are counted when the URL carries ?r=qr.

Authentication

curl https://yourappisdead.com/bitlyisdead/api/links \
  -H "Authorization: Bearer bid_…"

Create a link

curl -X POST https://yourappisdead.com/bitlyisdead/api/links \
  -H "Authorization: Bearer bid_…" -H "content-type: application/json" \
  -d '{"url":"https://example.com/launch","title":"Launch","backHalf":"launch-26","tags":["launch"]}'

Responses: 201 { link }, or 400 { error } for an invalid destination or a taken back-half. Every route answers 401 without a valid token or session.

Endpoints

MethodPathBody / notes
GET/linksList your links (with stats).
POST/linksCreate a link: { url, title?, backHalf?, tags?, expiresAt?, campaignId? }
GET/links/:codeOne link.
PATCH/links/:codeEdit: { url?, title?, tags?, disabled?, hidden?, expiresAt?, campaignId? }
DELETE/links/:codeDelete a link.
POST/links/bulk{ codes, patch } or { codes, delete: true }
GET/qrcodesList QR Codes with their links.
POST/qrcodes{ code } for an existing link, or { url, title?, backHalf?, style? }
PATCH/qrcodes/:id{ title?, style?, hidden? }
GET/qrcodes/:id/imageThe styled SVG.
DELETE/qrcodes/:idDelete a QR Code.
GET/pagesList pages.
POST/pages{ title?, slug? }
PATCH/pages/:id{ title?, bio?, emoji?, theme?, blocks?, slug?, published? }
DELETE/pages/:idDelete a page.
GET/campaignsList campaigns.
POST/campaigns{ name, description?, utm? }
PATCH/campaigns/:id{ name?, description?, utm?, addLinks?, removeLinks? }
DELETE/campaigns/:idDelete a campaign (links stay).
GET/search?q=Search links, QR Codes and pages.

Limits

The API has no versioning yet; breaking changes are announced in the repository.