QRdura API
Create and manage dynamic QR codes from your own software. Available on the Agency plan. Base URL: https://api.qrdura.com
Authentication
Create a key under Settings → API (account owner only) and send it as a bearer token. Keys act with the full rights of the account, are shown once, and can be revoked at any time. Billing, team, keys and account deletion are not available via API.
curl https://api.qrdura.com/api/codes \
-H "Authorization: Bearer qd_live_…" \
-H "Content-Type: application/json" \
-d '{"name":"Table 12","destination":"https://example.com/menu?t=12"}'Endpoints
| Method | Path | What it does |
|---|---|---|
GET | /api/codes | List your dynamic codes (newest first), with 30-day scan totals. |
POST | /api/codes | Create a code. Body: { "name", "destination", "domainId"?, "tags"? } |
POST | /api/codes/bulk | Create up to 100 codes per request. Body: { "items": [{ "name", "destination" }], "domainId"? }. Returns { created, errors[] }. |
GET | /api/codes/{id} | One code. |
PATCH | /api/codes/{id} | Change destination, backup, rules, split, webhook, status ("active" | "paused"), name, tags, design, domainId, slug. Only changed fields count as an edit. |
DELETE | /api/codes/{id} | Retire a code (the link keeps answering with a friendly page). |
GET | /api/codes/{id}/stats?days=30 | Scans per day, countries, devices, languages, outcomes (rule / variant / default / failover). |
GET | /api/codes/{id}/history | Change history. |
GET | /api/codes/{id}/qr.svg | Print-ready SVG of the code. |
GET | /api/pages | List hosted pages (WiFi cards). |
POST | /api/pages | Create a WiFi card. Body: { "name", "title"?, "note"?, "wifi": { "ssid", "password", "security": "WPA" | "WEP" | "nopass", "hidden"? } } |
PATCH | /api/pages/{id} | Update a page (e.g. a new WiFi password). Same body as POST. |
GET | /api/static | List saved static codes. |
POST | /api/static | Save a static code. Body: { "name", "kind": "wifi" | "vcard" | "email" | "sms" | "whatsapp" | "geo" | "text" | "url", "fields": { … } } |
GET | /api/domains | Your custom domains and their status (read-only via API). |
GET | /api/export | Everything as JSON (?format=csv for codes as CSV). |
{id} is the code’s UUID from the list. Plan limits are the same as in the dashboard: when a request needs a higher plan the API answers 402 with {"error":"upgrade_required","feature":"…"}; when your code limit is reached, {"error":"limit_reached"}.
Rules
rules is an ordered list; the first rule whose conditions all match decides. Conditions: time ({ tz, days?, from?, to? }), date ({ tz?, start?, end? }, plain dates inclusive), language, country, device ({ in: [...] }), scans ({ max }). Example:
{
"rules": [
{
"id": "dinner-de",
"when": [
{
"type": "language",
"in": [
"de"
]
},
{
"type": "time",
"tz": "America/Bogota",
"from": "18:00",
"to": "23:00"
}
],
"to": "https://example.com/de/dinner"
}
]
}Scan webhooks
Set webhook on a code (https only) and every scan is POSTed as JSON: event, code, at, country, device, language, destination, reason. No personal data. Each request carries x-qrdura-signature: t=<unix>,v1=<hex>, an HMAC-SHA256 of "<t>.<raw body>" with the code’s signing secret (shown in the code editor).
import crypto from 'node:crypto';
// Express: app.post('/qrdura', express.raw({ type: 'application/json' }), handler)
function verifyQrdura(rawBody, header, secret) {
const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? '');
if (!m) return false;
if (Math.abs(Date.now() / 1000 - Number(m[1])) > 300) return false; // replay
const expected = crypto.createHmac('sha256', secret).update(`${m[1]}.${rawBody}`).digest('hex');
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(m[2]));
}Limits
120 requests per minute per key (HTTP 429 with retryAfter when exceeded). Bulk: 100 rows per request. Fair use applies (Acceptable Use Policy).