v1 REST Developer Platform

Developer API Platform

Embed ultra-fast, branded vector QR code generation directly into your POS, CRM, ecommerce platform, or SaaS backend.

Live API Console & Code Generator

Get Your API Key →

Interactive API Tester

Configure parameters & execute live requests

#4f46e5
#9333ea
curl -X POST https://qrgen.app/api/v1/qr \
  -H "Authorization: Bearer qrapi_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "data": "https://yourbrand.com/promo",
  "format": "svg",
  "size": 1000,
  "design": {
    "bodyStyle": "square",
    "foregroundColor": "#4f46e5",
    "gradientType": "linear",
    "gradientColor2": "#9333ea"
  }
}'

Authentication

Bearer Token via Authorization Header

All API requests must include your API key in the standard HTTP Authorization header:

Authorization: Bearer qrapi_live_9a87bf23d8e9...

JavaScript & TypeScript Quickstart

Client-side & Server-side integrations for Next.js, Node.js, React, and browser runtimes

Zero External Dependencies
Vanilla JavaScript / Browser FetchES6+
// Generate branded vector QR code
async function getBrandedQR(url, style = 'rounded-pointed') {
  const res = await fetch('https://qrgen.app/api/v1/qr', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ' + process.env.QRGEN_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      data: url,
      format: 'svg',
      size: 1000,
      design: {
        bodyStyle: style,
        foregroundColor: '#4f46e5',
        gradientType: 'linear',
        gradientColor2: '#9333ea'
      }
    })
  });

  const { svg, safety } = await res.json();
  return { svg, score: safety?.score };
}
TypeScript SDK UtilityType-Safe
export interface QRResponse {
  id: string;
  format: 'svg' | 'png';
  size: number;
  data: string;
  svg: string;
  safety: {
    score: number;
    status: 'OPTIMAL' | 'ACCEPTABLE' | 'RISKY';
    warnings: string[];
  };
}

export async function createQRCode(
  data: string,
  apiKey: string
): Promise<QRResponse> {
  const res = await fetch('https://qrgen.app/api/v1/qr', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ data, format: 'svg' }),
  });
  if (!res.ok) throw new Error(`Failed: ${res.status}`);
  return res.json();
}

API Endpoint Reference

MethodEndpoint RouteDescription
POST/api/v1/qrGenerate high-resolution styled vector SVG or binary PNG QR codes programmatically.
GET/api/v1/qrList all generated QR codes for your workspace.
POST/api/v1/dynamicCreate a dynamic tracking QR with short code, smart routing rules, and analytics.
GET/api/v1/dynamic/:idGet dynamic QR details and real-time scan count.
PATCH/api/v1/dynamic/:idUpdate destination URL, smart rules, or active/paused status.
GET/api/v1/qr/:id/analyticsRetrieve scan timeline, geo distribution, OS, device, and browser metrics.
POST/api/v1/qr/bulkBatch generate up to 200 styled QR codes at once.
POST/api/v1/qr/transparentGenerate transparent QR code composite overlaid onto background images.

Standard Error Format

All API errors return consistent JSON structures with structured error codes:

{
  "error": {
    "code": "INVALID_PARAMETER",
    "field": "size",
    "message": "The size must be between 100 and 5000.",
    "request_id": "req_82JH2"
  }
}