QR Code Generation API
Generate static QR codes via API for integration into your applications.
Generation API
Generate static QR codes via API: send a string and an optional design object — get an SVG in milliseconds.
Design & Branding
Apply brand colors, module shapes, frames and logos — all through the design object.
Endpoints
/v1/generate
Body: required `data`, optional `design`. HTTP 200 returns SVG in `data.qr_code`.
POST with JSON body: required string field data and optional design object (same shape as in the cabinet builder). Response is HTTP 200 with SVG in data.qr_code. WebQR does not store your payloads — keep files, databases, and ids on your side.
/v1/usage
Read-only: period counters; `data.items` is empty. Does not use generation quota.
GET /v1/usage returns billing-period counters; data.items is always empty. Does not increment used_count.
The API is stateless: there is no server-side library of your QR codes. Store SVG output and any labels in your own application.
Production security
Treat the API key like a password for your WebQR account quota.
- Keep the secret on the server; clients talk to your HTTPS, not to WebQR with the key.
- Restrict each key to your server IPs (or fixed CDN egress).
- Optionally require HMAC signing per key in the cabinet.
Authenticate every request with the X-API-Key header. Keys are created in the cabinet.
Request examples (JSON body)
Plain modules on a solid background
JSON body
{
"data": "https://webqr.io/",
"design": {
"size": 1024,
"backgroundColor": "#FFFFFF",
"color": "#000000",
"transparent": false,
"styleType": "a7k2m9",
"eyeType": "r2s4t6",
"eyeInnerType": "h7i9j1",
"roundedCorners": true,
"cornerRadius": 20,
"showColorGradient": false
}
}
Response
HTTP 200 returns JSON with success, the SVG string in data.qr_code, your content echo, a normalized design snapshot, and a usage object with quota explanations.
Colored canvas with shaped modules
JSON body
{
"data": "https://webqr.io/",
"design": {
"size": 1024,
"backgroundColor": "#0E2A47",
"color": "#F8FAFC",
"borderColor": "#58B4FF",
"centerColor": "#58B4FF",
"transparent": false,
"styleType": "m4k6l8",
"eyeType": "x4y6z8",
"eyeInnerType": "n9o1p3",
"roundedCorners": true,
"cornerRadius": 20,
"showColorGradient": false
}
}
Diagonal gradient on modules
JSON body
{
"data": "https://webqr.io/",
"design": {
"size": 1024,
"backgroundColor": "#FFFFFF",
"color": "#1e3a5f",
"borderColor": "#2563EB",
"centerColor": "#7C3AED",
"transparent": false,
"styleType": "a7k2m9",
"eyeType": "r2s4t6",
"eyeInnerType": "h7i9j1",
"roundedCorners": true,
"cornerRadius": 20,
"showColorGradient": true,
"fromColor": "#2563EB",
"toColor": "#7C3AED",
"styleColorGradient": "diagonal"
}
}
Example request
curl -X POST https://api.webqr.io/v1/generate \
-H "Content-Type: application/json" \\n -H "X-API-Key: wq_xxxxxxxxxx_your_secret" \\n -d @payload.json
Mirror any example JSON into payload.json or inline the -d body, but execute curl only from trusted infrastructure — browsers and mobile binaries must never see the raw secret.
Design
WebQR ships with a full visual QR builder in your account. Tune colors, module shapes, frames and logos in the UI—the same knobs map straight to the JSON you POST—so assembling the final generate request stays predictable.
Send Content-Type: application/json. The root object has data (required) and design (optional). Keys such as markerOutColor normalize to borderColor; invalid payloads return HTTP 422.
The thumbnails here match the Design step in the builder: copy the label under a tile into design.styleType, design.eyeType or design.eyeInnerType.
Icons are the same as in the design flow. Each tile shows the canonical code for the matching API field.
Module codes (design.styleType)
Outer eye shapes (design.eyeType)
Inner eye shapes (design.eyeInnerType)
Frequently asked questions
Included successful generations per calendar month by plan: 200 (Starter), 5000 (Premium), 25000 (Business), 100000 (Business Plus). If you need more, please contact us.
Yes! You can generate QR codes with the API as well as manually in the main page generator.
Yes. Starter includes Static QR API access with 200 included successful generations per calendar month; Premium 5000; Business 25000; Business Plus 100000 (allowances reset monthly). No separate API-only subscription; optional paid overage may apply.
The API returns JSON with the SVG in data.qr_code, the same content and design you sent (for traceability), and a usage object for quota bookkeeping. This flow is stateless: WebQR does not auto-save every call into your QR library or return a persisted id—you keep the SVG and any ids where you integrate. Anything you intentionally save via the WebQR generator or dashboard stays there under normal cabinet rules.
Need more requests?
Please contact us if you need more requests per day for individual or commercial use.