{"openapi":"3.1.0","info":{"title":"Knickknacks","version":"1.0","description":"Knickknacks' public agent API: small tools for an agent to work with people. Tools: forms, lists (shared checklists), sheets (sign-up sheets with limited spots). Every write accepts an Idempotency-Key header."},"servers":[{"url":"https://knickknack.monkeyflowerlabs.com/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"kk_live_..."}}},"security":[{"bearerAuth":[]}],"paths":{"/me":{"get":{"summary":"Who this key acts as","x-scope":"any","responses":{"200":{"description":"OK"}}}},"/agent_signup":{"post":{"summary":"No key needed. Ask for access on behalf of a person (body: email, agent). They get an approval email; you get a poll_secret","x-scope":"none","responses":{"200":{"description":"OK"}}}},"/agent_signup/claim":{"post":{"summary":"No key needed. Poll with the poll_secret (body: poll_secret) until the person approves; returns the api_key once","x-scope":"none","responses":{"200":{"description":"OK"}}}},"/forms":{"get":{"summary":"List your forms with response counts","x-scope":"forms:read","responses":{"200":{"description":"OK"}}},"post":{"summary":"Create a form (body: title [required], description, fields [required: label, type, required, help, options, min, max], closes_at, max_responses, confirmation_message). Returns the public url to share. Field types: short_text, long_text, number, email, date, yes_no, rating, single_choice, multi_choice","x-scope":"forms:write","responses":{"200":{"description":"OK"}}}},"/forms/{id}":{"get":{"summary":"One form, its fields and status","x-scope":"forms:read","responses":{"200":{"description":"OK"}}},"patch":{"summary":"Edit a form, or close/reopen it (closed: true/false). Once people have answered, fields can be added and relabelled but not removed or retyped","x-scope":"forms:write","responses":{"200":{"description":"OK"}}},"delete":{"summary":"Archive a form: its link stops working; its answers are kept","x-scope":"forms:write","responses":{"200":{"description":"OK"}}}},"/forms/{form_id}/responses":{"get":{"summary":"Answers, oldest first. Poll with since=<next_since from the last call> (and limit) to get each response exactly once","x-scope":"forms:read","responses":{"200":{"description":"OK"}}}},"/lists":{"get":{"summary":"List your shared checklists with done counts","x-scope":"lists:read","responses":{"200":{"description":"OK"}}},"post":{"summary":"Make a shared list (body: title [required], description, items [strings or {text, note}], allow_adds [default true: may people add items]). Returns the public url to share","x-scope":"lists:write","responses":{"200":{"description":"OK"}}}},"/lists/{id}":{"get":{"summary":"One list with every item: done, done_by, added_by","x-scope":"lists:read","responses":{"200":{"description":"OK"}}},"patch":{"summary":"Edit a list, or close/reopen it (closed: true/false)","x-scope":"lists:write","responses":{"200":{"description":"OK"}}},"delete":{"summary":"Archive a list: its link stops working; its history is kept","x-scope":"lists:write","responses":{"200":{"description":"OK"}}}},"/lists/{list_id}/items":{"post":{"summary":"Add an item (body: text, note) or several (body: items [...])","x-scope":"lists:write","responses":{"200":{"description":"OK"}}}},"/lists/{list_id}/items/{id}":{"patch":{"summary":"Change an item (text, note, position) or tick/untick it (done: true/false; by: the person you're ticking it for, shown as who did it)","x-scope":"lists:write","responses":{"200":{"description":"OK"}}},"delete":{"summary":"Remove an item","x-scope":"lists:write","responses":{"200":{"description":"OK"}}}},"/lists/{list_id}/activity":{"get":{"summary":"What changed on a list, oldest first. Poll with since=<next_since from the last call> to get each change exactly once","x-scope":"lists:read","responses":{"200":{"description":"OK"}}}},"/sheets":{"get":{"summary":"List your sign-up sheets with seats taken","x-scope":"sheets:read","responses":{"200":{"description":"OK"}}},"post":{"summary":"Make a sign-up sheet (body: title [required], description, max_claims_per_person, slots [labels or {label, detail, capacity [default 1], starts_at}]). Returns the public url to share","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}}},"/sheets/{id}":{"get":{"summary":"One sheet: every slot with its capacity, how many are taken, and who took each","x-scope":"sheets:read","responses":{"200":{"description":"OK"}}},"patch":{"summary":"Edit a sheet, or close/reopen it (closed: true/false)","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}},"delete":{"summary":"Archive a sheet: its link stops working; its history is kept","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}}},"/sheets/{sheet_id}/slots":{"post":{"summary":"Add a slot (body: label, detail, capacity, starts_at) or several (body: slots [...])","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}}},"/sheets/{sheet_id}/slots/{id}":{"patch":{"summary":"Change a slot (label, detail, capacity, starts_at, position). Capacity can't go below the number already taking it","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}},"delete":{"summary":"Remove a slot. If people have taken it, pass release=true to remove it and let them go","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}}},"/sheets/{sheet_id}/slots/{slot_id}/claims":{"post":{"summary":"Take a spot for a named person (body: name [required], note). 409 slot_full, already_claimed or claim_limit when it can't be done","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}}},"/sheets/{sheet_id}/claims/{id}":{"delete":{"summary":"Give up a claim, letting the spot go","x-scope":"sheets:write","responses":{"200":{"description":"OK"}}}},"/sheets/{sheet_id}/activity":{"get":{"summary":"What changed on a sheet, oldest first. Poll with since=<next_since from the last call> to get each change exactly once","x-scope":"sheets:read","responses":{"200":{"description":"OK"}}}}}}