---
title: "Generate a ZIP archive of static QR code files"
method: POST
path: "/.netlify/functions/generate-qr-bulk"
---

# Generate a ZIP archive of static QR code files

`POST /.netlify/functions/generate-qr-bulk`

Create a ZIP archive containing up to 50 static QR code assets plus manifest.csv and manifest.json. Use this for spreadsheet, label, classroom, packaging, and agent batch workflows. The endpoint uses the same QR validation, optional API key, security headers, and cost-weighted rate-limit model as the single-code generator.

## Request body

- GenerateBulkQrRequest
  - `rows` union, required — Up to 50 QR payload rows. Provide either a CSV string with headers such as filename,value or an array of row objects with value and optional filename fields.
    - string
    - GenerateBulkQrRow[]
      - `value` string, required — Exact QR payload to encode for this file
      - `filename` string — Optional filename stem. Unsafe characters are replaced before ZIP creation.
      - `name` string — Alternative filename stem accepted for spreadsheet-style rows.
      - `label` string — Alternative filename stem accepted for spreadsheet-style rows.
  - `format` 'svg' | 'png' | 'jpg' | 'webp' | 'pdf' | 'eps' — Shared output format for every generated QR file in the ZIP
  - `size` integer — Pixel width/height for SVG and raster assets, point size for EPS/PDF QR artwork
  - `margin` integer — Quiet-zone margin around every QR code
  - `fgColor` string — Shared foreground color
  - `bgColor` string — Shared background color
  - `errorCorrectionLevel` 'L' | 'M' | 'Q' | 'H' — Shared QR error correction level

## Response `200`

Generated ZIP archive returned as JSON or binary ZIP when Accept includes application/zip

- GenerateBulkQrResponse
  - `success` boolean
  - `data` string — Base64 encoded ZIP archive containing QR files plus manifest.csv and manifest.json
  - `dataUrl` string — Ready-to-download ZIP data URL
  - `contentType` string
  - `extension` string
  - `suggestedFilename` string
  - `byteLength` integer — Exact ZIP byte length
  - `fileCount` integer — Number of generated QR files in the ZIP
  - `failedCount` integer — Number of rows recorded as failed in the manifest
  - `manifest` BulkQrManifestRow[]
    - `filename` string
    - `value` string
    - `format` 'svg' | 'png' | 'jpg' | 'webp' | 'pdf' | 'eps'
    - `status` 'generated' | 'failed'
    - `bytes` integer, nullable
    - `message` string
  - `qrOptions` object
    - `format` 'svg' | 'png' | 'jpg' | 'webp' | 'pdf' | 'eps'
    - `size` integer
    - `margin` integer
    - `fgColor` string
    - `bgColor` string
    - `errorCorrectionLevel` 'L' | 'M' | 'Q' | 'H'

## Other responses

- `400` — Invalid batch request or row data
- `401` — Missing or invalid API key when key enforcement is enabled
- `405` — Method not allowed
- `413` — Batch request or generated ZIP is too large
- `429` — Batch cost exceeds the current rate-limit budget or generation is rate limited
- `500` — No QR files could be generated

---

[API](https://skmtc.net/qrcodecrafter/apis/qrcodecrafter-api.md) · [All operations](https://skmtc.net/qrcodecrafter/apis/qrcodecrafter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qrcodecrafter/qrcodecrafter-api/revisions/bb1a6559fa5d/schema)
