Skip to content
API key

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

The parts of a QR code workflow
PieceWhat it isExample
Digital business cardThe public profile page for a person.https://qrbold.com/c/ada-lovelace
QR codeA picture that contains one web address and nothing else.A PNG, SVG or PDF file
DestinationThe page a person ends up on after scanning.The card page, or any URL you choose
Dynamic QR codeA code whose picture contains a QRBold link, so its destination can be changed later.https://qrbold.com/p/spring-menu
Static QR codeA 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:

Which endpoint to use
You wantDo thisCreates a new record?
The QR code for a cardDownload the image with the card’s id: GET /qr-codes/:id/imageNo. The card is its own QR code.
A QR code that opens some other URLPOST /qr-codes, then download its image the same way.Yes, a qr_code object.
  1. Card

    POST /cards returns id and url

  2. QR image

    GET /qr-codes/{card id}/image

  3. Print or display

    Badge, email signature, packaging

  4. Scan

    The phone opens the card’s url

Get the QR code for a card

GET/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 with cards:read or qr: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 url field. 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.

Image query parameters
NameTypeRequiredDescription
formatstringOptionalFile format. svg and pdf stay sharp at any print size. One of png, svg, pdf, jpeg, webp. Default: png.
sizeintegerOptionalWidth in pixels, 128 to 4096. A framed code is taller than it is wide. pdf is one page at 300 dpi. Default: 512.
transparentbooleanOptionaltrue leaves the background clear. png, webp and svg only. Default: false.
downloadbooleanOptionaltrue answers with Content-Disposition: attachment so a browser saves the file. Default: false.

Choosing a format

Image formats and when to use each
FormatUse it forNotes
pngScreens, emails, most uses.Supports a transparent background.
svgProfessional print and design tools.Vector: sharp at any size. Supports a transparent background.
pdfSending straight to a printer.One page, rendered at 300 dpi.
jpegSystems that accept nothing else.No transparency. Slightly soft edges; prefer PNG.
webpWeb pages where file size matters.Supports a transparent background.

Choosing a size

  • size is 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=600 or more. Or use svg or pdf and 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.svg

Responses 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:

  1. Open the card or the QR code in the dashboard and design its QR code there.
  2. Save.
  3. 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

POST/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 full https:// address to send people to.
Which endpoint do I use?
POST /qr-codes with a name and a destinationUrl.
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"
  }'
POST /qr-codes body
NameTypeRequiredDescription
namestringRequiredLabel shown in the dashboard, 1 to 200 characters.
destinationUrlstringRequiredWhere a scan lands. Must be a full http or https URL. Can be changed later.
shortCodestringOptionalCustom slug: letters, numbers and hyphens, up to 100 characters. Default: a random 8-character code.
statusstringOptionaldraft 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.

201 response
{
  "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"
}
QR code object fields
FieldWhat it is
idSave this. You need it to download the image and to change the destination.
urlThe short link. This is what the QR picture contains, and it never changes.
destinationUrlWhere the short link sends people now. You can change it.
typeurl for every code the API creates. Codes made in the dashboard can be file, page or gs1.
statuspublished unless you asked for draft.
pausedtrue means the plan does not currently cover this code, and scans will not be forwarded.
scanCountTotal 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.png

What happens on a scan

  1. Scan

    The phone opens the short link

  2. QRBold

    Counts the scan

  3. 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

PATCH/qr-codes/:id

To 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"
  }'
PATCH /qr-codes/:id body
NameTypeRequiredDescription
namestringOptional1 to 200 characters.
destinationUrlstringOptionalA full http or https URL. URL codes only; other types answer 422.
statusstringOptionalpaused 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.
How to do common things to a QR code
You want toSendEffect 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 itDELETE /qr-codes/:idIt stops forwarding. Restorable from Trash in the dashboard for 30 days.
  • Only url codes can be re-pointed. Sending destinationUrl for 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 and dynamic QR codes compared
StaticDynamic
What the picture containsThe final addressA QRBold short link
Change the destination after printingNoYes
Scans countedNoYes
Can be pausedNoYes
Depends on QRBold being reachableNoYes
Created by the QRBold APINoYes, 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 url field.
  • 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.
  • paused is false on 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.