QRdx
HelpGuidesDevelopersReact librarySelf-hosting

Update a code

Changes a code's destination, title, design, domain or back-half, or archives it.

Send only the fields to change. archived: true stops redirects and frees a plan slot; false restores the code. The destination, title and design stay editable on every plan.

PATCH
/codes/{id}

Authorization

oauth2 codes:write
headerAuthorizationBearer <token>

An OAuth 2.0 access token, sent as Authorization: Bearer <token>. Register an app in Settings → Developers, send the user through authorization (PKCE S256), then exchange the code for a token. Access tokens last 1 hour; refresh tokens 30 days. Step by step.

Scope: codes:write

Path Parameters

id*string

The code's id

Length1 <= length <= 64

Request Body

application/json
  1. body

The fields to change; at least one

destinationUrl?string

Where a scan sends people: a full http(s) URL, up to 2,048 characters

Length1 <= length <= 2048
title?|

Name shown in the dashboard, up to 100 characters

style?|null
domainId?|null
slug?string

A custom back-half for the short link, such as spring-menu (Pro and Business)

archived?boolean

Response Body

The updated code

application/json
  1. response
data*

A dynamic QR code

curl -X PATCH 'https://api.qrdx.dev/v1/codes/cm5code0spring0menu00001' \  -H 'Content-Type: application/json' \  -d '{  "destinationUrl": "https://example.com/summer-menu"}'
Example Response
{  "data": {    "id": "cm5code0spring0menu00001",    "slug": "aB3dE5f",    "shortLink": "https://qrdx.dev/q/aB3dE5f",    "defaultShortLink": "https://qrdx.dev/q/aB3dE5f",    "domain": null,    "destinationUrl": "https://example.com/summer-menu",    "title": "Spring menu",    "contentType": "url",    "status": "active",    "style": {      "fgColor": "#111827",      "bgColor": "#ffffff",      "bodyPattern": "circle",      "cornerEyePattern": "rounded",      "level": "Q"    },    "scanCount": 128,    "lastScannedAt": "2026-01-12T18:04:11.000Z",    "archivedAt": null,    "createdAt": "2026-01-05T09:30:00.000Z",    "updatedAt": "2026-01-05T09:30:00.000Z",    "organizationId": null  }}

Last updated on