Back to Documentation

API Reference

v1.0

Integrate QREngine into your applications with our REST API

Quick Start
1. Get API Token

Go to Dashboard → API Tokens and create a new token

2. Add to Headers

Include token in Authorization header as Bearer token

3. Make Requests

Start generating codes using the API endpoints

Authentication

All API requests require authentication using a Personal Access Token (PAT). Include your token in the Authorization header:

Authorization: Bearer qre_your_token_here

💡 Tokens start with qre_ prefix. Keep your tokens secure and never expose them in client-side code.

Base URL
https://api.qrengine.site

All endpoints are relative to this base URL.

Interactive API Explorer

Try out API endpoints directly in your browser with Swagger UI

Example: Generate a QR Code
curl -X POST https://api.qrengine.site/api/codes/generate \
  -H "Authorization: Bearer qre_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "qr",
    "data": "https://example.com",
    "name": "My Website QR",
    "customization": {
      "color": "#8B5CF6",
      "size": 400
    }
  }'

API Endpoints

POST/api/codes/generateAuth Required

Generate a new QR code or barcode

Request Body

{
  "type": "qr",           // "qr" or "barcode"
  "data": "https://example.com",
  "name": "My Code",      // optional
  "barcodeFormat": "CODE128", // required for barcode
  "format": "png",        // "png" or "svg" (QR only)
  "saveToLibrary": true,  // optional
  "isDynamic": false,     // optional - create editable QR
  "customization": {      // optional
    "color": "#000000",
    "backgroundColor": "#FFFFFF",
    "size": 300,
    "errorCorrection": "M" // L, M, Q, H (QR only)
  }
}

Response

{
  "success": true,
  "data": {
    "id": "abc123",
    "imageBase64": "data:image/png;base64,..."
  }
}
GET/api/codesAuth Required

Get all your saved codes

Query Parameters

type (optional): "qr" | "barcode"
limit (optional): number
offset (optional): number

Response

{
  "success": true,
  "data": {
    "codes": [...],
    "total": 10
  }
}
GET/api/codes/:idAuth Required

Get a specific code by ID

Response

{
  "success": true,
  "data": {
    "id": "abc123",
    "name": "My Code",
    "type": "qr",
    "data": "https://example.com",
    "imageBase64": "...",
    "scans": 42,
    "createdAt": "2024-01-01T00:00:00Z"
  }
}
PUT/api/codes/:idAuth Required

Update a code (name, data, or target URL for dynamic QR)

Request Body

{
  "name": "Updated Name",  // optional
  "data": "new data",      // optional - regenerates code
  "targetUrl": "https://new-url.com", // dynamic QR only
  "targetData": "new text", // dynamic QR only (non-URL)
  "isActive": true         // optional
}

Response

{
  "success": true,
  "data": { ... }
}
DELETE/api/codes/:idAuth Required

Delete a code

Response

{
  "success": true,
  "message": "Code deleted"
}
POST/api/tokensAuth Required

Create a new API token

Request Body

{
  "name": "Production API"
}

Response

{
  "success": true,
  "data": {
    "token": "qre_xxxx...",  // Only shown once!
    "name": "Production API"
  }
}
GET/api/tokensAuth Required

List all your API tokens

Response

{
  "success": true,
  "data": {
    "tokens": [
      { "name": "...", "createdAt": "...", "lastUsed": "..." }
    ]
  }
}
DELETE/api/tokens/:nameAuth Required

Revoke a specific token

Response

{
  "success": true,
  "message": "Token revoked"
}
Rate Limits
PlanCodesDynamic QRAPI Calls/Day
Free52100
Pro50305,000
EnterpriseUnlimitedUnlimitedUnlimited

Ready to get started?

Create your first API token and start building