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.

Using the SDKs

The QRs above arrive as image/png bytes, so there is no typed orbit.qr.* resource for them yet — call these routes through the generic orbit.request() helper until one lands:
Python (same call via the SDK’s escape hatch):
The Python SDK is core-scope — it wraps the 8 core resources (messaging, voice, contacts, campaigns, verify, numbers) and reaches everything else through the generic client.request() escape hatch above. See the Python SDK. Returns the qr_data_url envelope shown below. See the SDK index at SDK quickstart.

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:
Response 200 with format=json:
Script-execution URL schemes are rejected with 400:

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. Response 200 with ?format=json:
whatsapp_link is the exact deep link encoded into the QR; phone is the normalized digits. GET /api/v1/qr/sms encodes an sms:{phone}?body={message} URI that opens the native SMS composer.
Response 200 with ?format=json: