Guide · API · verified 12 July 2026

Dynamic QR code APIs: build vs buy, with working examples

A dynamic QR code API does three jobs: generate the image, manage the redirect behind it (so printed codes can be re-pointed forever), and emit scan events your systems can act on. Image generation alone is free and commoditised — the redirect infrastructure and event pipeline are what you're really building or buying.

Facts cite primary sources (each vendor's own pricing pages and docs). Out of date? Tell us and we'll fix it.

The three layers of a dynamic QR system

  1. Image generation — encoding a URL as a QR graphic. Commoditised: open-source libraries (segno, qrcode.js) and free APIs do this well.
  2. The managed redirect — the short URL inside the code, resolving in milliseconds, re-pointable after printing, on a domain that won't disappear. This is real infrastructure: hot-path storage, custom domains with HTTPS, uptime.
  3. The event pipeline — scan analytics (source, device, geo, bots filtered) and real-time delivery to your systems: webhooks, Slack, automation tools.

Build-vs-buy is really about layers 2 and 3. Layer 1 is a library import; layers 2 and 3 are an ops commitment — redirect uptime is forever, because the codes are printed.

Worked example: a dynamic QR in three calls

These run against the live xengo API (Pro plan; full spec at /v1/openapi.json).

1. Create the link (the thing the QR encodes)

curl -X POST https://api.neon.xengo.io/v1/links \
  -H "Authorization: Bearer $XENGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destination": "https://acme.com/spring-offer",
    "code": "spring24",
    "tags": { "campaign": "spring" }
  }'

2. Fetch the QR as print-ready SVG

curl https://api.neon.xengo.io/v1/links/spring24/qr?scale=10 \
  -H "Authorization: Bearer $XENGO_API_KEY" > spring24.svg

3. Re-point it after printing (the "dynamic" part)

curl -X PATCH https://api.neon.xengo.io/v1/links/spring24 \
  -H "Authorization: Bearer $XENGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "destination": "https://acme.com/summer-offer" }'

The printed code never changes; every scan now lands on the new destination. Add a webhook channel and each scan also arrives as a signed JSON event — headers, payload and verification code are on the events page.

If you build it yourself

Honest checklist of what layer 2 + 3 actually involve:

That's a real (and interesting) engineering project — it's roughly what we built. If it's core to your product, build it. If it's plumbing for your actual job, buy it from us or, honestly, from any of the platforms in our cited comparisons.

Frequently asked questions

What's the difference between a static and a dynamic QR code API?

A static API encodes your destination URL directly into the image — free, but the printed code can never change. A dynamic API encodes a short redirect URL it controls, so you can re-point the destination after printing, track scans, and trigger events. The image generation is the commodity; the managed redirect is the product.

Can I get a webhook when a QR code is scanned?

Only on platforms whose dynamic QR rides on an event pipeline. On xengo every scan can fire a signed webhook (or 23 other channels) within seconds; several QR-first platforms offer scan webhooks on mid tiers; free static generators can't, by definition — they never see the scan.

Why not just use a free QR generator API?

For a poster you'll never change, do. For anything printed at volume or operationally important, the free static code is a liability: no re-pointing after a URL change, no scan analytics, no alerts, and no continuity promise if the generator disappears.

One platform. Everything a link should do.

Smart URLs, dynamic QR codes and a full API — branded on your own domain, safety-screened, and tracked. Build, re-point and measure it all in one place.

Start free trial
1,284 clicks
go.acme.com/spring
1 London 412
2 Manchester 168
3 Bristol 94

Smart URLs

Branded short links on a domain you control — editable, screened, and tracked.

Popular Smart URLs features

  • Your own custom domain, auto-HTTPS
  • Re-point live links without reprinting
  • Every destination safety-screened
  • Honest, bot-filtered analytics

Dynamic QR

Branded QR codes you can re-point any time — never reprint the poster again.

Popular Dynamic QR features

  • Editable destination behind every code
  • Your brand colours + logo
  • Real-time scan alerts
  • Per-code scan analytics
$ curl -X POST api.xengo.io/v1/links
{
  "domain": "go.acme.com",
  "url": "https://acme.com/…"
}
→ 201 go.acme.com/aB3xK

API

Create and manage links + QR at scale, straight from your own tools.

Popular API features

  • REST API with scoped keys
  • Bulk-create thousands of links
  • Programmatic QR generation
  • Webhooks + click / scan alerts