Skip to content

Create QR Code

Create a single QR code.

POST /api/v1/qrcodes

Request Body

FieldTypeRequiredDescription
typestringYesQR code type. See QR Types
contentobjectYesContent fields for the QR type
namestringNoDisplay name (max 100 chars, defaults to "{type} QR Code")
is_dynamicbooleanNotrue for trackable QR code with short URL (default: false)
folder_idstringNoFolder UUID to organize the QR code
styleobjectNoStyling options. See Styling

Example Request

bash
curl -X POST https://api.qbar-scanner.com/api/v1/qrcodes \
  -H "Content-Type: application/json" \
  -H "X-API-Key: qbar_your_key_here" \
  -d '{
    "type": "url",
    "content": {
      "url": "https://example.com/landing"
    },
    "name": "Landing Page QR",
    "is_dynamic": true,
    "style": {
      "dotsOptions": {
        "type": "rounded",
        "color": "#1a1a2e"
      },
      "cornersSquareOptions": {
        "type": "extra-rounded",
        "color": "#667eea"
      },
      "backgroundOptions": {
        "color": "#ffffff"
      }
    }
  }'

Response 201 Created

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "type": "url",
  "name": "Landing Page QR",
  "content_string": "https://example.com/landing",
  "is_dynamic": true,
  "status": "active",
  "scans": 0,
  "short_code": "aB3cD4eF",
  "dynamic_url": "https://qbar-scanner.com/r/aB3cD4eF",
  "image_url": "https://api.qbar-scanner.com/api/v1/qrcodes/550e.../image",
  "created_at": "2025-01-15T10:30:00.000Z",
  "request_id": "..."
}

Key Behaviors

  • Static QR codes encode content directly in the QR image. If you update the content, the image changes — but already-printed QR codes still point to the old content.
  • Dynamic QR codes encode a short redirect URL. Scanning always goes through the redirect, so you can update the target content without reprinting.
  • The image_url field provides a ready-to-use link to render the QR SVG image.

Error Responses

StatusWhen
400Validation error (missing/invalid fields)
401Invalid API key
429Rate limited

QBar Scanner Developer API