Getting started
Quickstart: make your first API request
Five steps, about five minutes. By the end you will have an API key and a successful response from the QRBold API.
Step 1: Get access
API keys are created in the dashboard. There is no API call that creates one.
- Sign in and open Settings → Developer API. In the dashboard’s left sidebar choose Settings, then Developer API in the settings menu.
- Click New API key.
- Give it a name that says what it is for, such as “HR onboarding sync”. You will be glad of it when you have three keys.
- Choose its scopes. A scope is a permission. For this quickstart any scope will do, because the first request needs none. For the guides that follow, select
cards:read,cards:write,templates:read,qr:read,qr:writeandanalytics:read. - Choose whether the key expires (never, 30 days, 90 days or one year), and create it.
- Copy the key now. It is shown once. QRBold stores only a hash of it, so nobody, including support, can show it to you again.
The page only appears to people who may manage API keys on the account. If you were invited to someone else’s account and cannot see it, ask the account owner to create the key for you.
Step 2: Understand authentication
Every request carries the key in an HTTP header. Nothing else: no cookies, no signing, no token exchange.
Authorization: Bearer YOUR_API_KEYReplace YOUR_API_KEY with the whole key, including the qrb_live_ prefix. If your tool can only set a custom header name and value, X-API-Key: YOUR_API_KEY works the same way.
Do not paste the key into your code. Put it in an environment variable and let your code read it from there. Every example in these docs reads it from QRBOLD_API_KEY:
export QRBOLD_API_KEY="qrb_live_your_key_here"$env:QRBOLD_API_KEY = "qrb_live_your_key_here"A request with a missing or wrong key answers 401 with the code invalid_api_key. To stop a key working, revoke it on the same dashboard page; it fails on the very next request. The authentication guide covers scopes, rotation and revoking in full.
Step 3: Understand the base URL
Every endpoint starts with the same base URL:
https://api.qrbold.com/api/public/v1QRBold has several addresses, and they do different jobs. Mixing them up is the most common first mistake.
| What | Address | Who uses it |
|---|---|---|
| The API server | https://api.qrbold.com/api/public/v1 | Your code, with an API key. |
| The dashboard | https://qrbold.com/dashboard | You, in a browser, signed in. |
| A public card | https://qrbold.com/c/<shortCode> | Anyone who scans the card’s QR code. No sign-in. |
| A public QR link | https://qrbold.com/p/<shortCode> | Anyone who scans a QR code. It forwards them to the destination. |
You call the first one. Your users only ever see the last two. An API endpoint is never what a QR code points at. Core concepts and URLs explains each in detail.
Step 4: Send the first request
GET /me tells you which key you are using and what it may do. It needs no scope and changes nothing, so it is safe to run as often as you like.
curl "https://api.qrbold.com/api/public/v1/me" \
-H "Authorization: Bearer $QRBOLD_API_KEY"Running the samples
- cURL: paste it into a terminal where
QRBOLD_API_KEYis set. On Windows, use PowerShell’scurl.exeand write$env:QRBOLD_API_KEYin place of$QRBOLD_API_KEY. - JavaScript: save it as
me.mjsand runnode me.mjs. It needs Node.js 20 or later and no packages. The.mjsextension lets the file useawaitat the top level. - Python: run
pip install requestsonce, save the sample asme.pyand runpython me.py.
{
"object": "api_key_context",
"key": {
"id": "cmf3jz8n10000",
"name": "HR onboarding sync"
},
"scopes": [
{
"scope": "cards:read",
"description": "List and retrieve digital business cards"
},
{
"scope": "cards:write",
"description": "Create, update and delete digital business cards"
}
],
"account": {
"id": "cmf2x9u4w0000",
"email": "you@example.com",
"plan": "pro"
},
"rateLimit": {
"requestsPerMinute": 120
}
}rateLimit.requestsPerMinute is how many requests this key may make each minute. scopes lists what it may do. If a scope you need is missing, create a new key: scopes cannot be added to an existing one.
Step 5: Troubleshoot the request
If you did not get a 200, find your status below.
| You see | Most likely cause | Fix |
|---|---|---|
401 invalid_api_key | The key is missing, incomplete or revoked. An empty environment variable sends “Bearer ” with nothing after it. | Print the variable (echo $QRBOLD_API_KEY) and check it starts with qrb_live_. |
403 upgrade_required_api | The key is fine, but the account’s plan does not include the REST API. | Upgrade to Pro or the Business card plan. |
403 forbidden | The key lacks the scope the endpoint needs. Not possible on /me, common on the next request you make. | Create a key with the scope named in the message. |
404 unknown_endpoint | Wrong base URL or method, for example leaving out /api/public/v1. | Use https://api.qrbold.com/api/public/v1/me exactly. |
404 resource_not_found | The id in the path does not exist in this account. | Use an id returned by a create or list request. |
422 validation_failed | The request body or a query parameter is not valid. | Read error.details; it names each field. |
429 | More requests than the key’s per-minute limit. | Wait the number of seconds in the RateLimit-Reset header. |
500 | A fault on QRBold’s side, or a request body that is not valid JSON. | Check the body is valid JSON, then retry after a short wait. |
| HTML, or a response without an “error” object | The request went to https://qrbold.com or to https://api.qrbold.com/api/v1, which is the dashboard’s private API. | Send it to https://api.qrbold.com/api/public/v1. |
An error always tells you what went wrong in the same shape:
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API key"
}
}Every code, with its cause and whether to retry, is in the error reference.
Next
Your key works. Now create your first digital business card.