API Documentation

QR Insights
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.

API Access Tiers

Choose the plan that fits your integration needs

Pro

$9.99/month

  • 1,000 API calls/month
  • - No bulk operations
  • - No webhooks

Teams

$29.99/month

  • 10,000 API calls/month
  • Bulk operations (25 items)
  • Webhook support

Agency

$39.99/month

  • 50,000 API calls/month
  • Bulk operations (100 items)
  • Webhook support

Quick Start Guide

1

Get Your API Key

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

qr_live_your_api_key_here
2

Authenticate Your Requests

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

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"
3

Create Your First QR Code

Send a POST request to create a trackable QR code.

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

Error Response Format

{
  "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 to help you track your usage.

Response Headers

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 2024-02-01T00:00:00Z

Monthly Limits

1,000
Pro Plan
10,000
Teams Plan
50,000
Agency Plan

SDKs & Libraries

JavaScript SDK

Coming Soon

Official JavaScript SDK for Node.js and browser environments.

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.

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