QR Code API: Create QR Codes from Your Own System
How to create QR codes through the CodeQR API: the request, the response, bulk creation, your own record IDs, errors, and a no-code option for systems that send webhooks.


A QR code API lets your own system create QR codes by sending a request, and sends back the code's image. With the CodeQR API you send one request with the type of code and the address it should open, and the response returns the code's ID, its short link and the URL of a PNG image. You can create up to 100 codes in one bulk request, tie each code to your own record ID, and, if your system can only send a webhook, use a Make template instead of writing the integration.
What the QR code API does
The API creates and manages QR codes from outside the dashboard. A typical use is a system that has a record, such as an order, a product or a member, and needs a code for it at the moment the record is created. Instead of a person making each code in the dashboard, your system asks for it and stores the result.
The reference for every endpoint and field is in the API reference.
Get an API key
Every request needs an API key from the dashboard. You can set what the key is allowed to do. Our help article on creating an API key and setting permissions shows the steps. Keep the key on your server and out of any page or app that your users can open.
Create one QR code
To create a code, send a POST request to the QR codes address on api.codeqr.io, with a JSON body. The body has these fields:
- Type is required. It tells the API what the code holds, such as a URL or plain text.
- URL or text carries the content, depending on the type.
- Title is a name for the code, so you can find it later.
- Static says whether the code is static or dynamic. It accepts only a JSON boolean, true or false, and not the words in quotes.
- External ID is your own record's ID. More on it below.
- Expires at is an optional expiration date for a dynamic code, in ISO 8601 format and in the future.
- Colors for the foreground and background accept hex values. They default to black on white.
Read the response
The response gives you three things to keep:
- The ID of the QR code in CodeQR.
- The short link. For a dynamic code, this is what the printed pattern holds.
- The image, which is the URL of a PNG of 1024 pixels hosted on a CDN.
Store the ID and the image URL next to your own record. The ID is how CodeQR identifies the code, and the image URL is what you put on a label, in an email or on a page.
Static or dynamic
A static code holds the destination itself. It opens directly, cannot be changed after printing, and CodeQR does not record scans for it. A dynamic code holds a short link: you can change the destination later in CodeQR, and every scan is counted. See our guide on static and dynamic codes for more.
Both kinds count toward a monthly limit on some plans. Static codes are unlimited on Pro, Business, Scale and Enterprise, and count on Free and Starter. Dynamic codes count on every plan. Expiry and password protection need the Starter plan or above. The pricing page has the plans.
Create many codes at once
The bulk endpoint creates up to 100 QR codes per request. Each request carries a list of codes, and a larger batch is split into several requests of up to 100.
If your list lives in a spreadsheet and the volume is small, the spreadsheet routes in our post on creating multiple QR codes may be quicker than writing code.
Use your own record ID
External ID lets you attach your record's ID to the code. It must be unique in the project. If you send one that already exists, the API answers with a 409 conflict and the message "A qrcode with this externalId already exists."
This is useful for safe retries. If your system calls the API twice for the same record, for example after a timeout, the second call fails with a 409 and you do not end up with two codes for one record.
Handle errors
Besides the 409 above, you can meet 401, 403, 404 and 429. One 403 you can predict: expiry and password protection need the Starter plan or above, and on Free the API refuses them with a 403. Our help article on fixing API errors 401, 403, 404, 409 and 429 goes through each one. Log the response body when a call fails.
No code needed: the webhook route
Some systems cannot call an API but can send a webhook, which is a POST request to an address you set. For those, there is a Make template that receives the webhook and creates the code for you. You send three fields: a token, a URL and a title. Make creates a static QR code and answers with the ID, the short link and the image.
The token is a value you choose, which the scenario checks. A wrong or missing token creates nothing, and an invalid URL returns a 400 error. Unlike the Google Sheets templates, the webhook one runs instantly. Our help article on connecting CodeQR to Zapier, Make, n8n and IFTTT covers the connection, and the automation solutions page shows what else you can connect.
Try it with a test code first
Create your account, make a key, and send a first request with a single static code and a title you can recognize. Create a CodeQR account to get started. Open the image URL from the response, scan the code with your phone, and check that it opens the address you sent. Only then connect it to your real records.
Use the Make template for webhooks
Open the Create a QR code from a webhook request and return its image template. The guided setup asks for a webhook, which Make creates for you, and for your CodeQR connection: sign in to CodeQR and allow Make to access the project. Send one sample request to the new webhook address so Make learns the fields token, url and title. Then set your token in the filter that follows the webhook, before you turn the scenario on. Until you do, the filter blocks every request.
Once it is on, point your system at the scenario's webhook address and send the token, the URL and the title, and store the ID, the short link and the image from the answer.
QR code API questions
Send a POST request to the QR codes address on api.codeqr.io with a JSON body that has a type and a URL or text, plus an API key. The response returns the code's ID, short link and image.