---
title: "Change a code (send only what changes)"
method: PATCH
path: "/codes/{id}"
tags: ["codes"]
---

# Change a code (send only what changes)

`PATCH /codes/{id}`

## Request

- Base URL: `https://qrflow.codes/api/v1`
- URL: `https://qrflow.codes/api/v1/codes/{id}`
- Auth: HTTP bearer

## Request body

- UpdateCode
  - `destination_data` object
  - `label` string, nullable
  - `paused` boolean
  - `expires_at` string, date-time, nullable
  - `slug` string, nullable
  - `domain_id` string, uuid, nullable
  - `fg_color` string
  - `bg_color` string
  - `frame_style` string
  - `frame_caption` string, nullable
  - `frame_caption2` string, nullable

## Response `200`

OK

- object
  - `code` Code
    - `id` string, uuid
    - `label` string, nullable
    - `kind` string
    - `kind_label` string
    - `type` string
    - `destination_data` object
    - `destination` string
    - `dynamic` boolean
    - `dynamic_capable` boolean
    - `short_code` string
    - `short_url` string: What to print for a dynamic code
    - `domain_id` string, nullable
    - `fg_color` string
    - `bg_color` string
    - `has_logo` boolean
    - `frame_style` string, nullable
    - `frame_caption` string, nullable
    - `scans` integer
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `manage_url` string
    - `image_url` string: Print-ready SVG; needs the Authorization header
    - `svg_download_url` string: Same SVG through a signed link that works for 24 hours with no header
    - `png_download_url` string: Plain PNG (no frame or logo) through a signed 24-hour link
    - `download_expires_at` string, date-time

## Other responses

- `400`: Not dynamic, invalid name, no domain
- `409`: Link name already used

---

[API](https://skmtc.dev/qrflow/apis/qrflow-codes-api.md) · [All operations](https://skmtc.dev/qrflow/apis/qrflow-codes-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qrflow/apis/qrflow-codes-api/revisions/76e294bbe2b6?raw)
