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
| Content | type value | Create by API | List and read | Image | Analytics | Delete |
|---|---|---|---|---|---|---|
| A URL | url | Yes | Yes | Yes | Yes | Yes |
| A digital business card | (a card, not a qr_code) | Yes | Yes, under /cards | Yes | Yes | Yes |
| A PDF, image or video file | file | No | Yes | Yes | Yes | Yes |
| A landing page | page | No | Yes | Yes | Yes | Yes |
| A GS1 Digital Link | gs1 | No | Yes | Yes | Yes | Yes |
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
/qr-codesThe 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:
| Option | How | Trade-off |
|---|---|---|
| Host the file yourself | Put 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 dashboard | A 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.
| You want | Use | Needs a key? |
|---|---|---|
| A page with the person’s details and a save button | The card’s url, e.g. https://qrbold.com/c/ada-lovelace | No |
| A direct “add to contacts” download | The card’s vcardUrl, e.g. https://qrbold.com/c/ada-lovelace/vcard | No |
| Apple Wallet and Google Wallet passes | GET /cards/:id/wallet | Yes, 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.
/cards/:id/walletcurl "https://api.qrbold.com/api/public/v1/cards/cmf3k2a9x0001/wallet" \
-H "Authorization: Bearer $QRBOLD_API_KEY"{
"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"| Action | Endpoint | Works? |
|---|---|---|
| List and filter by type | GET /qr-codes?type=file | Yes |
| Read one | GET /qr-codes/:id | Yes |
| Download its QR image | GET /qr-codes/:id/image | Yes |
| Read its scans | GET /analytics/:id | Yes |
| Rename, pause, archive | PATCH /qr-codes/:id | Yes |
| Change its content or destination | PATCH /qr-codes/:id | No. destinationUrl on a non-URL code answers 422. |
| Delete | DELETE /qr-codes/:id | Yes |
Cards are not in this list. A card id such as cmf3k2a9x0001 on GET /qr-codes/:id answers 404; read cards through /cards.