{"openapi":"3.1.0","info":{"title":"IYK API","version":"0.0.1"},"paths":{"/v2/chips/{id}":{"get":{"tags":["Chips"],"operationId":"chips.findChipById","parameters":[{"name":"id","in":"path","schema":{"type":"string","description":"The unique identifier of the chip.","title":"startsWith(\"chip_\")","pattern":"^chip_"},"required":true,"description":"The unique identifier of the chip."}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Chip","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chip"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiDecodeError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"ChipNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipNotFound"}}}}},"description":"Retrieve a chip by its ID."},"patch":{"tags":["Chips"],"operationId":"chips.patchChip","parameters":[{"name":"id","in":"path","schema":{"type":"string","description":"The unique identifier of the chip.","title":"startsWith(\"chip_\")","pattern":"^chip_"},"required":true,"description":"The unique identifier of the chip."}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Chip","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chip"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiDecodeError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"ChipNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipNotFound"}}}}},"description":"Patch a chip.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipPatch"}}},"required":true}}},"/v2/chip-groups":{"get":{"tags":["Chip Groups"],"operationId":"chipGroup.myChipGroups","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"A list of all chip groups associated with your team.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChipGroup"},"description":"A list of all chip groups associated with your team."}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiDecodeError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}},"description":"Retrieve a list of all chip groups associated with your team."}},"/v2/chip-groups/{id}/chips":{"get":{"tags":["Chip Groups"],"operationId":"chipGroup.chips","parameters":[{"name":"id","in":"path","schema":{"type":"string","description":"The unique identifier of the chip group.","title":"startsWith(\"chg_\")","pattern":"^chg_"},"required":true,"description":"The unique identifier of the chip group."}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"A list of all chips associated with the provided chip group.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Chip"},"description":"A list of all chips associated with the provided chip group."}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiDecodeError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"ChipGroupNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipGroupNotFound"}}}}},"description":"Retrieve a list of all chips associated with the provided chip group."},"patch":{"tags":["Chip Groups"],"operationId":"chipGroup.patchChips","parameters":[{"name":"id","in":"path","schema":{"type":"string","description":"The unique identifier of the chip group.","title":"startsWith(\"chg_\")","pattern":"^chg_"},"required":true,"description":"The unique identifier of the chip group."}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Success"},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiDecodeError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"ChipGroupNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipGroupNotFound"}}}}},"description":"Patch all chips in the provided chip group.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipPatch"}}},"required":true}}},"/v2/chip-groups/{id}":{"delete":{"tags":["Chip Groups"],"operationId":"chipGroup.delete","parameters":[{"name":"id","in":"path","schema":{"type":"string","description":"The unique identifier of the chip group.","title":"startsWith(\"chg_\")","pattern":"^chg_"},"required":true,"description":"The unique identifier of the chip group."}],"security":[{"apiKey":[]}],"responses":{"204":{"description":"Success"},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HttpApiDecodeError"},{"$ref":"#/components/schemas/ChipGroupNotEmpty"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"ChipGroupNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChipGroupNotFound"}}}}},"description":"Delete an empty chip group."}},"/v2/taps/{tapId}/consume":{"post":{"tags":["Taps"],"operationId":"taps.consume","parameters":[{"name":"tapId","in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{21}$"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Tap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tap"}}}},"400":{"description":"The request did not match the expected schema","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HttpApiDecodeError"},{"$ref":"#/components/schemas/TapAlreadyConsumed"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"TapNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TapNotFound"}}}}},"description":"Consuming a tap will return the chip details associated with it. If the tap has already been consumed, it will return a 400 status code."}}},"components":{"schemas":{"Chip":{"type":"object","required":["id","chipGroupId","data"],"properties":{"id":{"type":"string","description":"The unique identifier of the chip.","title":"startsWith(\"chip_\")","pattern":"^chip_"},"chipGroupId":{"type":"string","description":"The unique identifier of the chip group.","title":"startsWith(\"chg_\")","pattern":"^chg_"},"baseUrl":{"type":"string","description":"The base URL of the chip."},"data":{"description":"The data stored on the chip.","type":"object","additionalProperties":{"type":"string"},"example":{"key":"string value"}}},"additionalProperties":false},"HttpApiDecodeError":{"type":"object","required":["issues","message","_tag"],"properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"message":{"type":"string"},"_tag":{"type":"string","enum":["HttpApiDecodeError"]}},"additionalProperties":false,"description":"The request did not match the expected schema"},"Issue":{"type":"object","required":["_tag","path","message"],"properties":{"_tag":{"type":"string","enum":["Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden"],"description":"The tag identifying the type of parse issue"},"path":{"type":"array","items":{"$ref":"#/components/schemas/PropertyKey"},"description":"The path to the property where the issue occurred"},"message":{"type":"string","description":"A descriptive message explaining the issue"}},"additionalProperties":false,"description":"Represents an error encountered while parsing a value to match the schema"},"PropertyKey":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"object","required":["_tag","key"],"properties":{"_tag":{"type":"string","enum":["symbol"]},"key":{"type":"string"}},"additionalProperties":false,"description":"an object to be decoded into a globally shared symbol"}]},"Unauthorized":{"type":"object","required":["action","_tag"],"properties":{"action":{"type":"string"},"_tag":{"type":"string","enum":["Unauthorized"]}},"additionalProperties":false,"description":"Unauthorized"},"ChipNotFound":{"type":"object","required":["_tag"],"properties":{"_tag":{"type":"string","enum":["ChipNotFound"]}},"additionalProperties":false,"description":"ChipNotFound"},"Forbidden":{"type":"object","required":["action","method","_tag"],"properties":{"action":{"type":"string"},"method":{"type":"string"},"_tag":{"type":"string","enum":["Forbidden"]}},"additionalProperties":false,"description":"Forbidden"},"ChipPatch":{"type":"object","required":[],"properties":{"baseUrl":{"description":"The base URL of the chip.","nullable":true},"data":{"description":"The data stored on the chip.","type":"object","additionalProperties":{"type":"string"},"example":{"key":"string value"}}},"additionalProperties":false},"ChipGroup":{"type":"object","required":["id","name","createdAt"],"properties":{"id":{"type":"string","description":"The unique identifier of the chip group.","title":"startsWith(\"chg_\")","pattern":"^chg_"},"name":{"type":"string","description":"The name of the chip group."},"createdAt":{"type":"string","description":"The timestamp when the chip group was created."}},"additionalProperties":false},"ChipGroupNotFound":{"type":"object","required":["_tag"],"properties":{"_tag":{"type":"string","enum":["ChipGroupNotFound"]}},"additionalProperties":false,"description":"ChipGroupNotFound"},"ChipGroupNotEmpty":{"type":"object","required":["_tag"],"properties":{"_tag":{"type":"string","enum":["ChipGroupNotEmpty"]}},"additionalProperties":false,"description":"ChipGroupNotEmpty"},"Tap":{"type":"object","required":["id","chipId"],"properties":{"id":{"type":"string","description":"The unique identifier of the tap.","title":"startsWith(\"tap_\")","pattern":"^tap_"},"chipId":{"type":"string","description":"The unique identifier of the chip.","title":"startsWith(\"chip_\")","pattern":"^chip_"}},"additionalProperties":false},"TapAlreadyConsumed":{"type":"object","required":["_tag"],"properties":{"_tag":{"type":"string","enum":["TapAlreadyConsumed"]}},"additionalProperties":false,"description":"TapAlreadyConsumed"},"TapNotFound":{"type":"object","required":["_tag"],"properties":{"_tag":{"type":"string","enum":["TapNotFound"]}},"additionalProperties":false,"description":"TapNotFound"}},"securitySchemes":{"apiKey":{"type":"http","scheme":"basic"}}},"security":[],"tags":[{"name":"Chips","description":"A Chip is the digital representation of a physical chip."},{"name":"Chip Groups","description":"A Chip Group is a collection of chips."},{"name":"Taps","description":"Taps represent a phyisical tap or scan of an IYK chip."}],"servers":[{"url":"https://api.iyk.app"}]}