{"openapi":"3.1.0","info":{"title":"Knickknacks","version":"1.0","description":"Knickknacks' public agent API: small tools for an agent to work with people. First tool: forms. Every write accepts an Idempotency-Key header."},"servers":[{"url":"https://knickknack.omarsjunk.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"}}}}}}