{"openapi":"3.1.0","info":{"title":"QRLynx Public API","version":"1.0.0","description":"Create dynamic QR codes, repoint them, read their scan stats, and render them. Bearer API key auth. Available on the Business plan and above."},"servers":[{"url":"https://qrlynx.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Send your key as `Authorization: Bearer qrl_live_...`. Scopes: qr:read, qr:write."}},"schemas":{"Qr":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["url"]},"name":{"type":"string","nullable":true},"destination":{"type":"string","nullable":true},"short_url":{"type":"string"},"created_at":{"type":"string","nullable":true}}},"QrDetail":{"allOf":[{"$ref":"#/components/schemas/Qr"},{"type":"object","properties":{"scans":{"type":"integer"},"unique_scans":{"type":"integer"},"last_scanned_at":{"type":"string","nullable":true},"active":{"type":"boolean"}}}]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}},"paths":{"/qr":{"post":{"summary":"Create a dynamic URL QR code","security":[{"bearerAuth":["qr:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["destination"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["url"]},"destination":{"type":"string","format":"uri","description":"http(s) URL the code redirects to"},"name":{"type":"string"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Qr"},{"type":"object","properties":{"svg":{"type":"string"}}}]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing/invalid key"},"402":{"description":"Plan limit reached"},"403":{"description":"Insufficient scope or plan"},"429":{"description":"Rate limited"}}}},"/qr/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a QR code (details + scan counts)","security":[{"bearerAuth":["qr:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrDetail"}}}},"401":{"description":"Missing/invalid key"},"404":{"description":"Not found"}}},"patch":{"summary":"Repoint the destination and/or rename","security":[{"bearerAuth":["qr:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"destination":{"type":"string","format":"uri"},"name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrDetail"}}}},"400":{"description":"Invalid request"},"401":{"description":"Missing/invalid key"},"404":{"description":"Not found"},"429":{"description":"Rate limited"}}}},"/qr/{id}.svg":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Render the QR code as an SVG image","security":[{"bearerAuth":["qr:read"]}],"responses":{"200":{"description":"OK","content":{"image/svg+xml":{"schema":{"type":"string"}}}},"401":{"description":"Missing/invalid key"},"404":{"description":"Not found"}}}}}}