API Documentation

Authenticate with a bearer token from Admin → API Tokens.

Authentication
Authorization: Bearer YOUR_TOKEN
Create QR
POST /api/qr
{"name":"My QR","type":"website"}
curl -X POST https://qr-depot.com/api/qr \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"My QR","type":"website"}'
Update QR
PUT /api/qr/123
{"type":"website"}
curl -X PUT https://qr-depot.com/api/qr/123 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"website"}'
Get stats
GET /api/qr/123/stats?from=2026-02-01&to=2026-02-06
curl "https://qr-depot.com/api/qr/123/stats?from=2026-02-01&to=2026-02-06" \
  -H "Authorization: Bearer YOUR_TOKEN"
List QRs
GET /api/qrs?limit=50&tag=promo
curl "https://qr-depot.com/api/qrs?limit=50&tag=promo" \
  -H "Authorization: Bearer YOUR_TOKEN"
Error responses
{
  "error": "Missing bearer token"
}
{
  "error": "Missing field: name"
}