POST
/
qr-codes
/
generate
Generate QR Code
curl --request POST \
  --url https://connextify.com/api/v1/qr-codes/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content_type": "<string>",
  "content_data": {},
  "visual_settings": {
    "foregroundColor": "<string>",
    "backgroundColor": "<string>",
    "size": 123,
    "margin": 123,
    "errorCorrectionLevel": "<string>",
    "logoUrl": "<string>"
  },
  "is_dynamic": true,
  "tracking_enabled": true,
  "name": "<string>",
  "password": "<string>",
  "campaign_id": "<string>",
  "expires_at": "<string>",
  "expiration_date": "<string>",
  "utm_template_id": "<string>",
  "utm_source": "<string>",
  "utm_medium": "<string>",
  "utm_campaign": "<string>",
  "utm_term": "<string>",
  "utm_content": "<string>",
  "utm_source_platform": "<string>",
  "utm_creative_format": "<string>",
  "utm_marketing_tactic": "<string>",
  "utm_id": "<string>",
  "custom_params": {},
  "smart_deep_link_enabled": true,
  "ios_url": "<string>",
  "android_url": "<string>",
  "windows_url": "<string>",
  "mac_url": "<string>",
  "pass_query_params": true,
  "geo_rules": [
    {}
  ],
  "language_rules": [
    {}
  ],
  "time_rotation": {},
  "pixel_ids": [
    {}
  ],
  "pixel_delivery_mode": "<string>",
  "gdpr_consent_enabled": true,
  "conversions_enabled": true,
  "logo": "<string>",
  "output_format": "<string>"
}
'
Generate a new QR code with various content types and visual customization options. Dynamic QR codes can have their destination changed later, while static QR codes encode the content directly.
Dynamic vs Static QR Codes
  • Dynamic: Creates a short URL that redirects to your content. You can change the destination later without reprinting the QR code.
  • Static: Encodes the content directly into the QR code. Cannot be changed after creation.
When is_dynamic or tracking_enabled is true, a short URL is automatically created for the QR code.

Body Parameters

content_type
string
required
Type of content to encode.Options: url, text, wifi, vcard, email, phone, sms, location
content_data
object
required
Content data object. Structure depends on content_type.
visual_settings
object
Visual customization options for the QR code appearance.
is_dynamic
boolean
default:false
Whether to create a dynamic QR code (destination can be changed later).When true, creates an associated short URL for redirection.
tracking_enabled
boolean
default:false
Whether to enable scan tracking and analytics.When true, creates an associated short URL for tracking scans. View analytics using the QR Analytics endpoints.
name
string
Friendly name for the QR code (for organization purposes).
password
string
Password to protect the QR code content. Users will be prompted to enter this password before accessing the destination.
campaign_id
string
Optional. The Marketing Campaign UUID to associate this QR code with.
expires_at
string
ISO 8601 timestamp when the QR code should expire.Example: 2024-12-31T23:59:59Z
expiration_date
string
Alternative to expires_at. ISO 8601 date string for expiration.
utm_template_id
string
UUID of a saved UTM template (created via the UTM Templates API). When provided, Connextify automatically resolves and applies all saved UTM campaign tags and custom parameters to the QR code’s destination URL.
utm_source
string
Campaign source (e.g. google, newsletter).
utm_medium
string
Campaign medium (e.g. print, qrcode).
utm_campaign
string
Campaign name (e.g. summer_promo).
utm_term
string
Campaign term/keywords (e.g. organic).
utm_content
string
Campaign content/ad variant (e.g. flyer_v1).
utm_source_platform
string
Source platform sending traffic (e.g. google_ads, meta).
utm_creative_format
string
Creative format (e.g. video, carousel, qr).
utm_marketing_tactic
string
Marketing tactic (e.g. prospecting, retention).
utm_id
string
Campaign or ad identifier.
custom_params
object
Arbitrary key-value attribution or metadata parameters (e.g. {"affiliate_id": "123"}).

Mobile & Desktop Deep Linking

