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
| Method | Path | Body / notes |
|---|---|---|
GET | /links | List your links (with stats). |
POST | /links | Create a link: { url, title?, backHalf?, tags?, expiresAt?, campaignId? } |
GET | /links/:code | One link. |
PATCH | /links/:code | Edit: { url?, title?, tags?, disabled?, hidden?, expiresAt?, campaignId? } |
DELETE | /links/:code | Delete a link. |
POST | /links/bulk | { codes, patch } or { codes, delete: true } |
GET | /qrcodes | List 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/image | The styled SVG. |
DELETE | /qrcodes/:id | Delete a QR Code. |
GET | /pages | List pages. |
POST | /pages | { title?, slug? } |
PATCH | /pages/:id | { title?, bio?, emoji?, theme?, blocks?, slug?, published? } |
DELETE | /pages/:id | Delete a page. |
GET | /campaigns | List campaigns. |
POST | /campaigns | { name, description?, utm? } |
PATCH | /campaigns/:id | { name?, description?, utm?, addLinks?, removeLinks? } |
DELETE | /campaigns/:id | Delete a campaign (links stay). |
GET | /search?q= | Search links, QR Codes and pages. |
Limits
- 300 links, 50 pages, 100 campaigns, 20 domains and 10 tokens per account.
- Destinations must be public http(s) URLs; private networks, credentials and other short links are refused.
- Bulk calls take up to 200 codes.
The API has no versioning yet; breaking changes are announced in the repository.