QR Codes are a core feature of CodeQR.

Everything on CodeQR starts with a QR Code. Whether you’re creating:

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:

PropertyDescriptionExample
idThe unique identifier of the QR Codecm9zsbu1f00019imtllva1p35
urlThe destination URL encoded in the QR Codehttps://expol.ink/p/rTrlexxQcj
shortLinkThe shortened version of the QR Code linkhttps://expol.ink/zfNIPj8Mv24Q-qr
domainThe domain of the QR Codeexpol.ink
keyThe unique slug for the QR CodezfNIPj8Mv24Q-qr
imageThe URL of the generated QR Code imagehttps://res.cloudinary.com/.../qr.png
bgColorThe background color of the QR Code#ffffff
fgColorThe foreground color of the QR Code#4a69ff
sizeThe size of the QR Code in pixels1024
levelThe error correction level of the QR CodeH
showLogoWhether the QR Code includes a logotrue
scansThe number of times the QR Code has been scanned1
createdAtThe timestamp when the QR Code was created2025-04-27T15:09:08.689Z
updatedAtThe timestamp when the QR Code was last updated2025-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.

curl --request POST \
  --url https://api.codeqr.io/qrcodes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"url": "https://google.com"}'

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.

curl --request PATCH \
  --url https://api.codeqr.io/qrcodes/cm9zsbu1f00019imtllva1p35 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"url": "https://www.google.uk"}'

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.

curl --request POST \
  --url https://api.codeqr.io/qrcodes/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"url": "https://google.com"}'

Check out the full API reference for the QR Code upsert endpoint.