Skip to main content

QR Code API

Server-rendered QR code images. Useful for print collateral, in-store posters, kiosk touchpoints, and “scan to start chatting” prompts. Base path: /api/v1/qr Authentication: API key (X-API-Key) or session JWT. Limits: Image size (size) must be between 50 × 50 and 1024 × 1024 pixels. Defaults to 300 × 300 if omitted.

Shared parameters

Every route accepts the same two rendering parameters:

Response formats

By default every route returns raw image/png bytes (Content-Type: image/png), ready to embed in a print template or <img> tag. Pass ?format=json to receive a base64 data URL inside the standard JSON envelope instead — useful when you want to render the QR client-side or store the image alongside its source values.
The qr_data_url field is a ready-to-use data: URL you can drop straight into an <img src="...">. The /whatsapp and /sms routes additionally return the encoded deep link (whatsapp_link / sms_link) and the normalized phone.

Generate — arbitrary URL or text

GET /api/v1/qr/generate encodes any URL or plain-text string you provide.
Request the JSON envelope instead of the raw image:

WhatsApp click-to-chat poster

GET /api/v1/qr/whatsapp encodes a https://wa.me/{phone} deep link that opens a pre-filled WhatsApp chat.
Returns a PNG. Embed directly in a print template or <img> tag. GET /api/v1/qr/sms encodes an sms:{phone}?body={message} URI that opens the native SMS composer.