> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linquid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# QR API

> Create, update, delete, and analyze link-attached QR codes

# QR API

QR endpoints manage QR lifecycle per link and expose scan analytics.

## Endpoint matrix

| Method   | Path                | Purpose                   |
| -------- | ------------------- | ------------------------- |
| `POST`   | `/qr/links/:linkId` | Create QR code for a link |
| `GET`    | `/qr/links/:linkId` | List QR codes for a link  |
| `GET`    | `/qr/:qrId`         | Fetch one QR code         |
| `PATCH`  | `/qr/:qrId`         | Update QR attributes      |
| `DELETE` | `/qr/:qrId`         | Delete QR code            |
| `GET`    | `/qr/:qrId/scans`   | Retrieve scan analytics   |

## Create payload highlights (`POST /qr/links/:linkId`)

* `name` (required)
* `size` (optional, defaults applied)
* `format` (optional, typically image format)
* `errorCorrection` (optional)
* `imageData` (optional data URL; uploaded if valid)

## Operational behavior

* Link ownership and workspace scope are strictly validated.
* Plan QR limits are enforced on create.
* Secure signature material is generated per QR for verification use cases.
* Scan metrics are merged from persisted values and analytics backend where available.

## Permission model

* Create: `links:create`
* Read: `links:read`
* Update: `links:update`
* Delete: `links:delete`
* Scan analytics: `analytics:read`

## Caching

QR reads and scan-stat routes use snapshot caching to reduce repeated analytics load.

## Typical failures

* `404 NOT_FOUND` for missing link/QR
* `403 LIMIT_EXCEEDED` when QR quota is reached
* `409 DUPLICATE_CODE` on duplicate code within a link
* `500 CONFIG_ERROR` when QR signing secret is unavailable

Related docs:

* `/user-guides/manual/growth/deep-links-and-qr-reference`
* `/api-reference/webhooks/overview`
