POST /accesskey

Creates a QR-code access key. Exactly one of deviceId or groupId must be provided. The key is usable immediately within its time window.

Request body

FieldRequiredNotes
namerequiredDisplay name for the key
startTimerequiredISO 8601
endTimerequiredISO 8601; must be after startTime
deviceIdone ofUUID from GET /devices
groupIdone ofUUID from GET /groups
externalReferenceIdoptionalYour own reference — echoed in MQTT events
{
  "name": "Key for Bob",
  "groupId": "<group-uuid>",
  "startTime": "2024-03-15T00:00:00Z",
  "endTime": "2024-12-31T00:00:00Z",
  "externalReferenceId": "ERP-REF-001"
}

Response 200

{
  "status": "success",
  "message": "Access key created successfully",
  "data": {
    "name": "Key for Bob",
    "accessKey": "https://app.scanseqr.com/key/<signed-url>",
    "uuid": "<access-key-uuid>",
    "externalReferenceId": "ERP-REF-001",
    "startTime": "2024-03-15T00:00:00Z",
    "endTime": "2024-12-31T00:00:00Z"
  }
}

The accessKey URL is a signed, time-limited link the end user opens on their phone to download the QR code. Store the uuid to delete the key later.

curl

curl -s -X POST \
  -H "Authorization: SQRv1 Credential=<key>, Timestamp=<ts>, Signature=<sig>" \
  -H "X-SQR-Content-Hash: <sha256-of-body>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Key for Bob","groupId":"<group-uuid>","startTime":"2024-03-15T00:00:00Z","endTime":"2024-12-31T00:00:00Z"}' \
  "/accesskey"
GET /accesskeys

Returns all non-expired access keys created by this integration. accessCount is the number of times the QR was successfully used.

Response 200

{
  "status": "success",
  "message": "Access keys retrieved successfully",
  "count": 1,
  "data": {
    "accesskeys": [
      {
        "name": "Key for Bob",
        "uuid": "<access-key-uuid>",
        "accessKey": "https://app.scanseqr.com/key/<signed-url>",
        "startTime": "2024-03-15T00:00:00.000Z",
        "endTime": "2024-12-31T00:00:00.000Z",
        "externalReferenceId": "ERP-REF-001",
        "deviceUuid": null,
        "deviceName": null,
        "groupUuid": "<group-uuid>",
        "groupName": "Room 1",
        "accessCount": 3
      }
    ]
  }
}
DELETE /accesskey/{accessKeyUUID}

Deletes an access key. Only deletes keys owned by this integration. The key is immediately unusable — any user who already downloaded the QR will be denied at scan time.

Path parameters

ParameterDescription
accessKeyUUIDUUID from POST /accesskey or GET /accesskeys

Response 200

{ "status": "success", "message": "Access key deleted successfully" }

curl

curl -s -X DELETE \
  -H "Authorization: SQRv1 Credential=<key>, Timestamp=<ts>, Signature=<sig>" \
  -H "X-SQR-Content-Hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" \
  "/accesskey/<accessKeyUUID>"