The GetQR API is in beta and is available to selected workspaces. Details may change before the general release.
QR code data by type
The
data format of each of the 16 types.Customization
Dot styles, colors, frames and logos.
Access rules
Schedule, scan limit and password.
The QR code object
Every QR code endpoint answers with this object, except Delete and Download. List returns an array of them.string
Unique ID of the QR code, for example
qr_1EPcVfeHZAY2iNoVLsgW2Aqf.string
QR code type, for example
website. See QR code data by type for all 16 values.string | null
Name of the QR code, shown in the dashboard.
string | null
Free-text note about the QR code.
string
The stored payload. For
wifi, vcard, social, multilink, event and sms it is the payload you sent. For every other type it is the short link, so read the destination from url.boolean
true when the QR code is paused.boolean
true for a static QR code made in the dashboard, which has no short link. The API always creates dynamic QR codes.string | null
Full short link, for example
https://getqr.sh/x7Kd2p1.string | null
Domain of the short link.
string | null
Slug of the short link.
boolean
true when the slug was chosen rather than generated.string | null
Destination the short link redirects to.
string | null
Destination for iOS visitors, for
app QR codes.string | null
Destination for Android visitors, for
app QR codes.integer
Total number of scans.
object
Access rules. The password itself is never returned. See Access rules.
string
Read-only.
custom is a design the API can edit in full. branded and ai are a Branded design or AI design made in the dashboard. The API can’t edit its picture, but keeps it when you change other fields.object
The stored design:
styles, frameOptions and logoOptions, each an object or null. They have the same shape as the request fields, so you can send them back. See Customization.object | null
The file of a
pdf, image or video QR code: id, name and size in bytes.string | null
Read-only. Display name of an
app QR code made in the dashboard.object | null
Read-only. A
pdf QR code with several files, made in the dashboard: title, layout and files.object | null
Read-only. An
image QR code with several images, made in the dashboard: title, layout and files.string
Creation date, ISO 8601.
string
Last update date, ISO 8601.
password, userId, workspaceId, projectId) are never returned.
List QR codes
GET /api/v1/qrs
Returns the QR codes in your workspace, one page at a time.
integer
default:"1"
Page to return, 1 or more.
integer
default:"100"
QR codes per page, from 1 to 100. A larger value is rejected.
string
Matches the QR code’s title. Queries longer than 2 characters also match the stored
data. For link types the stored data is the short link, so destination URLs aren’t searchable.string
default:"createdAt"
Field to sort by:
createdAt, updatedAt, clicks (total scans), lastClicked (latest scan) or type. type always sorts descending and ignores sortOrder.string
default:"desc"
Sort direction:
asc or desc.boolean
default:"false"
Include paused QR codes.
boolean
default:"false"
Return only paused QR codes. Overrides
showArchived.true or false. Request the next page while pagination.hasMore is true. See Pagination.
Create a QR code
POST /api/v1/qrs
Creates a QR code and its short link together. Answers 201 Created with the new QR code.
string
Your own retry token. Repeating the request with the same key within 24 hours returns the original response instead of creating a second QR code. See Retries and duplicates.
string
required
What the QR code encodes. It also sets the format
data must be in. One of website, pdf, image, video, whatsapp, social, wifi, app, feedback, vcard, sms, payment, location, multilink, email, event.string
required
The type’s payload, checked against
qrType. An empty string skips the check. The format of each type is in QR code data by type.object
The short link the QR code resolves through. Optional: left out,
link.url follows data.string
Name of the QR code, shown in the dashboard. Trimmed, 1 to 40 characters. Left out, the QR code is untitled.
string
Free-text note about the QR code. Up to 280 characters.
string
The file of a
pdf, image or video QR code, uploaded with the matching target. For vcard, social and multilink, an optional profile image uploaded with the logo target. event accepts it too, but its page reads the cover from data.fileId. Other types get 422. Upload the file with Files first. See Files in QR codes.string
Template whose design is applied to the new QR code. Design fields you send are merged on top of it. A Branded design or AI design template gets
422 (art_template_unsupported). An unknown template, or one from another workspace, gets 404.object
Dot and corner shapes and colors. See Customization.
object
Frame drawn around the QR code and its call-to-action text. See Customization.
object
Logo in the center: a suggested logo or your own file uploaded with the
logo target. An unknown file, an unfinished upload or a file from another target is rejected. See Customization.object
Schedule, scan limit and password protection. See Access rules.
boolean
Whether the QR code is paused.
true creates it paused: scans show the paused page instead of the destination.Retries and duplicates
- With a key. With an
Idempotency-Keyheader, the response is replayed for 24 hours. - Without a key. An identical body sent within 30 seconds is treated as a duplicate.
- Replays. A replay returns the stored response with
x-idempotent-replay: true. A new QR code returnsfalse. - In flight. A second request while the first is still running gets
409 conflict. - Failures. A failed create releases the key at once, so you can retry with the same key.
- Best effort. If the guard is unavailable, creates go through unprotected.
Get a QR code
GET /api/v1/qrs/{qrId}
Returns a QR code with its short link, access rules, design and, for file-based types, its file.
string
required
ID of the QR code, from the list or create response.
Update a QR code
PATCH /api/v1/qrs/{qrId}
Changes the content, destination, design or access rules of a QR code. Send only the fields you want to change. Answers with the updated QR code.
string
required
ID of the QR code.
templateId. Not accepted.link. Partial. The current destination is kept when you omitlink.url.link.domainandlink.keyget422: the short link is what the printed code encodes, so create a new QR code to use a different one.data. Checked against the resulting type only whendataorqrTypechanges. SwitchingqrTypewithout matchingdatais rejected. See Switching type.- Design.
styles,frameOptionsandlogoOptionsare merged into the stored design, so a partial object changes only what it names. Picking another logo replaces it but keeps its size. access. Each key is applied when present.nullclears a rule. Access rules belong underaccess: sending them underlinkgets422.archived. Pauses or reactivates the QR code and its short link together, like Pause and Reactivate.
Set the paused state
PUT /api/v1/qrs/{qrId}
Sets the paused state directly. Pause and Reactivate do the same and read more clearly.
string
required
ID of the QR code.
boolean
required
true to pause the QR code, false to reactivate it.Pause a QR code
POST /api/v1/qrs/{qrId}/pause
Stops the QR code from resolving to its destination: scans show the paused page instead. The printed code and its short link stay valid. No request body.
string
required
ID of the QR code.
Reactivate a QR code
POST /api/v1/qrs/{qrId}/activate
Makes a paused QR code resolve to its destination again. Any schedule and scan limit still apply. No request body.
string
required
ID of the QR code.
Duplicate a QR code
POST /api/v1/qrs/{qrId}/duplicate
Creates a copy with the same content and design. No request body. Answers 201 Created with the new QR code.
string
required
ID of the QR code to copy.
- Short link. The copy gets its own short link, with a random slug on the workspace’s default domain, not the source’s domain. Its scans are counted separately.
- Title. The title gets a
(Copy)suffix. The result stays within 40 characters: a long title is shortened first. An untitled QR code stays untitled. - Not copied. Access rules (password, schedule, scan limit) and the paused state. The copy is always active.
- Files. PDF and image files, including bundle and gallery files, are copied, so the copy owns them. Video files and design files, such as logos, are shared with the source.
Delete a QR code
DELETE /api/v1/qrs/{qrId}
Deletes the QR code and its short link. Answers with the deleted ID.
string
required
ID of the QR code.
string
ID of the deleted QR code.
boolean
Always
true.Download a QR code image
GET /api/v1/qrs/{qrId}/download
Renders the QR code with its design and returns the file.
string
required
ID of the QR code to render, from the list or create response.
string
default:"jpg"
Output format:
jpg, png, svg, pdf (an A4 page) or eps. A Branded design or AI design downloads as jpg, png or pdf only.integer
default:"1024"
Image size in pixels:
1024, 2048 or 4096. svg and pdf ignore it. A Branded design or AI design downloads at 1024 only.- Body. The response body is the file. The suggested file name is in the
Content-Dispositionheader, built from the title, orqr-codefor an untitled QR code. - Caching. Responses carry an
ETagandCache-Control: private, max-age=3600, must-revalidate. Send theETagback inIf-None-Matchto get304 Not Modifiedwhen the QR code hasn’t changed. - Errors. An unsupported format or resolution gets
400 bad_request. The error message names the reason:qr_download_invalid_format,qr_download_invalid_resolution,qr_download_art_format_unsupportedorqr_download_art_resolution_unsupported.
Access rules
Send anaccess object on create or update to schedule a start and an end, cap the number of scans or require a password. Omitted rules stay unchanged, and null clears one. The full behavior, with examples, is in Access rules.
Design objects
styles, frameOptions and logoOptions set the dot and corner shapes, colors, frame and logo. They work the same on QR codes, templates and bulk creations. Unknown shapes, frames or logos are rejected. All accepted values and a worked example are in Customization.
Common issues
422 when setting a password, schedule or scan limit
422 when setting a password, schedule or scan limit
Send the rule under
access, not under link.422 when changing link.domain or link.key
422 when changing link.domain or link.key
The short link can’t change after creation, because the printed code encodes it. Create a new QR code instead.
422 "Expected … for qrType"
422 "Expected … for qrType"
data doesn’t match the format of qrType. Check the type in QR code data by type.409 conflict when creating a QR code
409 conflict when creating a QR code
An identical creation is still running, or
link.key is taken. Retry once the first request finishes. With an Idempotency-Key, the retry returns the original QR code.The download is a JPEG, not a PNG
The download is a JPEG, not a PNG
The parameters are
format and resolution, and format defaults to jpg. Send format=png.404 for a QR code I can see in the dashboard
404 for a QR code I can see in the dashboard
Every request runs in the workspace of your API key. Check that the QR code belongs to it. See Authentication.