API Reference

Integrate QRgen directly into your applications using our REST API.

POST /api/qr

Generate a single QR code. Supports both static and dynamic types. Returns the image file directly.

Request Body (JSON / Form Data)

{ "type": "url", "data": "https://example.com", "size": 300, "fgColor": "#000000", "bgColor": "#ffffff", "format": "png", "isDynamic": true }
POST /api/bulk

Start a bulk generation job (requires Business plan). Max 500 codes per request.

Request Body (JSON)

{ "name": "Campaign Launch", "dataUrls": "https://example.com/1\nhttps://example.com/2", "size": 500, "format": "png" }
GET /api/qr/:id/analytics

Retrieve detailed scan analytics for a specific dynamic QR code.

Response

{ "totalScans": 142, "uniqueCountries": 5, "deviceBreakdown": { "mobile": 100, "desktop": 42 }, "browserBreakdown": { "Chrome": 80, "Safari": 62 } }