Getting started
Core concepts and URLs
QRBold’s vocabulary in plain English: which address does what, what the API hands back, and the pairs of things that are easy to confuse.
Environments and base URLs
There is one environment, production, and one base URL:
https://api.qrbold.com/api/public/v1- No sandbox. There are no test keys and no test mode. A request you send creates real cards and real QR codes in your account.
- HTTPS only.
- The version is in the path.
v1is the current and only version. See versioning. https://api.qrbold.com/api/v1is not this API. That is the private API the dashboard itself uses. It takes a login session rather than an API key, has a different response shape, and changes without notice. Do not build on it.
Four kinds of URL
| Kind | Example | Opened by | Needs sign-in? |
|---|---|---|---|
| API endpoint | https://api.qrbold.com/api/public/v1/cards | Your server | An API key |
| Dashboard | https://qrbold.com/dashboard | You | Your QRBold login |
| Public card URL | https://qrbold.com/c/ada-lovelace | Anyone | No |
| Public QR link | https://qrbold.com/p/spring-menu | Anyone | No |
The first is what your code calls. The last two are what a QR code contains and what an end user’s phone opens. They are returned to you in the url field of a card or a QR code. If the account uses a custom domain, url uses that domain instead of qrbold.com.
How a scan travels
Creating something and somebody opening it are two separate journeys. First, creation:
Your server
Holds the API key
QRBold API
POST /cards
Card object
id, url, vcardUrl
Your database
Store the id and the url
Then, a scan of that card’s QR code:
Printed QR code
Contains the card’s url
Phone camera
Opens the url
Public card page
qrbold.com/c/… The scan is counted
And a scan of a dynamic URL code, which has one more hop:
Printed QR code
Contains the short link
QRBold short link
qrbold.com/p/… The scan is counted
Your destination
The destinationUrl you set, changeable any time
Your API key is involved in none of the scan journeys. Scans are counted on QRBold’s public page, and you read the totals later through analytics.
Ids and URLs
Most confusion comes from five pairs. In each, the left is for your code and the right is for people.
Card id
cmf3k2a9x0001A permanent identifier. You pass it to the API to read, update or delete the card. Never shown to end users.
Card URL
https://qrbold.com/c/ada-lovelaceThe public web page. This is what you share and what the card’s QR code contains.
QR code id
cmf3k4c2e0003Identifies a QR code in API calls, including the call that downloads its image.
QR image
GET /qr-codes/cmf3k4c2e0003/imageThe picture itself. There is no public image URL: you download the file with your key and host or print it.
API endpoint
https://api.qrbold.com/api/public/v1/cards/cmf3k2a9x0001Returns JSON to your server. Needs a key.
Public URL
https://qrbold.com/c/ada-lovelaceReturns a web page to anyone. Needs nothing.
Short link
https://qrbold.com/p/spring-menuThe fixed address a QR code contains. It never changes, so the print never changes.
Destination URL
https://example.com/menu/springWhere the short link forwards to. You can change it whenever you like.
Short code (slug)
ada-lovelaceThe last part of a public URL. Random unless you choose one. Unique across all of QRBold.
Id
cmf3k2a9x0001Assigned by QRBold and never chosen by you. Use the id, not the slug, in API paths.
Two more distinctions about actions rather than things:
- Creating versus updating.
POSTmakes a new thing and returns a new id.PATCHchanges an existing thing and keeps its id and its URL. Sending the samePOSTtwice makes two things unless you use an idempotency key. - A successful response versus a working result.
201means the record exists. It does not prove a person can open it: checkpausedisfalse, then openurlyourself.
The objects
Every JSON response has an object field naming what it is.
| object | What it is | Guide |
|---|---|---|
card | A digital business card: one person’s public profile. | Create a card |
card_template | A design, plus rules about which fields a card may set. | Choose a template |
qr_code | Any QR code in the account that is not a card. | Dynamic QR codes |
scan_stats | Scan totals and breakdowns for a period. | Analytics |
wallet_links | Apple Wallet and Google Wallet links for a card. | vCard and wallet |
campaign | A group that creates cards from your own JSON shape. | Campaigns |
list | A page of any of the above, with pagination details. | Pagination |
api_key_context | What the key you sent is allowed to do. | Quickstart |
A card and a QR code are separate kinds of thing with separate endpoints. A card is not listed under /qr-codes, and a card id on /qr-codes/:id answers 404. The exceptions are the image and analytics endpoints, which accept either kind of id.
New fields may be added to any object at any time. Ignore the ones you do not recognise rather than failing on them.
Status and paused
Cards and QR codes have a status and a separate paused flag.
| status | Meaning | Does the public URL open? |
|---|---|---|
published | Live. The default for anything the API creates. | Yes |
draft | Not released yet. | Yes, as a preview, if it has never been published. No, if it was published and then set back to draft. |
paused | Switched off on purpose, or parked by a plan limit. | No. Visitors see a “not active” page. |
archived | Retired and hidden from default lists. | No |
paused: true on an object means the account’s plan no longer covers it, for example after a downgrade. The record exists and its QR code is valid, but scanning it does not open the content. Nothing else in the response says so, which is why you should check it before printing.
Static and dynamic QR codes
A static QR code contains the final address itself. Change the address and you must reprint the code. Nothing in between can count scans.
A dynamic QR code contains a short link that forwards to the final address. You can change where it forwards without touching the print, and each scan passes through QRBold and is counted.
Every code the QRBold API creates is dynamic, and so is every card’s QR code. The API has no option to create a static code. The QR code guide compares the two in detail.