Skip to main content
EZQR

API QR Code

QR Code Generator REST API — Programmatic Codes, Batch, Analytics

Create, update, list, and analyze QR codes from your own code — REST API with bearer-token auth, 100 RPM per key, batch endpoint for 100 codes per call, and full scan analytics.

Max plan — $20/mo

The REST API ships with the Max plan

Bearer-token auth, 100 RPM per key, batch endpoint up to 100 codes per call, full scan analytics. Generate a key from Settings → API Keys after upgrading.

About API QR Codes

The dashboard is the right tool for printing 50 codes for a trade show. The REST API is the right tool when QR codes are part of your product — when every new customer record needs a vCard QR, every shipment needs a tracking QR, every order confirmation email needs a personalized payment QR. Anything that scales past "I open the dashboard once a week" belongs in the API, not the form.

The surface is small and predictable. POST `/api/v1/qr-codes` with { name, content_type, content, target_url? } creates a code and returns the QR record with its ID, short link, and the URL to fetch the PNG/SVG/PDF. GET `/api/v1/qr-codes` lists your codes with cursor pagination and filters. PATCH `/api/v1/qr-codes/{id}` updates the destination for dynamic codes — repoint without reprinting. GET `/api/v1/qr-codes/{id}/scans` pulls scan analytics broken down by date, country, device, and referrer. POST `/api/v1/qr-codes/batch` creates up to 100 codes per call — chain calls for the same workflows you'd otherwise run via bulk CSV import.

Auth is bearer token: Authorization: Bearer ezqr_your_key in every request. Rate limit is 100 requests per minute per API key; rate-limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) come back on every response so retry logic is straightforward. The API is on the Max plan ($20/mo) alongside bulk CSV import; the two pair: bulk for one-shot operations, API for anything continuous. Static codes you create via the API survive cancellation — the destination is encoded into the pattern; dynamic codes route through EZQR's redirect for as long as the subscription is active.

Walkthrough

How to Create a API QR Code

  1. Generate an API key

    Sign up, upgrade to the Max plan ($20/mo), and create an API key from Settings → API Keys. Keys are scoped to your account and revocable at any time. Name each key by environment (prod, staging, dev-tasnim) so audit logs are useful.

  2. Make your first request

    POST /api/v1/qr-codes with { "name": "Customer 4471", "content_type": "url", "content": "https://app.example.com/c/4471", "target_url": "https://r.ezqr.io/abc123" } and an Authorization: Bearer ezqr_... header. Response: the QR record with id, short_code, and asset URLs for PNG/SVG/PDF.

  3. Batch-create where the workflow allows

    POST /api/v1/qr-codes/batch takes an array of up to 100 code definitions in one call. Single-call overhead per code drops to milliseconds, and you stay well under the 100 RPM rate limit. Chain calls if you need more than 100 codes; pair with the bulk CSV import for one-shot operations larger than that.

  4. Repoint dynamic codes after printing

    PATCH /api/v1/qr-codes/{id} with { "target_url": "https://new-destination.com" } updates the redirect for a dynamic code. The printed QR stays the same; the destination changes server-side. Useful when campaigns end, product pages move, or experimental landing pages get rotated.

  5. Pull analytics for attribution and dashboards

    GET /api/v1/qr-codes/{id}/scans?from=2026-01-01&to=2026-01-31 returns aggregated scan counts by date, country, device, and referrer. Pipe into your warehouse, attribution platform, or internal dashboard — every printed-campaign scan is now structured data your team can query.

Where it works

API QR Code Use Cases

SaaS products that mint a QR per customer record — ticketing platforms, e-commerce tools, event-management software where every booking, order, or attendee needs a unique scannable code.

Internal tools that auto-generate codes for asset tracking, inventory, employee badges, or facility wayfinding — IT, ops, and HR teams use the API to keep code generation invisible to non-technical staff.

Marketing platforms creating campaign-specific QRs programmatically — one code per email recipient, per ad creative, per landing-page variant, so attribution is downstream-resolvable.

Print-on-demand and merchandise services that embed QR codes into generated artwork — the API call sits in the order pipeline, returning the SVG to drop into the product template.

CRM and ERP integrations that mint a code when a new contact, product, or order is created — Salesforce flows, HubSpot workflows, NetSuite scripts, all calling the API on record-create triggers.

Logistics and shipping platforms that need a QR per shipment, pallet, or container linking to the tracking record — the API runs in the warehouse pipeline at scale.

Real estate platforms generating a QR per listing on import, linking to the showing schedule or virtual tour, refreshed daily as inventory rotates.

Fitness and gym software (gym/fitness QRs) generating member-specific QRs for check-in, locker assignment, or class registration.

Hospitality platforms generating a QR per room, table, or guest — hotel apps and restaurant POS that hand QRs out at scale.

What works in practice

API QR Code Best Practices

Store API keys in environment variables (EZQR_API_KEY), never in source code or version control. Use a secrets manager (Vercel, Doppler, 1Password, AWS Secrets Manager) for production deployments.

Use the batch endpoint (`/api/v1/qr-codes/batch`) for bulk creation — never loop the single-create endpoint. The batch endpoint takes 100 codes per call with milliseconds of overhead; looping single-create burns rate limit and adds tens of seconds.

Implement exponential-backoff retry on 429 (rate-limited) responses. Read X-RateLimit-Reset to know when the window resets. Standard backoff: 1s, 2s, 4s, 8s — fail to a dead-letter queue after 4 retries.

Cache QR records on your side — don't re-fetch the same code on every render. The API returns immutable fields (ID, short code, content) and mutable ones (target URL, scan count); cache the immutable bits aggressively, refresh mutable bits on a TTL that matches your dashboard's refresh cadence.

Use [dynamic codes](/qr-codes/dynamic) for anything you might want to repoint later. Static codes via the API work but cannot be updated after creation. If the destination might shift in the next 12 months, dynamic is the right choice even though it requires an active subscription.

Name keys by environment (prod, staging, dev-firstname) and rotate at a regular cadence. Revoke immediately on team turnover or suspected compromise; the dashboard lets you generate a replacement and keep the old one alive for a grace period.

Set a per-environment scope for testing — your staging key should not be able to mutate production codes. Configure key scopes from Settings → API Keys → Permissions.

Idempotency for batch endpoints: include an Idempotency-Key header with a UUID per logical batch operation. Retries with the same key return the same result without duplicating codes — essential for queue-based workflows where the same job might fire twice.

API QR Code FAQ

Common questions about generating, printing, and deploying these codes.

Related Articles

Related Industries

Related Guides

Related Tools

Ready to create your API QR code?

Free, no watermarks. Generate and download in seconds.

Generate Free QR Code