Generate QR code
generate_qr_codeRead-onlyIdempotent
Use this when the user wants a QR code: for a website link, plain text, an email, a phone number, an SMS, a contact card (vCard), or a calendar event. Returns the code as SVG with PNG and SVG download links, plus scan warnings (low contrast, high density) and an optional minimum print size. Plain text and SMS text are limited to 1,500 characters; URLs to 2,000; encoded content must fit the QR byte capacity (1,273–2,953 bytes depending on error correction). Generates static codes only; it does not shorten links, track scans, or make Wi-Fi codes. Do not use for barcodes (EAN/UPC/Code 128).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | For kind=event: end as local date-time YYYY-MM-DDTHH:MM, e.g. 2026-11-05T21:00. For an all-day event, the last day YYYY-MM-DD (inclusive). | |
| url | No | For kind=url: the http or https web address, e.g. https://example.com/menu. https:// is added if missing. | |
| body | No | For kind=email: prefilled body, e.g. Hi, I would like to book a table for 4. | |
| kind | Yes | What the code should do when scanned: url (open a website), text (show plain text), email (compose an email), phone (call a number), sms (start a text message), contact (save a vCard contact), event (add a calendar event). Example: url. | |
| name | No | For kind=contact: full name, e.g. Jane Doe. For kind=event: event title, e.g. Launch party. | |
| text | No | For kind=text: the text to encode, e.g. Table 12 - ask for the specials. For kind=sms: the prefilled message, e.g. JOIN. | |
| No | For kind=email: recipient address, e.g. hello@example.com. For kind=contact: the contact's email. | ||
| phone | No | For kind=phone, sms, or contact: phone number, ideally in international format, e.g. +1 415 555 0100. Letters (1-800-FLOWERS) are converted to keypad digits; an extension such as "ext. 23" is dialled after a pause. | |
| start | No | For kind=event: start as local date-time YYYY-MM-DDTHH:MM, e.g. 2026-11-05T18:30, or a date YYYY-MM-DD for an all-day event. Times are local to the phone that scans the code. | |
| title | No | For kind=contact: job title, e.g. Head of Sales. | |
| subject | No | For kind=email: subject line, e.g. Table booking. | |
| website | No | For kind=contact: website URL, e.g. https://example.com. | |
| location | No | For kind=event: venue or address text shown in the calendar entry, e.g. Pier 39, San Francisco. | |
| background | No | Background colour as hex, e.g. #FFFFFF (default). | |
| foreground | No | Code (module) colour as hex, e.g. #111111 (default). Dark colours scan best. Basic colour names like navy or black also work. | |
| organization | No | For kind=contact: company or organization, e.g. Acme Inc. | |
| error_correction | No | Damage tolerance, e.g. M: L 7%, M 15% (default), Q 25%, H 30%. Use H for printed codes that may get scuffed or carry a logo sticker. | |
| scan_distance_cm | No | Optional distance in centimetres from which people will scan the printed code, e.g. 300 for a poster across a room; used to recommend a minimum print size. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | ||
| kind | Yes | ||
| modules | Yes | ||
| payload | Yes | ||
| request | Yes | ||
| summary | Yes | ||
| version | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| background | Yes | ||
| foreground | Yes | ||
| contrast_ratio | Yes | ||
| error_correction | Yes | ||
| min_print_size_cm | Yes |