Introduction
Learn how to use CodeQR to programmatically create, update, and manage QR Codes at scale.
QR Codes are a core feature of CodeQR.
Everything on CodeQR starts with a QR Code. Whether you’re creating:
- a single QR Code for your marketing campaign
- hundreds of QR Codes for your event registrations
- thousands of QR Codes, programmatically, for your product catalog
In this guide, we’ll cover the QR Code model, how to create QR Codes, and more.
The QR Code model
The QR Code model consists of the following properties:
Property | Description | Example |
---|---|---|
id | The unique identifier of the QR Code | cm9zsbu1f00019imtllva1p35 |
url | The destination URL encoded in the QR Code | https://expol.ink/p/rTrlexxQcj |
shortLink | The shortened version of the QR Code link | https://expol.ink/zfNIPj8Mv24Q-qr |
domain | The domain of the QR Code | expol.ink |
key | The unique slug for the QR Code | zfNIPj8Mv24Q-qr |
image | The URL of the generated QR Code image | https://res.cloudinary.com/.../qr.png |
bgColor | The background color of the QR Code | #ffffff |
fgColor | The foreground color of the QR Code | #4a69ff |
size | The size of the QR Code in pixels | 1024 |
level | The error correction level of the QR Code | H |
showLogo | Whether the QR Code includes a logo | true |
scans | The number of times the QR Code has been scanned | 1 |
createdAt | The timestamp when the QR Code was created | 2025-04-27T15:09:08.689Z |
updatedAt | The timestamp when the QR Code was last updated | 2025-04-27T15:09:08.689Z |
For more advanced features like custom QR Code designs, scan tracking, and more, see the full list of properties here.
You can use the various CodeQR SDKs to programmatically manage your QR Codes.
Create a QR Code
The url
field, representing the destination URL, is the sole mandatory parameter required for the creation of a new QR Code.
Check out the full API reference for the QR Code creation endpoint.
Update a QR Code
An existing QR Code can be updated by providing the id
to the update
method. This method returns the updated QR Code as a response.
Check out the full API reference for the QR Code update endpoint.
Upsert a QR Code
Upserting a QR Code is a combination of creating and updating a QR Code. If a QR Code with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new QR Code will be created.
Check out the full API reference for the QR Code upsert endpoint.