API DOCUMENTATION — REST V1

The API
reference.

Integrate QR code generation and analytics directly into your applications with our powerful REST API. Complete with authentication, rate limiting, and bulk operations.

BEARER AUTH /// RATE-LIMIT HEADERS /// BULK CREATE /// JSON IN, JSON OUT

API access tiers

PLAN / PRO
$9.99/month
1,000 API calls/month
No bulk operations
No webhooks
PLAN / TEAMS
$29.99/month
10,000 API calls/month
Bulk operations (25 items)
Webhook support
PLAN / AGENCY
$39.99/month
50,000 API calls/month
Bulk operations (100 items)
Webhook support
VIEW COMPLETE PRICING →

Quick start guide

STEP / 01
Get your API key

Sign up for a Pro plan or higher and create an API key in your dashboard.

KEY FORMAT qr_live_your_api_key_here
STEP / 02
Authenticate your requests

Include your API key in the Authorization header of every request.

GET /api/v1/qr-codes
curl -X GET "https://qr-insights.com/api/v1/qr-codes" \
  -H "Authorization: Bearer qr_live_your_api_key_here" \
  -H "Content-Type: application/json"
STEP / 03
Create your first QR code

Send a POST request to create a trackable QR code.

POST /api/v1/qr-codes
curl -X POST "https://qr-insights.com/api/v1/qr-codes" \
  -H "Authorization: Bearer qr_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Campaign QR",
    "destination_url": "https://example.com/campaign",
    "styling": {
      "foreground_color": "#000000",
      "background_color": "#ffffff"
    }
  }'

API endpoints

GET /api/v1/qr-codes

List all QR codes for the authenticated user

REQUEST
curl -X GET "https://qr-insights.com/api/v1/qr-codes?page=1&limit=10" \
  -H "Authorization: Bearer qr_live_your_api_key_here"
RESPONSE
{
  "success": true,
  "data": [
    {
      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "name": "My Campaign QR",
      "destination_url": "https://example.com/campaign",
      "short_url": "https://qr-insights.com/q/abc123",
      "is_active": true,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 25,
    "totalPages": 3
  }
}
POST /api/v1/qr-codes

Create a new QR code

REQUEST
curl -X POST "https://qr-insights.com/api/v1/qr-codes" \
  -H "Authorization: Bearer qr_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Campaign QR",
    "destination_url": "https://example.com/campaign",
    "styling": {
      "foreground_color": "#000000",
      "background_color": "#ffffff"
    }
  }'
RESPONSE
{
  "success": true,
  "data": {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "name": "My Campaign QR",
    "destination_url": "https://example.com/campaign",
    "short_code": "abc123",
    "short_url": "https://qr-insights.com/q/abc123",
    "qr_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "is_active": true,
    "styling": {
      "foreground_color": "#000000",
      "background_color": "#ffffff"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
POST /api/v1/qr-codes/bulk TEAMS+

Create multiple QR codes in a single request

REQUEST
curl -X POST "https://qr-insights.com/api/v1/qr-codes/bulk" \
  -H "Authorization: Bearer qr_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "qr_codes": [
      {
        "name": "Product A",
        "destination_url": "https://example.com/product-a"
      },
      {
        "name": "Product B",
        "destination_url": "https://example.com/product-b"
      }
    ]
  }'
RESPONSE
{
  "success": true,
  "result": {
    "created": 2,
    "failed": 0,
    "total": 2
  },
  "errors": [],
  "data": [/* QR codes */]
}
GET /api/v1/qr-codes/{id}/analytics

Get scan analytics for a specific QR code

REQUEST
curl -X GET "https://qr-insights.com/api/v1/qr-codes/{id}/analytics" \
  -H "Authorization: Bearer qr_live_your_api_key_here"
RESPONSE
{
  "success": true,
  "data": {
    "total_scans": 1247,
    "scans_today": 23,
    "scans_this_week": 156,
    "scans_this_month": 432,
    "top_locations": [
      {
        "country": "United States",
        "count": 456
      },
      {
        "country": "Canada",
        "count": 234
      }
    ],
    "device_breakdown": {
      "mobile": 789,
      "desktop": 345,
      "tablet": 113
    },
    "recent_scans": [
      {
        "scanned_at": "2024-01-15T14:30:00Z",
        "country": "United States",
        "region": "California",
        "city": "San Francisco",
        "device_type": "mobile"
      }
    ]
  }
}
// ERROR HANDLING

HTTP status codes

200 Success
401 Unauthorized - Invalid API key
403 Forbidden - Feature not available on your plan
429 Rate limit exceeded
500 Internal server error
EVERY ERROR, STRUCTURED

Error response format

RESPONSE — 4XX / 5XX
{
  "error": {
    "message": "QR code limit exceeded. You have 3/3 QR codes.",
    "code": "LIMIT_EXCEEDED",
    "details": {
      "current": 3,
      "limit": 3
    }
  }
}

Rate limits

Rate limit headers
→ EVERY API RESPONSE INCLUDES RATE LIMIT HEADERS
→ USE THEM TO TRACK YOUR USAGE IN REAL TIME
Response headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 2024-02-01T00:00:00Z
1,000
CALLS/MO — PRO PLAN
10,000
CALLS/MO — TEAMS PLAN
50,000
CALLS/MO — AGENCY PLAN

SDKs & libraries

JavaScript SDK COMING SOON

Official JavaScript SDK for Node.js and browser environments.

NODE / BROWSER
npm install @qr-insights/sdk

import { QRInsights } from '@qr-insights/sdk'
const client = new QRInsights('your_api_key')
Python SDK COMING SOON

Official Python SDK for server-side applications.

SERVER-SIDE
pip install qr-insights

from qr_insights import QRInsights
client = QRInsights('your_api_key')

Ready to get started?

Sign up for a Pro plan to get API access and start integrating QR code generation into your applications.

SECURE API KEYS /// FAST RESPONSE TIMES /// 99.9% UPTIME