smallapis

QR & Barcode API

Structured QR payloads (Wi-Fi, vCard, calendar event, SMS, geo) built for you, plus colours, centre logo and error-correction control. Barcodes cover EAN, UPC, Code 128, DataMatrix, PDF417 and more.

3 endpoints

Click one to see its parameters and a ready-to-paste curl call.

POST /v1/qr Generate a QR code

Builds the payload for you: plain text, URL, Wi-Fi credentials, vCard, calendar event, email, SMS, phone or geo point.

Returns: binary image

ParameterTypeDescription
type string text, url, wifi, vcard, email, sms, tel, geo or event. Default: text
data string Payload for type=text and type=url.
format string png, svg, webp or jpeg. Default: png
size integer Side length in pixels, 64-2048. Default: 512
errorCorrection string L, M, Q or H. Use H when adding a logo. Default: M
color string Foreground hex colour. Default: #000000
background string Background hex colour. Default: #ffffff
logoUrl string Public URL of a logo to place at the centre.
ssid string Network name for type=wifi.
password string Network password for type=wifi.
name string Full name for type=vcard.
phone string Phone number for vcard, sms and tel.
email string Email address for vcard and email.
curl -X POST "https://173-249-18-142.sslip.io/v1/qr" \
  -H "X-API-Key: $SMALLAPIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"text","format":"png","size":512,"errorCorrection":"M"}' \
  --output result.bin
POST /v1/barcode Generate a barcode

Generate a barcode

Returns: binary image

ParameterTypeDescription
type string code128, ean13, upca, datamatrix, pdf417 and 15 more. Default: code128
data required string Value to encode.
scale integer Module scale, 1-8. Default: 3
height integer Bar height in millimetres, 4-60. Default: 12
includeText boolean Print the human-readable value. Default: true
curl -X POST "https://173-249-18-142.sslip.io/v1/barcode" \
  -H "X-API-Key: $SMALLAPIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"code128","data":"https://example.com","scale":3,"height":12}' \
  --output result.bin
GET /v1/barcode/types List the supported barcode symbologies

List the supported barcode symbologies

Returns: json

No parameters.

curl -H "X-API-Key: $SMALLAPIS_KEY" \
  "https://173-249-18-142.sslip.io/v1/barcode/types" --output out.bin