REST API

QR Code API for Developers

Generate QR codes programmatically, manage dynamic redirects, and track scans at scale. Built for agencies, SaaS platforms, and automation workflows.

POST /v1/qr

Create QR codes

Generate static or dynamic QR codes with a single request. Customize colors, error correction, and output size. Returns a public redirect URL immediately.

POST /v1/qr
Authorization: Bearer sf_live_•••
Content-Type: application/json

{
  "name": "Product page — Summer 2026",
  "type": "URL",
  "isDynamic": true,
  "destinationUrl": "https://acme.com/summer"
}
Response
{
  "id": "qr_01hxz8f3m9",
  "slug": "a1b2c3",
  "redirectUrl": "https://scanforge.com/r/a1b2c3",
  "type": "URL",
  "isDynamic": true,
  "createdAt": "2026-04-19T10:12:00Z"
}
PATCH /v1/qr/:id

Update destinations

Change where a dynamic QR code points — without generating a new code or reprinting. Ideal for campaigns, seasonal promotions, and rotating content.

PATCH /v1/qr/qr_01hxz8f3m9
Authorization: Bearer sf_live_•••

{
  "destinationUrl": "https://acme.com/fall-sale"
}
GET /v1/analytics/:id

Fetch scan data

Pull scan analytics by QR code ID. Filter by date range. Returns daily breakdowns, top countries, and device splits.

GET /v1/analytics/qr_01hxz8f3m9?range=30d
Authorization: Bearer sf_live_•••
Response
{
  "totalScans": 4821,
  "topCountries": [{"country": "US", "scans": 2100}, ...],
  "topDevices": [{"device": "mobile", "scans": 3654}, ...],
  "daily": [{"date": "2026-04-01", "scans": 142}, ...]
}
POST /v1/qr/bulk

Bulk generation

Generate hundreds of QR codes in a single request. Perfect for location-based deployments, print runs, and event badge generation.

POST /v1/qr/bulk
Authorization: Bearer sf_live_•••

{
  "codes": [
    { "name": "Location A", "destinationUrl": "https://acme.com/a" },
    { "name": "Location B", "destinationUrl": "https://acme.com/b" }
  ]
}
Webhooks

Real-time scan events

Subscribe to scan events and receive a POST to your endpoint within milliseconds. Includes country, device, referrer, and timestamp.

  • scan.created — fires on every QR scan
  • — Configurable per-code or account-wide
  • — Signed with HMAC-SHA256
  • — Retried up to 5× with exponential backoff
POST https://your-app.com/webhooks/scans

{
  "event": "scan.created",
  "qrId": "qr_01hxz8f3m9",
  "timestamp": "2026-04-19T14:33:21Z",
  "country": "US",
  "device": "mobile",
  "referrer": null
}

Endpoints

MethodEndpointDescription
POST/v1/qrCreate a QR code
GET/v1/qrList QR codes
GET/v1/qr/:idGet a QR code
PATCH/v1/qr/:idUpdate destination
DELETE/v1/qr/:idDelete a QR code
GET/v1/analytics/:idGet scan analytics
POST/v1/qr/bulkBulk create QR codes
GET/v1/webhooksList webhooks
POST/v1/webhooksCreate webhook
Authentication

Bearer token. Create keys in Settings → API Keys. Prefix: sf_live_ for production, sf_test_ for sandbox.

Rate limits
  • Business: 1,000 req/min
  • Burst: up to 5,000
  • Limits in response headers
Error codes
  • 400 — invalid input
  • 401 — bad API key
  • 402 — plan limit
  • 429 — rate limited

Ready to integrate?

API access is included on the Business plan. Start with a free account, upgrade when you're ready to build.