SnappyQR API Documentation (v1)

Welcome to the SnappyQR API. This document provides detailed information on how to integrate with our services for single and bulk QR code generation and scanning.

1. Authentication

All requests (except public redirects) require an API key passed via the Authorization header.

Authorization: Bearer <your_api_key>

2. Single QR Code Generation

Generate high-quality QR codes in PNG or SVG format.

POST https://api.snappyqr.com/qr/generate

Request Body Fields

Field Type Description Default
type String Type of QR: url, vcard, wifi, text text
data String Content for url or text types N/A
metadata Object Map of fields for wifi or vcard N/A
format String Output format: png or svg png
size Integer Pixel size (100 to 2000) 300
foreground String Hex color for the QR modules (e.g. #000000) #000000
background String Hex color for the background (e.g. #FFFFFF) #FFFFFF
logo_url String URL of a logo to place in the center N/A

Type-Specific Metadata

Sample Curl Commands

URL QR Code
curl --location 'https://api.snappyqr.com/qr/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_key>' \
--data '{
     "type": "url",
     "data": "google.com",
     "format": "png"
 }'
WiFi QR Code
curl --location 'https://api.snappyqr.com/qr/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_key>' \
--data '{
     "type": "wifi",
     "metadata": {
         "ssid": "Home_WiFi",
         "password": "mypassword123",
         "security": "WPA"
     },
     "format": "png",
     "size": 500
 }'
VCard (Multiple Contacts)
curl --location 'https://api.snappyqr.com/qr/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_key>' \
--data '{
     "type": "vcard",
     "metadata": {
         "name": "John Doe",
         "org": "SnappyQR Inc.",
         "phone": "+123456789, +987654321",
         "email": "john@snappyqr.com, work@snappyqr.com"
     },
     "format": "png"
 }'
Text QR Code
curl --location 'https://api.snappyqr.com/qr/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_key>' \
--data '{
     "type": "text",
     "data": "This is a secret message.",
     "format": "png"
 }'

3. QR Code Scanning

Decode a QR code from a public URL or a Base64 string.

POST https://api.snappyqr.com/qr/scan
Sample Curl (URL)
curl --location 'https://api.snappyqr.com/qr/scan' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_key>' \
--data '{
    "url": "https://api.snappyqr.com/qr/YOUR_QR_ID"
}'
Sample Curl (Base64)
curl --location 'https://api.snappyqr.com/qr/scan' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your_key>' \
--data '{
    "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}'

4. Bulk Generation Pipeline

Process thousands of QR codes asynchronously via CSV upload.

Step 1: Create a Bulk Job

Upload a CSV file containing a data column.

POST https://api.snappyqr.com/bulk/create

Form Fields:

  • file: The CSV file (must have a data column).
  • format: Output format: png (default) or pdf for a printable document.
  • pdf_per_page: (For PDF) QR codes per A4 page: 1, 4, 6, 9, 12, 16, 20, 24.
  • type, size, foreground, background, logo_url: Standard QR settings applied to all rows.

Sample Curl (Standard ZIP):

curl --location 'https://api.snappyqr.com/bulk/create' \
--header 'Authorization: Bearer <your_key>' \
--form 'file=@"test.csv"' \
--form 'size="400"' \
--form 'format="png"'

Sample Curl (Branded Bulk QR):

curl --location 'https://api.snappyqr.com/bulk/create' \
--header 'Authorization: Bearer <your_key>' \
--form 'file=@"data.csv"' \
--form 'logo_file=@"logo.png"' \
--form 'foreground="#2563eb"' \
--form 'background="#f8fafc"' \
--form 'size="500"'

Sample Curl (Printable PDF):

curl --location 'https://api.snappyqr.com/bulk/create' \
--header 'Authorization: Bearer <your_key>' \
--form 'file=@"test.csv"' \
--form 'format="pdf"' \
--form 'pdf_per_page="12"' \
--form 'foreground="#1e293b"'

Step 2: Check Job Status

Check the progress of your processing job.

GET https://api.snappyqr.com/bulk/{job_id}
{
    "id": "8f2b3c4d...",
    "status": "complete",
    "total": 1500,
    "completed": 1500,
    "processing_time": "45s",
    "download_url": "https://api.snappyqr.com/bulk/download/8f2b3c4d..."
}

Step 3: Download Results

The download_url provides a direct 302 redirect to a secure ZIP file containing all generated images.


5. Data Retention Policy

Retention depends on your subscription tier:

Plan Single QR Codes Bulk ZIPs
Essentials 30 Days 30 Days
Professional 1 Year 30 Days
Enterprise Permanent 30 Days

Support

For technical issues or enterprise inquiries, contact us via email at contact@snappyqr.com or on Telegram at @snappyqr.