Skip to main content
The GetQR API is in beta and is available to selected workspaces. Details may change before the general release.
Control when a QR code resolves, how many times it can be scanned, whether it asks for a password, and whether it is paused or deleted.

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 an access 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.
Access rules belong under access. Sending activeAt, pauseAt, scanLimit, password or passwordProtected under link gets 422.

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.
Send 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:
The lifetime scan counter always runs, whether or not a limit is set. That makes changing the limit predictable:
  • 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 same access 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 password to turn protection on. passwordProtected on 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 than access 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:
You can also set the paused state with 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:
Deleting can’t be undone. The short link stops resolving, so printed codes stop working. Pause the QR code instead if you may need it again.

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

The QR code has no password yet. Send password instead of passwordProtected: true.
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.

What’s next

QR codes

QR code data by type