{"openapi":"3.1.0","info":{"title":"Stillscan API","version":"1","description":"Create and manage dynamic QR codes. Business plan. Send a key from Settings → API keys as `Authorization: Bearer ss_live_…`. Each key is limited to 120 requests a minute."},"servers":[{"url":"https://staging.stillscan.app/api/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Scopes: codes:read, codes:write, analytics:read"}}},"paths":{"/codes":{"get":{"summary":"List codes","security":[{"apiKey":["codes:read"]}],"x-scope":"codes:read","parameters":[{"in":"query","required":false,"name":"q","description":"Search by name, short link or destination.","schema":{"type":"string"}},{"in":"query","required":false,"name":"status","description":"Only codes with this status.","schema":{"enum":["active","paused","lapsed","flagged","blocked"]}},{"in":"query","required":false,"name":"tag","description":"Only codes with this tag.","schema":{"type":"string"}},{"in":"query","required":false,"name":"archived","description":"1 for archived codes.","schema":{"enum":["1"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"codes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"shortUrl":{"type":"string","format":"uri","description":"The address in the QR code. It never changes."},"type":{"type":"string","enum":["url","app","review","social","vcard","links","menu","pdf"]},"name":{"type":"string"},"dest":{"type":"string","format":"uri","description":"Where scans go now."},"host":{"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"ios":{"type":"string"},"android":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"page":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"design":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"status":{"type":"string","enum":["active","paused","lapsed","flagged","blocked"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send it back with an update to refuse the change if someone edited meanwhile."},"scheduled":{"anyOf":[{"type":"object","properties":{"dest":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["dest","at"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","slug","shortUrl","type","name","dest","host","rules","page","design","status","folderId","tags","version","scheduled","archived","deletedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["codes"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}},"post":{"summary":"Create a dynamic code","description":"Link types need `dest`. Hosted types (vcard, links, menu, pdf) need `page` instead.","security":[{"apiKey":["codes:write"]}],"x-scope":"codes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"type":{"type":"string","enum":["url","app","review","social","vcard","links","menu","pdf"]},"dest":{"type":"string","maxLength":4096},"rules":{"type":"object","properties":{"ios":{"type":"string","maxLength":2048},"android":{"type":"string","maxLength":2048}},"additionalProperties":false},"page":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"vcard"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"firstName":{"type":"string","maxLength":60},"lastName":{"type":"string","maxLength":60},"org":{"type":"string","maxLength":100},"title":{"type":"string","maxLength":100},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":254},"url":{"type":"string","maxLength":2048},"address":{"type":"string","maxLength":300},"note":{"type":"string","maxLength":500},"photo":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false}},"required":["type","accent","firstName","lastName","org","title","phone","email","url","address","note"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"links"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"title":{"type":"string","minLength":1,"maxLength":100},"bio":{"type":"string","maxLength":300},"avatar":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false},"links":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048}},"required":["label","url"],"additionalProperties":false}}},"required":["type","accent","title","bio","links"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"menu"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"title":{"type":"string","minLength":1,"maxLength":100},"note":{"type":"string","maxLength":300},"pdf":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false},"sections":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"items":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"desc":{"type":"string","maxLength":300},"price":{"type":"string","maxLength":20}},"required":["name","desc","price"],"additionalProperties":false}}},"required":["name","items"],"additionalProperties":false}}},"required":["type","accent","title","note","sections"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pdf"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"title":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"file":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false}},"required":["type","accent","title","description","file"],"additionalProperties":false}]},"design":{"type":"object","properties":{"fg":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"bg":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"gradient":{"type":"object","properties":{"to":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"type":{"type":"string","enum":["linear","radial"]}},"required":["to","type"],"additionalProperties":false},"dots":{"type":"string","enum":["square","rounded","dots"]},"eyes":{"type":"string","enum":["square","rounded","circle"]},"logo":{"type":"object","properties":{"href":{"type":"string","maxLength":400000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+=*$"},"ratio":{"type":"number","minimum":0.05,"maximum":0.35}},"required":["href","ratio"],"additionalProperties":false},"frame":{"type":"object","properties":{"text":{"type":"string","maxLength":32}},"required":["text"],"additionalProperties":false},"quietZone":{"type":"integer","minimum":0,"maximum":10}},"required":["fg","bg","dots","eyes","quietZone"],"additionalProperties":false},"folderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["name","type"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"shortUrl":{"type":"string","format":"uri","description":"The address in the QR code. It never changes."},"type":{"type":"string","enum":["url","app","review","social","vcard","links","menu","pdf"]},"name":{"type":"string"},"dest":{"type":"string","format":"uri","description":"Where scans go now."},"host":{"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"ios":{"type":"string"},"android":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"page":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"design":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"status":{"type":"string","enum":["active","paused","lapsed","flagged","blocked"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send it back with an update to refuse the change if someone edited meanwhile."},"scheduled":{"anyOf":[{"type":"object","properties":{"dest":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["dest","at"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","slug","shortUrl","type","name","dest","host","rules","page","design","status","folderId","tags","version","scheduled","archived","deletedAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["code"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/codes/{codeId}":{"get":{"summary":"Get a code","security":[{"apiKey":["codes:read"]}],"x-scope":"codes:read","parameters":[{"name":"codeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"shortUrl":{"type":"string","format":"uri","description":"The address in the QR code. It never changes."},"type":{"type":"string","enum":["url","app","review","social","vcard","links","menu","pdf"]},"name":{"type":"string"},"dest":{"type":"string","format":"uri","description":"Where scans go now."},"host":{"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"ios":{"type":"string"},"android":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"page":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"design":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"status":{"type":"string","enum":["active","paused","lapsed","flagged","blocked"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send it back with an update to refuse the change if someone edited meanwhile."},"scheduled":{"anyOf":[{"type":"object","properties":{"dest":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["dest","at"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","slug","shortUrl","type","name","dest","host","rules","page","design","status","folderId","tags","version","scheduled","archived","deletedAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["code"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}},"patch":{"summary":"Change a code","description":"Change where it goes, pause it, rename it and more. Printed codes keep working.","security":[{"apiKey":["codes:write"]}],"x-scope":"codes:write","parameters":[{"name":"codeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"dest":{"type":"string","maxLength":4096},"rules":{"anyOf":[{"type":"object","properties":{"ios":{"type":"string","maxLength":2048},"android":{"type":"string","maxLength":2048}},"additionalProperties":false},{"type":"null"}]},"page":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"vcard"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"firstName":{"type":"string","maxLength":60},"lastName":{"type":"string","maxLength":60},"org":{"type":"string","maxLength":100},"title":{"type":"string","maxLength":100},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":254},"url":{"type":"string","maxLength":2048},"address":{"type":"string","maxLength":300},"note":{"type":"string","maxLength":500},"photo":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false}},"required":["type","accent","firstName","lastName","org","title","phone","email","url","address","note"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"links"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"title":{"type":"string","minLength":1,"maxLength":100},"bio":{"type":"string","maxLength":300},"avatar":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false},"links":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048}},"required":["label","url"],"additionalProperties":false}}},"required":["type","accent","title","bio","links"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"menu"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"title":{"type":"string","minLength":1,"maxLength":100},"note":{"type":"string","maxLength":300},"pdf":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false},"sections":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"items":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"desc":{"type":"string","maxLength":300},"price":{"type":"string","maxLength":20}},"required":["name","desc","price"],"additionalProperties":false}}},"required":["name","items"],"additionalProperties":false}}},"required":["type","accent","title","note","sections"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pdf"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"title":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"file":{"type":"object","properties":{"key":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","maxLength":120},"mime":{"type":"string","maxLength":40},"size":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["key","name","mime","size"],"additionalProperties":false}},"required":["type","accent","title","description","file"],"additionalProperties":false}]},"design":{"anyOf":[{"type":"object","properties":{"fg":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"bg":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"gradient":{"type":"object","properties":{"to":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"type":{"type":"string","enum":["linear","radial"]}},"required":["to","type"],"additionalProperties":false},"dots":{"type":"string","enum":["square","rounded","dots"]},"eyes":{"type":"string","enum":["square","rounded","circle"]},"logo":{"type":"object","properties":{"href":{"type":"string","maxLength":400000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+=*$"},"ratio":{"type":"number","minimum":0.05,"maximum":0.35}},"required":["href","ratio"],"additionalProperties":false},"frame":{"type":"object","properties":{"text":{"type":"string","maxLength":32}},"required":["text"],"additionalProperties":false},"quietZone":{"type":"integer","minimum":0,"maximum":10}},"required":["fg","bg","dots","eyes","quietZone"],"additionalProperties":false},{"type":"null"}]},"status":{"type":"string","enum":["active","paused"]},"folderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"archived":{"type":"boolean"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"shortUrl":{"type":"string","format":"uri","description":"The address in the QR code. It never changes."},"type":{"type":"string","enum":["url","app","review","social","vcard","links","menu","pdf"]},"name":{"type":"string"},"dest":{"type":"string","format":"uri","description":"Where scans go now."},"host":{"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"ios":{"type":"string"},"android":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"page":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"design":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"status":{"type":"string","enum":["active","paused","lapsed","flagged","blocked"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send it back with an update to refuse the change if someone edited meanwhile."},"scheduled":{"anyOf":[{"type":"object","properties":{"dest":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["dest","at"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","slug","shortUrl","type","name","dest","host","rules","page","design","status","folderId","tags","version","scheduled","archived","deletedAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["code"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a code","description":"Scans then say it was deleted. It can be restored from the dashboard for 30 days.","security":[{"apiKey":["codes:write"]}],"x-scope":"codes:write","parameters":[{"name":"codeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"shortUrl":{"type":"string","format":"uri","description":"The address in the QR code. It never changes."},"type":{"type":"string","enum":["url","app","review","social","vcard","links","menu","pdf"]},"name":{"type":"string"},"dest":{"type":"string","format":"uri","description":"Where scans go now."},"host":{"type":"string"},"rules":{"anyOf":[{"type":"object","properties":{"ios":{"type":"string"},"android":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"page":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"design":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"status":{"type":"string","enum":["active","paused","lapsed","flagged","blocked"]},"folderId":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send it back with an update to refuse the change if someone edited meanwhile."},"scheduled":{"anyOf":[{"type":"object","properties":{"dest":{"type":"string"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["dest","at"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","slug","shortUrl","type","name","dest","host","rules","page","design","status","folderId","tags","version","scheduled","archived","deletedAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["code"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/codes/{codeId}/qr.svg":{"get":{"summary":"Download the QR code as SVG","security":[{"apiKey":["codes:read"]}],"x-scope":"codes:read","parameters":[{"name":"codeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"image/svg+xml":{"schema":{"type":"string"}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/analytics":{"get":{"summary":"Scan analytics","description":"Daily totals and breakdowns, updated hourly. History is held to your plan's limit.","security":[{"apiKey":["analytics:read"]}],"x-scope":"analytics:read","parameters":[{"in":"query","required":false,"name":"days","description":"How many days back (default 30).","schema":{"type":"integer","minimum":1}},{"in":"query","required":false,"name":"code","description":"One code's id, for that code only.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"from":{"type":"string"},"to":{"type":"string"},"totals":{"type":"object","properties":{"scans":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uniques":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["scans","uniques"],"additionalProperties":false},"topCodes":{"type":"array","items":{"type":"object","properties":{"codeId":{"type":"string"},"scans":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["codeId","scans"],"additionalProperties":false}},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"scans":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uniques":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","scans","uniques"],"additionalProperties":false}},"breakdown":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"scans":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["value","scans"],"additionalProperties":false}}}},"required":["days","maxDays","from","to","totals","topCodes","daily","breakdown"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/bulk":{"post":{"summary":"Create many codes","description":"Up to 1000 link codes at once. Every row is checked first; if any is wrong, nothing is made and the response lists the rows to fix. The codes are then made in the background: poll the job.","security":[{"apiKey":["codes:write"]}],"x-scope":"codes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"codes":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"type":{"default":"url","type":"string","enum":["url","app","review","social"]},"dest":{"type":"string","maxLength":4096},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["name","dest"],"additionalProperties":false}},"design":{"type":"object","properties":{"fg":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"bg":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"gradient":{"type":"object","properties":{"to":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"type":{"type":"string","enum":["linear","radial"]}},"required":["to","type"],"additionalProperties":false},"dots":{"type":"string","enum":["square","rounded","dots"]},"eyes":{"type":"string","enum":["square","rounded","circle"]},"logo":{"type":"object","properties":{"href":{"type":"string","maxLength":400000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+=*$"},"ratio":{"type":"number","minimum":0.05,"maximum":0.35}},"required":["href","ratio"],"additionalProperties":false},"frame":{"type":"object","properties":{"text":{"type":"string","maxLength":32}},"required":["text"],"additionalProperties":false},"quietZone":{"type":"integer","minimum":0,"maximum":10}},"required":["fg","bg","dots","eyes","quietZone"],"additionalProperties":false},"folderId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]}},"required":["codes"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"done":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["running","done"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"shortUrl":{"type":"string","format":"uri"}},"required":["id","name","shortUrl"],"additionalProperties":false},{"type":"null"}]},"error":{"type":["string","null"]}},"required":["row","code","error"],"additionalProperties":false}}},"required":["id","total","done","failed","status","createdAt","rows"],"additionalProperties":false}},"required":["job"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}},"/bulk/{jobId}":{"get":{"summary":"Check a bulk create","security":[{"apiKey":["codes:read"]}],"x-scope":"codes:read","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"done":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["running","done"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"shortUrl":{"type":"string","format":"uri"}},"required":["id","name","shortUrl"],"additionalProperties":false},{"type":"null"}]},"error":{"type":["string","null"]}},"required":["row","code","error"],"additionalProperties":false}}},"required":["id","total","done","failed","status","createdAt","rows"],"additionalProperties":false}},"required":["job"],"additionalProperties":false}}}},"default":{"description":"An error, with a code and a plain-English message.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"],"additionalProperties":false}}}}}}}}}