# qr9 > qr9 is a Swiss service for QR codes whose target can still be changed after printing (dynamic QR codes), with scan statistics, custom designs and custom domains. Hosted in Switzerland. ## API REST API for agencies and print shops. Included in the Business and Agentur plans. - Base URL: https://qr9.ch/api/v1 - Machine-readable description (OpenAPI 3.1): https://qr9.ch/openapi.json - Human documentation (German): https://qr9.ch/entwickler ### Authentication Create an API key in the account under "API". Send it with every request: Authorization: Bearer qr9_... Requests and responses are JSON. Rate limit: 120 requests per minute per account. ### Endpoints - `GET /qr-codes`: list QR codes, newest first. Query: `client_id`, `per_page` (max 100), `page`. - `POST /qr-codes`: create a link QR code. Required: `name`, `target_url`. Optional: `type` (`dynamic` by default, or `static`), `slug`, `client_id`, `custom_domain_id`, `expires_at` (date), `design` (`fg_color`, `bg_color`, `dot_style`). - `GET /qr-codes/{id}`: get one QR code. - `PATCH /qr-codes/{id}`: change `name`, `target_url`, `slug`, `client_id` or `expires_at`. Send only the fields to change. - `GET /qr-codes/{id}/image?format=svg|png`: the QR code as an image file. - `GET /qr-codes/{id}/scans?days=30`: scan total and scans per day (max 90 days). - `GET /clients`: the account's clients, to assign QR codes to. - `POST /clients`: create a client. Required: `name`. Optional: `company`. Returns the client with its `id`. - `GET /domains`: the account's custom domains. Send the `id` of a verified one as `custom_domain_id` when creating a code. ### Example curl -X POST https://qr9.ch/api/v1/qr-codes \ -H "Authorization: Bearer qr9_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "Summer flyer", "target_url": "https://example.ch/summer", "slug": "summer-sale"}' The response wraps the code in `data`. `short_url` is the link encoded in the QR code; `id` is used for all later calls. Every id (`id`, `client_id`, `custom_domain_id`) is a random string, never a number. ### Response shapes Every JSON response has its payload under `data`. A QR code (`POST /qr-codes`, `GET /qr-codes/{id}`, `PATCH /qr-codes/{id}`; `GET /qr-codes` returns an array of these plus `meta` with `current_page`, `last_page`, `per_page`, `total`): {"data": {"id": "k3x9q7m2p0a8d4fz", "name": "Summer flyer", "type": "dynamic", "content_type": "url", "target_url": "https://example.ch/summer", "slug": "summer-sale", "short_url": "https://qr9.ch/r/summer-sale", "client_id": null, "custom_domain": null, "scan_count": 128, "expires_at": null, "created_at": "2026-11-13T09:00:00+00:00", "updated_at": "2026-11-13T09:00:00+00:00"}} Scans (`GET /qr-codes/{id}/scans`). `total` counts all scans since the code was created, the same number as `scan_count` on the code; `days` covers the requested period, oldest day first, including days with 0: {"data": {"total": 128, "timezone": "Europe/Zurich", "days": [{"date": "2026-11-12", "count": 3}, {"date": "2026-11-13", "count": 5}]}} Clients (`GET /clients`): {"data": [{"id": "w8n2c5t1r6y0b3hj", "name": "Bakery Smith", "company": null}]} Domains (`GET /domains`). `https` turns true once the certificate is issued: {"data": [{"id": "p4v7h1s9e2m6q0ld", "domain": "qr.example.ch", "client_id": "w8n2c5t1r6y0b3hj", "verified": true, "https": true}]} ### Things to know - A dynamic code encodes a short link (`short_url`). Changing `target_url` later does not change the printed code. - `slug` is the readable end of the short link. It is normalised to lowercase letters, digits and hyphens and must be unique across all of qr9. When a slug is changed, the former one keeps working. - A static code encodes the target itself. It cannot be changed afterwards and has no scan statistics. - QR codes cannot be deleted through the API. Deleting breaks printed material, so it is only possible in the dashboard. - Every target is checked against Google Safe Browsing; unsafe URLs are rejected with 422. - Errors are JSON: 401 invalid key, 403 plan without API or QR code limit reached (`error` is `plan_required` or `qr_limit_reached`), 404 unknown id, 422 invalid input with messages per field under `errors` (in German), 429 rate limit. - Other content types (vCard, WiFi, SMS, e-mail, text) and logos can only be created in the dashboard. ## Pages - [Home](https://qr9.ch): overview and prices - [Create a QR code](https://qr9.ch/qr-code-erstellen): free generator, no sign-up - [Dynamic QR codes](https://qr9.ch/dynamischer-qr-code) - [Terms](https://qr9.ch/en/terms) and [privacy policy](https://qr9.ch/en/privacy)