Developer API

Barcode & QR Code Generator API

Generate codes from your own backend, label printer, or ecommerce platform. One authenticated request in, a print-ready image out.

Generate a barcode

curl -G https://codeforger.app/api/public/v1/barcode \
  -H "Authorization: Bearer $CODEFORGE_KEY" \
  -d symbology=code128 \
  -d value=SKU-48812-A \
  -d format=svg \
  -o barcode.svg

Supported symbologies: upc, ean13, ean8, code128, code39, itf14, itf, msi, codabar.

Generate a QR code

POST https://codeforger.app/api/public/v1/qr
Authorization: Bearer $CODEFORGE_KEY
Content-Type: application/json

{
  "value": "https://example.com/product/48812",
  "format": "png",
  "size": 1024,
  "ecc": "H",
  "dark": "#101010",
  "light": "#ffffff"
}

Add "dynamic": true to get a short URL you can repoint later, with scan analytics attached.

Parameters

/api/public/v1/barcode

ParamDefaultNotes
valuerequiredThe data to encode. Max 512 characters.
symbologycode128upc, ean13, ean8, code128, code39, itf14, itf, msi or codabar.
formatpngpng, svg or json.
scale2Module width in pixels, 1–12.
height100Bar height in pixels, 20–600.
texttrueSet to false to omit the human-readable line (SVG only).

/api/public/v1/qr

ParamDefaultNotes
valuerequiredThe payload to encode. Max 2000 characters.
formatpngpng, svg or json.
size512Target image size in pixels, 64–2048.
eccMError correction level: L, M, Q or H.
margin4Quiet zone in modules, 0–20.
dark / light#000000 / #ffffffHex colours (SVG output).

Authenticate every call with Authorization: Bearer YOUR_KEY. Errors return JSON with an error.code such as invalid_api_key, quota_exceeded or encode_failed.

Get an API key

API access is included with the Business plan, along with unlimited dynamic codes and a custom short domain.

When to call an API instead of using the tool

If a human is making one code, the browser tool wins — it is faster than writing a request. The API earns its place when codes are a byproduct of something else: a new product row in your catalogue, a shipment created in your WMS, a ticket issued at checkout.

In those flows you want the image generated at the moment the record is created, stored alongside it, and reused by every downstream template. Generating on demand from a stable identifier keeps the code and the record from drifting apart.

Request SVG for print pipelines and PNG for emails and PDFs that cannot embed vectors. Cache the result against your identifier — the same input always produces the same symbol, so there is no reason to pay for a second call.

Frequently asked questions