Skip to content
API key

Guide

QR content types

The dashboard makes several kinds of QR code. The API creates one of them. This page says exactly which, and how to cover PDFs, images, video and contact cards with what the API does offer.

At a glance

What the API can do with each QR content type
Contenttype valueCreate by APIList and readImageAnalyticsDelete
A URLurlYesYesYesYesYes
A digital business card(a card, not a qr_code)YesYes, under /cardsYesYesYes
A PDF, image or video filefileNoYesYesYesYes
A landing pagepageNoYesYesYesYes
A GS1 Digital Linkgs1NoYesYesYesYes

So there are two things the API creates: digital business cards and URL QR codes. Every other type is created in the dashboard and is read-only through the API, apart from renaming, changing status and deleting.

URL codes

POST/qr-codes

The one type the API creates: a dynamic code that forwards to an http or https address, which you can change later. The QR code guide covers it in full.

The destination must be a web address. Schemes such as mailto:, tel:, sms: or WIFI: are not accepted as a destinationUrl.

PDF, image and video

Not creatable through the API. In the dashboard, a file QR code uploads your file to QRBold, which hosts it. That upload has no REST endpoint.

There are two ways to get the same outcome from code:

Ways to link a QR code to a file
OptionHowTrade-off
Host the file yourselfPut the PDF, image or video on your own storage or CDN at a public https address, then create a URL code with that address as destinationUrl.Fully automated. The file is served from your hosting, not QRBold’s. You can swap the file later by changing the destination.
Create it in the dashboardA person uploads the file in the dashboard. Your code then lists it, downloads its QR image and reads its scans.QRBold hosts the file. Creation is manual.

The first option, for a PDF menu:

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 (PDF)",
    "destinationUrl": "https://example.com/files/spring-menu.pdf"
  }'
  • The file must be reachable without signing in, or scanners will see a login page.
  • QRBold does not check the file’s type or size, because it never sees the file.
  • For video, linking to the video’s page on a hosting service works the same way.

vCard and contact sharing

QRBold has no separate “vCard QR code” in the API, and does not need one: a digital business card is the contact. Every card object carries a link that downloads it as a standard .vcf file.

Contact-sharing links on a card
You wantUseNeeds a key?
A page with the person’s details and a save buttonThe card’s url, e.g. https://qrbold.com/c/ada-lovelaceNo
A direct “add to contacts” downloadThe card’s vcardUrl, e.g. https://qrbold.com/c/ada-lovelace/vcardNo
Apple Wallet and Google Wallet passesGET /cards/:id/walletYes, to fetch the links. No, to open them.

The card’s QR code encodes url, the page, not the .vcf file. That is deliberate: the page works on every phone, and the contact stays up to date when the card is edited. The contact details are not stored inside the QR picture.

GET/cards/:id/wallet
curl "https://api.qrbold.com/api/public/v1/cards/cmf3k2a9x0001/wallet" \
  -H "Authorization: Bearer $QRBOLD_API_KEY"
200 response
{
  "object": "wallet_links",
  "cardId": "cmf3k2a9x0001",
  "enabled": true,
  "apple": "https://qrbold.com/c/ada-lovelace/wallet/apple",
  "google": "https://qrbold.com/c/ada-lovelace/wallet/google",
  "installs": {
    "apple": {
      "issued": 12,
      "installed": 9
    },
    "google": {
      "issued": 4,
      "installed": 3
    }
  }
}

apple or google is null when that wallet cannot issue a pass for the card. The pass design is edited in the dashboard, on the card’s Wallet tab.

Landing pages

Not creatable through the API. A page code opens a landing page built in the dashboard’s page builder. The API lists page codes with type: "page" and serves their images and analytics, and it cannot create one or edit its content.

GS1 Digital Link

Not creatable through the API. GS1 codes for product packaging are made in the dashboard. In the API they appear with type: "gs1", and their url is the GS1 Digital Link itself.

Reading codes you cannot create

Dashboard-made codes are ordinary members of the account as far as reading goes:

curl "https://api.qrbold.com/api/public/v1/qr-codes?type=file" \
  -H "Authorization: Bearer $QRBOLD_API_KEY"
What you can do with a code made in the dashboard
ActionEndpointWorks?
List and filter by typeGET /qr-codes?type=fileYes
Read oneGET /qr-codes/:idYes
Download its QR imageGET /qr-codes/:id/imageYes
Read its scansGET /analytics/:idYes
Rename, pause, archivePATCH /qr-codes/:idYes
Change its content or destinationPATCH /qr-codes/:idNo. destinationUrl on a non-URL code answers 422.
DeleteDELETE /qr-codes/:idYes

Cards are not in this list. A card id such as cmf3k2a9x0001 on GET /qr-codes/:id answers 404; read cards through /cards.