Enables intelligent OS detection and app scheme routing for printed QR scans. Automatically inspects 21+ supported platforms (YouTube, Spotify, Apple Music, TikTok, Instagram, Twitter/X, Discord, Twitch, etc.) and transforms web URLs into native mobile protocols (intent:// or custom URI schemes) on mobile devices.
ios_url
string
Custom app scheme or App Store URL for iOS scanners (e.g. myapp://products/shoes or https://apps.apple.com/app/id123456789). Overrides standard destination on iPhone and iPad scanners.
android_url
string
Custom app scheme, Intent URI, or Google Play Store URL for Android scanners (e.g. intent://view#Intent;package=com.myapp;scheme=https;end; or https://play.google.com/store/apps/details?id=com.myapp). Overrides standard destination on Android scanners.
windows_url
string
Custom destination URL for Windows desktop scanners.
mac_url
string
Custom destination URL for macOS desktop scanners.

Parameter Forwarding & Routing

pass_query_params
boolean
default:true
Whether to forward query parameters to the destination URL when the QR code is scanned. Preserves UTM parameters and tracking tags on outgoing destination links.
geo_rules
array
Array of country-targeted routing rules based on ISO 3166-1 alpha-2 country codes.
language_rules
array
Array of browser language rules based on scanner Accept-Language headers.
time_rotation
object
Dayparting and schedule rotation settings (enabled, timezone, timezone_mode, fallback_url, rules). Allows physical QR codes on restaurant menus or storefronts to route to breakfast, lunch, or dinner menus depending on scan time.

Retargeting Pixels & Tracking

pixel_ids
array
Array of UUIDs of saved pixel profiles (created via the Pixels API). Attaching pixel IDs automatically provisions a dynamic short URL bridge. When physical flyers, packaging, or billboards are scanned, visitors are added to your Meta, Google, TikTok, or LinkedIn ad audiences.
pixel_delivery_mode
string
default:"server"
Delivery mode for pixel events:
  • server: Server-Side CAPI (0ms redirect delay, immune to mobile ad blockers).
  • client: Browser interstitial (renders a brief 250ms page to fire browser scripts).
When true, presents an interactive GDPR cookie consent card before firing client-side tracking pixels upon QR scan.
conversions_enabled
boolean
default:false
Whether closed-loop conversion tracking is active for this QR code. Scans receive a cryptographically signed cnfy_click_id token for post-scan website event attribution and CAPI relays.
Base64-encoded logo image to overlay on the QR code. Must start with data:image/.Example: data:image/png;base64,iVBORw0KGgo...
output_format
string
default:"json"
Optional response format override for the generated QR code (you can also pass ?format=json or ?format=image as a query parameter):Options:
  • json (default for REST API): Returns standard JSON ({ success: true, data: { ... } }) with qr_code_data as a base64 PNG data URL
  • image (default for MCP): Returns a Native Image Block ({ content: [{ type: "image", ... }, { type: "text", ... }] })

Response Formats

REST API requests return standard JSON by default ({ success: true, data: { ... } }). You can optionally pass ?format=image (or output_format: "image" in the request body) to receive a Native Image Block instead (the default format when calling via MCP).
Default for REST API requests. Returns structured metadata along with qr_code_data (data:image/png;base64,...).
success
boolean
Whether the request was successful.
data
object
The generated QR code object.
requestId
string
Unique request identifier for debugging.

Request Examples

curl -X POST "https://connextify.com/api/v1/qr-codes/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "url",
    "content_data": {
      "url": "https://example.com/landing-page"
    },
    "visual_settings": {
      "foregroundColor": "#1a1a1a",
      "backgroundColor": "#ffffff",
      "size": 400,
      "errorCorrectionLevel": "H"
    },
    "is_dynamic": true,
    "tracking_enabled": true,
    "name": "Product Launch QR"
  }'

Response Examples

{
  "success": true,
  "data": {
    "id": "770e8400-e29b-41d4-a716-446655440000",
    "content": "https://connextify.com/xyz789",
    "original_content": "https://example.com/landing-page",
    "qr_code_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
    "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
    "content_type": "url",
    "content_data": {
      "url": "https://example.com/landing-page"
    },
    "visual_settings": {
      "foregroundColor": "#1a1a1a",
      "backgroundColor": "#ffffff",
      "size": 400,
      "errorCorrectionLevel": "H"
    },
    "is_dynamic": true,
    "tracking_enabled": true,
    "short_url_id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Product Launch QR",
    "expires_at": null,
    "is_temporary": false,
    "created_at": "2024-01-15T10:30:00.000Z"
  },
  "requestId": "qr_1705316000000_abc123xyz"
}

Use Cases

Generate a QR code that allows users to connect to a WiFi network by scanning.
const response = await fetch('https://connextify.com/api/v1/qr-codes/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content_type: 'wifi',
    content_data: {
      ssid: 'GuestNetwork',
      pass_code: 'mock123',
      encryption: 'WPA'
    },
    visual_settings: {
      size: 300,
      foregroundColor: '#2563eb'
    },
    name: 'Office WiFi QR'
  })
});
Generate a QR code that adds contact information to a phone’s address book.
response = requests.post(
    'https://connextify.com/api/v1/qr-codes/generate',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content_type': 'vcard',
        'content_data': {
            'firstName': 'John',
            'lastName': 'Doe',
            'email': 'john.doe@company.com',
            'phone': '+1-555-123-4567',
            'organization': 'Acme Inc',
            'title': 'Sales Manager'
        },
        'name': 'John Doe Business Card'
    }
)
Create a QR code that requires a password before revealing the content.
curl -X POST "https://connextify.com/api/v1/qr-codes/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "url",
    "content_data": {
      "url": "https://example.com/confidential-doc"
    },
    "password": "secret123",
    "name": "Confidential Document QR"
  }'

List QR Codes

View all your generated QR codes

Get QR Code

Retrieve a specific QR code by ID

Update QR Code

Update dynamic QR code settings

QR Analytics Overview

View scan analytics for your QR codes