The GetQR API is in beta and is available to selected workspaces. Details may change before the general release.
Before you start
- Role. Setting rules, pausing, reactivating and deleting need write access to QR codes in the workspace. See Authentication.
- Subscription. Every API request needs an active subscription of the workspace owner, including these.
The access object
Send anaccess object when you create or update a QR code:
Fields you omit stay unchanged. Send
null to clear a rule. A partial access object never resets rules you didn’t mention.
Schedule a start and an end
activeAt and pauseAt are independent: set either one or both. Both take ISO 8601 date-times, with Z or a UTC offset.
null to clear the schedule. This makes the QR code active immediately and removes the end date:
Scan limit
Cap the total number of scans. After that, the QR code stops resolving:- Raising the limit frees up exactly (new limit minus total scans) more scans.
- Lowering the limit below the current total blocks the QR code immediately.
- Setting a limit later counts the scans taken while no limit was set.
scanLimit must be a positive integer, up to 2147483647. Send null for unlimited.
Password protection
Set a password through the sameaccess object. The stored password is kept when you switch protection off, so you can turn it back on without sending it again.
1
Set or change the password
This also turns protection on.
2
Turn protection off
The stored password is kept.
3
Turn protection back on
No need to resend the password. This works only once a password has been set. Otherwise the request gets
422.- On create. Send
passwordto turn protection on.passwordProtectedon its own has no effect until a password exists. - Removing the password. Send
"password": null. Protection turns off too. - Reading. Responses never return the password, only
access.passwordProtected.
Pause, reactivate and delete
Pausing and reactivating are separate endpoints rather thanaccess fields, because they take effect at once instead of on a schedule.
Pause and activate take no request body and return the updated QR code:
PUT /api/v1/qrs/{qrId} and { "archived": true }, or with archived in a PATCH. See Set the paused state.
Deleting removes the QR code and its short link together:
When changes take effect
- Next scan. Rules are checked when a code is scanned, so a change applies from the next scan, not retroactively.
- Paused page. A QR code blocked by a schedule, a scan limit or a pause shows the paused page. The scan isn’t redirected.
- Password. Visitors who already entered the password keep access until the password changes, or until protection is switched off and on again.
- Clock. Schedules use the server clock in UTC, not the visitor’s local time.
- Rules combine. A QR code resolves only when it isn’t paused, is within its schedule and is under its scan limit.
Common issues
422 when setting a rule under link
422 when setting a rule under link
Send the rule under
access, not link.422 when turning password protection on
422 when turning password protection on
The QR code has no password yet. Send
password instead of passwordProtected: true.The QR code still shows the paused page after reactivating
The QR code still shows the paused page after reactivating
A schedule or scan limit still applies. Check
access.activeAt, access.pauseAt and access.scanLimit in the QR code, and compare scans with the limit.I need the link to expire
I need the link to expire
link.expiresAt isn’t available on this API. Use access.pauseAt instead.