Generate QR Code
QR Codes
Generate QR Code
Generate a new QR code with customizable settings
POST
Generate QR Code
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.
is_dynamic or tracking_enabled is true, a short URL is automatically created for the QR code.Body Parameters
Type of content to encode.Options:
url, text, wifi, vcard, email, phone, sms, locationContent data object. Structure depends on
content_type.Visual customization options for the QR code appearance.
Whether to create a dynamic QR code (destination can be changed later).When
true, creates an associated short URL for redirection.Whether to enable scan tracking and analytics.When
true, creates an associated short URL for tracking scans. View analytics using the QR Analytics endpoints.Friendly name for the QR code (for organization purposes).
Password to protect the QR code content. Users will be prompted to enter this password before accessing the destination.
Optional. The Marketing Campaign UUID to associate this QR code with.
ISO 8601 timestamp when the QR code should expire.Example:
2024-12-31T23:59:59ZAlternative to
expires_at. ISO 8601 date string for expiration.Campaign source (e.g.
google, newsletter).Campaign medium (e.g.
print, qrcode).Campaign name (e.g.
summer_promo).Campaign term/keywords (e.g.
organic).Campaign content/ad variant (e.g.
flyer_v1).Source identifier for tracking.Options:
QR_CODE_GENERATOR, BULK_IMPORTBase64-encoded logo image to overlay on the QR code. Must start with
data:image/.Example: data:image/png;base64,iVBORw0KGgo...Response format for the generated QR code.Options:
image(default): Returns a ready-to-use PNG image in Native Image Block formatjson: Returns raw JSON with base64-encoded image data
You can also use
?format=json query parameter instead of this body parameter.Response Formats
The API supports two response formats. Most users should use the default PNG image format.- PNG Image (Default)
- JSON Format (Optional)
Best for: Most users who want a ready-to-use QR code image.The response contains a
content array with:- Image block: The actual PNG image data (ready to display/save)
- Text block: Metadata about the QR code (JSON)
The
content[0].data contains pure base64 image data that can be directly decoded and saved as a PNG file or displayed in an <img> tag using: data:image/png;base64,${content[0].data}Request Examples
- cURL
- Node.js
- TypeScript
- Python
- PHP
- Go
- Java
Response Examples
- 200 Success
- 422 Validation Error
- 400 Invalid Input
Use Cases
Create a WiFi QR Code
Create a WiFi QR Code
Generate a QR code that allows users to connect to a WiFi network by scanning.
Create a Contact vCard QR
Create a Contact vCard QR
Generate a QR code that adds contact information to a phone’s address book.
Password-Protected QR Code
Password-Protected QR Code
Create a QR code that requires a password before revealing the content.
Create QR with Custom Logo
Create QR with Custom Logo
Generate a branded QR code with your company logo in the center.
Related Endpoints
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