REST API

QRcraft API

The QRcraft API lets you generate, manage, and track QR codes programmatically. Available on all plans including free. Base URL: https://qrcraft.io/api/v1

Authentication

All API requests require a Bearer token in the Authorization header. Get your token from Profile → API Tokens.

curl https://qrcraft.io/api/v1/me \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json"

Error Codes

CodeMeaning
200Success
201Created
400Bad request / validation error
401Unauthorized (invalid or missing token)
403Forbidden (plan limit reached)
404Resource not found
422Unprocessable entity
429Rate limit exceeded (60/min)
500Server error

QR Codes

GET /qrcodes

List all QR codes for the authenticated user. Supports filtering and pagination.

Query Parameters

ParameterTypeDescription
typestringFilter by QR type (url, vcard, wifi, etc.)
searchstringSearch by name
pageintegerPage number (default: 1)
GET /api/v1/qrcodes?type=url&page=1 Response: { "data": [ { "id": 1, "name": "My Website", "type": "url", "short_code": "aB3xYz8q", "content": "https://example.com", "total_scans": 142, "is_active": true, "public_url": "https://qrcraft.io/qr/aB3xYz8q", "png_url": "https://qrcraft.io/storage/qrcodes/1/aB3xYz8q.png", "created_at": "2024-01-15T10:30:00Z" } ], "meta": { "current_page": 1, "last_page": 3, "total": 52 } }
POST /qrcodes

Create a new QR code and generate its image files.

Body Parameters

ParameterTypeRequiredDescription
namestringDisplay name for the QR code
typestringQR type: url, vcard, wifi, email, sms, text, etc.
contentstringThe content/URL to encode
color_darkstringHex color for QR dots (default: #000000)
color_lightstringHex color for background (default: #ffffff)
sizeintegerQR image size in pixels (default: 300)
POST /api/v1/qrcodes Content-Type: application/json { "name": "My Product Page", "type": "url", "content": "https://myshop.com/product/123", "color_dark": "#6c63ff", "size": 400 }
GET/qrcodes/{id}

Get a single QR code by ID.

PUT/qrcodes/{id}

Update QR code name, content, colors, or status. QR image is regenerated automatically.

DELETE/qrcodes/{id}

Permanently delete a QR code and its associated image files.

GET/qrcodes/{id}/png

Download the QR code as a PNG file.

Analytics

GET/analytics/summary

Get overall scan statistics for all your QR codes.

{ "total_scans": 15482, "scans_today": 234, "scans_30d": 4821, "total_qrcodes": 47 }
GET/qrcodes/{id}/analytics

Get detailed analytics for a specific QR code including by device, country, and browser.

User

GET/me

Get the authenticated user's profile, plan, and usage limits.

POST/tokens

Create a new API token. Send {"name":"My App"} in the body.

Ready to build?

Create a free account to get your API token instantly.

Get Free API Key →