---
title: "Update a dynamic QR record"
method: PATCH
path: "/api/dynamic-qr/{slug}"
---

# Update a dynamic QR record

`PATCH /api/dynamic-qr/{slug}`

Requires the current ETag in If-Match. Set rotateToken to true to replace the bearer capability; the old token is immediately invalid.

## Headers

- `If-Match` string, required
- `X-Dynamic-QR-Version` string

## Request body

- DynamicQrUpdateRequest
  - `destination` string, uri
  - `label` string
  - `status` 'active' | 'paused'
  - `rotateToken` boolean — Replace the bearer capability and return the new token once in the response.

## Response `200`

Updated dynamic QR record

- DynamicQrUpdateResponse
  - `success` boolean, required
  - `record` DynamicQrRecord, required
    - `slug` string, required
    - `destination` string, uri, required
    - `label` string, required
    - `status` 'active' | 'paused', required
    - `version` integer, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `redirectUrl` string, uri, required
  - `analytics` DynamicQrAnalyticsSummary — Enabled on the production deployment. The analytics property remains optional so non-production or deliberately disabled deployments can omit it.
    - `available` boolean, required — False when analytics are enabled but aggregate storage is temporarily unavailable.
    - `approximate` true, required — Counts are best-effort redirects, not unique people or guaranteed scans.
    - `retentionDays` 90, required
    - `dailyCountLimit` 100000, required — Maximum aggregate redirects counted for one slug in one UTC day. Later eligible redirects still work but are not counted.
    - `totalScans` integer — Lifetime aggregate redirect count. Present when analytics storage is available.
    - `daily` object[]
      - `date` string, date, required
      - `count` integer, required
    - `lastCountedAt` string, date-time
  - `managementToken` string — Present only when rotateToken is true; store it because it is not returned again.
  - `managementUrl` string, uri

## Other responses

- `400` — Invalid JSON or update fields
- `401` — Missing, malformed, or invalid capability token
- `403` — Cross-origin management write rejected
- `412` — Missing or stale If-Match ETag
- `423` — The record is operator-blocked and cannot be updated or resumed by its capability holder
- `503` — Dynamic QR storage unavailable; no record was changed

---

[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/versions/8b7eace2bb78/schema)
