{"openapi":"3.1.0","info":{"title":"QRChannels API","version":"1.0.0","description":"Read your organization's channels, displays, scans, presence and guard tours, and follow its event feed. Authenticate with `Authorization: Bearer qrc_live_…`. Limit: 600 requests per minute per key. POST requests accept an `Idempotency-Key` header."},"servers":[{"url":"https://qrchannels.io/api/public/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"qrc_live_<32 base62>"}},"schemas":{"Page":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object"}},"next_cursor":{"type":["string","null"]}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}},"paths":{"/channels":{"get":{"summary":"List channels","x-scope":"channels:read","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"Page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}}}},"/channels/{id}":{"get":{"summary":"Get a channel","x-scope":"channels:read","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Channel"},"404":{"description":"Not found"}}},"patch":{"summary":"Turn a channel on or off","x-scope":"channels:write","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"enum":["on","off"]}}}}}},"responses":{"200":{"description":"Updated"},"409":{"description":"Locked or archived"},"422":{"description":"Rejected by a plan or safety rule"}}}},"/beacons":{"get":{"summary":"List displays","x-scope":"beacons:read","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"Page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}}}},"/scans":{"get":{"summary":"List scans (newest first)","x-scope":"scans:read","security":[{"apiKey":[]}],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"channel_id","in":"query","schema":{"type":"string"}},{"name":"result","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"Page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}}}},"/scans/{id}":{"get":{"summary":"Get a scan with signals and action trace","x-scope":"scans:read","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scan"}}}},"/presence":{"get":{"summary":"List presence records","x-scope":"presence:read","security":[{"apiKey":[]}],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"channel_id","in":"query","schema":{"type":"string"}},{"name":"scanner_id","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"Page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}}}},"/chains/runs":{"get":{"summary":"List guard-tour runs with steps","x-scope":"chains:read","security":[{"apiKey":[]}],"parameters":[{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"Page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}}}},"/scanners":{"get":{"summary":"List scanners (email hashed when PII redaction is on)","x-scope":"scanners:read","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"Page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}}},"post":{"summary":"Create or update a scanner by email ({display_name, email})","x-scope":"scanners:write","security":[{"apiKey":[]}],"responses":{"200":{"description":"Updated"},"201":{"description":"Created"}}}},"/links":{"post":{"summary":"Create a one-time verified link on a STATIC channel (channel_id, expires_in seconds, max_scans, metadata)","x-scope":"links:create","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channel_id"],"properties":{"channel_id":{"type":"string","format":"uuid"},"expires_in":{"type":"integer","default":86400},"max_scans":{"type":"integer","default":1},"metadata":{"type":"object"}}}}}},"responses":{"201":{"description":"{url, token, expires_at, max_scans}"}}}},"/scanners/import":{"post":{"summary":"Create or update up to 1000 scanners by email ({scanners: [{display_name, email}]})","x-scope":"scanners:write","security":[{"apiKey":[]}],"responses":{"200":{"description":"{created, updated}"}}}},"/scanners/{id}":{"patch":{"summary":"Rename a scanner ({display_name})","x-scope":"scanners:write","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Scanner"}}}},"/access-lists/{id}/entries":{"put":{"summary":"Replace all entries of an access list ({entries: [{email, valid_from, valid_to, weekdays 1-7, time_from HH:MM, time_to}]})","x-scope":"access_lists:write","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"{replaced}"}}}},"/triggers/{id}/fire":{"post":{"summary":"Fire a webhook trigger. Authenticate with an API key, or sign with the trigger secret: X-QRC-Timestamp + X-QRC-Signature = hex HMAC-SHA256(secret, timestamp + '.' + body)","x-scope":"triggers:write","security":[{"apiKey":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"{result: ok|skipped, error}"}}}},"/events":{"get":{"summary":"Event feed in order (polling alternative to webhooks)","x-scope":"events:read","security":[{"apiKey":[]}],"parameters":[{"name":"after","in":"query","schema":{"type":"string","format":"uuid"},"description":"Last event id you processed"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500,"default":100}}],"responses":{"200":{"description":"CloudEvents 1.0 envelopes plus next_after (ordered by sequence; event id is the dedupe key)"}}}},"/events/sample":{"get":{"summary":"Up to 3 recent real events of one type (or a documented example) for field mapping in automation editors","x-scope":"events:read","security":[{"apiKey":[]}],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string"},"example":"scan.allowed"}],"responses":{"200":{"description":"{data: CloudEvent[], source: recent|example}"}}}},"/hooks":{"post":{"summary":"Subscribe a REST hook (Zapier, Make, n8n): {target_url, event_types, filter?}","x-scope":"hooks:write","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target_url","event_types"],"properties":{"target_url":{"type":"string","format":"uri"},"event_types":{"type":"array","items":{"type":"string"}},"filter":{"type":"object","properties":{"channel_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"beacon_ids":{"type":"array","items":{"type":"string","format":"uuid"}}}},"name":{"type":"string"}}}}}},"responses":{"201":{"description":"{id, signing_secret, …}"}}},"get":{"summary":"List REST hooks created with API keys","x-scope":"hooks:write","security":[{"apiKey":[]}],"responses":{"200":{"description":"{data}"}}}},"/authorizations/dual":{"post":{"summary":"Create a two-person authorization at one or more displays","x-scope":"attest:write","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["purpose","beacon_ids","min_pal"],"properties":{"purpose":{"type":"string","maxLength":120},"summary":{"type":"string","maxLength":200},"op_digest":{"type":"string","pattern":"^[0-9a-f]{64}$"},"beacon_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"group_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"required_participants":{"type":"integer","enum":[2,3],"default":2},"window_seconds":{"type":"integer","default":60},"min_pal":{"type":"integer","enum":[2,3]},"include_names":{"type":"boolean","default":true},"expires_in":{"type":"integer","minimum":60,"maximum":86400,"default":600},"on_approved_action_id":{"type":"string","format":"uuid"},"metadata":{"type":"object"}}}}}},"responses":{"201":{"description":"{id, status, expires_at}"},"402":{"description":"Plan limit"}}}},"/authorizations/approve":{"post":{"summary":"Ask one named person to approve an operation in person","x-scope":"attest:write","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["purpose","summary","op_digest","beacon_ids","min_pal"],"properties":{"target_scanner_id":{"type":"string","format":"uuid"},"target_email":{"type":"string","format":"email"},"purpose":{"type":"string","maxLength":120},"summary":{"type":"string","maxLength":200},"op_digest":{"type":"string","pattern":"^[0-9a-f]{64}$"},"beacon_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"min_pal":{"type":"integer","enum":[2,3]},"expires_in":{"type":"integer","default":600},"metadata":{"type":"object"}}}}}},"responses":{"201":{"description":"{id, status, expires_at, approval_url}"}}}},"/authorizations/{id}":{"get":{"summary":"Get an authorization with participations and, once approved, the attestation JWS","x-scope":"attest:read","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"{data}"},"404":{"description":"Not found"}}}},"/authorizations/{id}/cancel":{"post":{"summary":"Cancel a pending authorization","x-scope":"attest:write","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"{data: {id, status}}"}}}},"/hooks/{id}":{"delete":{"summary":"Unsubscribe a REST hook","x-scope":"hooks:write","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"Not found"}}}}}}