Guide
Generate a QR code for your digital business card
A card already has a QR code the moment it is created. This guide shows how to download it, how to create separate dynamic QR codes that point at any URL, and how to check the result before you print.
The pieces
| Piece | What it is | Example |
|---|---|---|
| Digital business card | The public profile page for a person. | https://qrbold.com/c/ada-lovelace |
| QR code | A picture that contains one web address and nothing else. | A PNG, SVG or PDF file |
| Destination | The page a person ends up on after scanning. | The card page, or any URL you choose |
| Dynamic QR code | A code whose picture contains a QRBold link, so its destination can be changed later. | https://qrbold.com/p/spring-menu |
| Static QR code | A code whose picture contains the final address itself. It can never be changed. | Not created by this API |
There are two different jobs, and they use different endpoints:
| You want | Do this | Creates a new record? |
|---|---|---|
| The QR code for a card | Download the image with the card’s id: GET /qr-codes/:id/image | No. The card is its own QR code. |
| A QR code that opens some other URL | POST /qr-codes, then download its image the same way. | Yes, a qr_code object. |
Card
POST /cards returns id and url
QR image
GET /qr-codes/{card id}/image
Print or display
Badge, email signature, packaging
Scan
The phone opens the card’s url
Get the QR code for a card
/qr-codes/:id/image- What is it?
- The QR picture for a card, as a file.
- Why would I use it?
- To print it or show it, so that a scan opens the card.
- What do I need first?
- The card’s
id, and a key withcards:readorqr:read. - Which endpoint do I use?
GET /qr-codes/:id/image, with the card id in place of:id.- What result should I expect?
- The response body is the image itself, not JSON. Save it to a file.
This downloads a 1024-pixel PNG for the example card cmf3k2a9x0001 and saves it as qr.png:
curl "https://api.qrbold.com/api/public/v1/qr-codes/cmf3k2a9x0001/image?format=png&size=1024" \
-H "Authorization: Bearer $QRBOLD_API_KEY" \
--output qr.png- What the code contains: exactly the card’s
urlfield. Nothing else is encoded, and no personal data is stored in the picture. - Updating the card does not change the code. The code points at the card’s address, and the address stays the same when the card’s content changes.
- The response is binary. Do not call
res.json()on it. Read it as bytes, as the samples do.
Image options
All four are optional query parameters.
| Name | Type | Required | Description |
|---|---|---|---|
format | string | Optional | File format. svg and pdf stay sharp at any print size. One of png, svg, pdf, jpeg, webp. Default: png. |
size | integer | Optional | Width in pixels, 128 to 4096. A framed code is taller than it is wide. pdf is one page at 300 dpi. Default: 512. |
transparent | boolean | Optional | true leaves the background clear. png, webp and svg only. Default: false. |
download | boolean | Optional | true answers with Content-Disposition: attachment so a browser saves the file. Default: false. |
Choosing a format
| Format | Use it for | Notes |
|---|---|---|
png | Screens, emails, most uses. | Supports a transparent background. |
svg | Professional print and design tools. | Vector: sharp at any size. Supports a transparent background. |
pdf | Sending straight to a printer. | One page, rendered at 300 dpi. |
jpeg | Systems that accept nothing else. | No transparency. Slightly soft edges; prefer PNG. |
webp | Web pages where file size matters. | Supports a transparent background. |
Choosing a size
sizeis the width in pixels, from 128 to 4096. The default is 512.- For print, allow about 300 pixels per inch: a code printed 2 inches (5 cm) wide needs
size=600or more. Or usesvgorpdfand stop thinking about pixels. - A code with a frame around it is taller than it is wide, so do not assume a square.
- As a rule of thumb, print a code no smaller than 2 cm (0.8 in) across, and keep a blank margin around it.
An SVG with a transparent background, for a designer:
curl "https://api.qrbold.com/api/public/v1/qr-codes/cmf3k2a9x0001/image?format=svg&transparent=true" \
-H "Authorization: Bearer $QRBOLD_API_KEY" \
--output qr.svgResponses may be cached privately for an hour. If you change a code’s design in the dashboard, allow for that before expecting a new picture from a cache.
Styling
The API cannot set a QR code’s appearance. There are no parameters for colours, dot shapes, a logo, a frame or error correction. The only things a request controls are the file format, the pixel size and whether the background is transparent.
The image endpoint draws the code with whatever design is saved for it in the dashboard. So the workflow for a branded code is:
- Open the card or the QR code in the dashboard and design its QR code there.
- Save.
- Download the image through the API. It comes back with that design.
A code that has never been designed is plain black on white. When many cards should share a look, check one downloaded image before generating the rest.
Create a dynamic QR code
/qr-codes- What is it?
- A QR code that sends people to a URL you choose, through a QRBold short link.
- Why would I use it?
- For menus, packaging, posters and anything printed whose destination may change later.
- What do I need first?
- A key with
qr:write, and a fullhttps://address to send people to. - Which endpoint do I use?
POST /qr-codeswith anameand adestinationUrl.- What result should I expect?
- A qr_code object with an id, and a url that is the short link the picture will contain.
curl -X POST "https://api.qrbold.com/api/public/v1/qr-codes" \
-H "Authorization: Bearer $QRBOLD_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Spring menu",
"destinationUrl": "https://example.com/menu/spring",
"shortCode": "spring-menu"
}'| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Label shown in the dashboard, 1 to 200 characters. |
destinationUrl | string | Required | Where a scan lands. Must be a full http or https URL. Can be changed later. |
shortCode | string | Optional | Custom slug: letters, numbers and hyphens, up to 100 characters. Default: a random 8-character code. |
status | string | Optional | draft marks the code as not yet released. Its short link still resolves for preview until it has been published and then unpublished. One of draft, published. Default: published. |
Unlike card creation, this endpoint is strict: a key it does not recognise answers 422.
{
"object": "qr_code",
"id": "cmf3k4c2e0003",
"name": "Spring menu",
"type": "url",
"status": "published",
"shortCode": "spring-menu",
"url": "https://qrbold.com/p/spring-menu",
"destinationUrl": "https://example.com/menu/spring",
"paused": false,
"scanCount": 0,
"createdAt": "2026-10-09T09:35:00.000Z",
"updatedAt": "2026-10-09T09:35:00.000Z"
}| Field | What it is |
|---|---|
id | Save this. You need it to download the image and to change the destination. |
url | The short link. This is what the QR picture contains, and it never changes. |
destinationUrl | Where the short link sends people now. You can change it. |
type | url for every code the API creates. Codes made in the dashboard can be file, page or gs1. |
status | published unless you asked for draft. |
paused | true means the plan does not currently cover this code, and scans will not be forwarded. |
scanCount | Total scans so far. |
Then download the picture, this time with the QR code’s id:
curl "https://api.qrbold.com/api/public/v1/qr-codes/cmf3k4c2e0003/image?format=png&size=1024" \
-H "Authorization: Bearer $QRBOLD_API_KEY" \
--output qr.pngWhat happens on a scan
Scan
The phone opens the short link
QRBold
Counts the scan
Destination
The browser is sent on to destinationUrl
The forwarding is done by a small QRBold page in the visitor’s browser, not by an HTTP 301 or 302 response. For a person scanning with a phone there is no visible difference. For a script it matters: fetching the short link with cURL returns an HTML page and does not follow through to your destination, so test with a real browser or a real phone.
Change, pause and delete a code
/qr-codes/:idTo point a printed code somewhere new, send only the new destination. Fields you leave out stay as they are, which is the opposite of how a card update behaves.
curl -X PATCH "https://api.qrbold.com/api/public/v1/qr-codes/cmf3k4c2e0003" \
-H "Authorization: Bearer $QRBOLD_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"destinationUrl": "https://example.com/menu/summer"
}'| Name | Type | Required | Description |
|---|---|---|---|
name | string | Optional | 1 to 200 characters. |
destinationUrl | string | Optional | A full http or https URL. URL codes only; other types answer 422. |
status | string | Optional | paused stops the code redirecting without losing it. archived hides it from the default list. Both are undone by setting published. One of draft, published, paused, archived. |
| You want to | Send | Effect on a scan |
|---|---|---|
| Change where it goes | {"destinationUrl": "https://…"} | The next scan goes to the new address. Nothing is reprinted. |
| Switch it off for a while | {"status": "paused"} | Visitors see a “not active” page. |
| Switch it back on | {"status": "published"} | It forwards again. |
| Retire it but keep its history | {"status": "archived"} | It stops forwarding and leaves the default list. |
| Remove it | DELETE /qr-codes/:id | It stops forwarding. Restorable from Trash in the dashboard for 30 days. |
- Only
urlcodes can be re-pointed. SendingdestinationUrlfor a file, page or GS1 code answers 422. - The short code of an existing code cannot be changed through the API.
- A card’s status cannot be changed through the API at all. Pause or unpublish a card in the dashboard.
Static versus dynamic
| Static | Dynamic | |
|---|---|---|
| What the picture contains | The final address | A QRBold short link |
| Change the destination after printing | No | Yes |
| Scans counted | No | Yes |
| Can be paused | No | Yes |
| Depends on QRBold being reachable | No | Yes |
| Created by the QRBold API | No | Yes, always |
Every code this API creates is dynamic, and so is every card’s code. If you need a static code, encode the address directly with any QR library; QRBold is not involved and cannot report on it.
Test the result
Do this with one code before you generate a thousand.
- The image file opens and shows a QR code.
- A phone camera recognises it at the size you will actually print or display.
- It opens the address in the object’s
urlfield. - The correct card, or the correct destination, appears.
- It works in a private browser window and on a phone that is not signed in to QRBold.
pausedisfalseon the card or code object.- The scan shows up in analytics a short while later.
- For a dynamic code: change the destination, scan again, and confirm the new page opens.
- For print: test a proof on the real material. Gloss, curves and low contrast all make scanning harder.
The end-to-end tutorial puts card creation and the QR download together in one script.