{"openapi":"3.1.0","info":{"title":"Ainoova Tools API","version":"1","description":"One API for ten small tools. Authenticate with an API key from Account → Claude & API: `Authorization: Bearer ainv_…`. The MCP endpoint for Claude is /api/mcp."},"servers":[{"url":"https://tools.ainoova.com/api/v1"}],"security":[{"bearer":[]}],"paths":{"/apps":{"get":{"summary":"Every tool, its fields, settings, actions and your access","responses":{"200":{"description":"OK"}}}},"/me":{"get":{"summary":"Your account"},"patch":{"summary":"Change name or account settings (timezone, locale)"}},"/today":{"get":{"summary":"What needs you today across tools","parameters":[{"name":"apps","in":"query","schema":{"type":"string"},"description":"Comma-separated tool ids"}]}},"/activity":{"get":{"summary":"Change log (who changed what)","parameters":[{"name":"app","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}]}},"/activity/{id}/undo":{"post":{"summary":"Undo a change","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/export":{"get":{"summary":"Download all your data as JSON"}},"/batch":{"post":{"summary":"Up to 200 create/update/delete operations","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object"}}}}}}}}},"/notes/settings":{"get":{"tags":["Notes"],"summary":"Notes settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"default_color":{"description":"Colour for new notes","default":"default","type":"string","enum":["default","red","orange","yellow","green","teal","blue","cerulean","purple","pink","brown","gray"]},"layout":{"description":"Layout","default":"grid","type":"string","enum":["grid","list"]},"new_checklist_items_at":{"description":"New checklist items go to the","default":"bottom","type":"string","enum":["bottom","top"]},"move_checked_to_bottom":{"description":"Move ticked items to the bottom","default":true,"type":"boolean"},"labels":{"description":"Labels. Your label list (labels used on notes are added automatically)","default":[],"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}}}},"patch":{"tags":["Notes"],"summary":"Change Notes settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"default_color":{"description":"Colour for new notes","default":"default","type":"string","enum":["default","red","orange","yellow","green","teal","blue","cerulean","purple","pink","brown","gray"]},"layout":{"description":"Layout","default":"grid","type":"string","enum":["grid","list"]},"new_checklist_items_at":{"description":"New checklist items go to the","default":"bottom","type":"string","enum":["bottom","top"]},"move_checked_to_bottom":{"description":"Move ticked items to the bottom","default":true,"type":"boolean"},"labels":{"description":"Labels. Your label list (labels used on notes are added automatically)","default":[],"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/quick_capture":{"post":{"tags":["Notes"],"summary":"Create a note from free text. Lines like '- [ ] milk' or '- milk' become a checklist; a short first line becomes the title.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":["string","null"]},"labels":{"type":"array","items":{"type":"string"}}},"required":["text"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/labels":{"post":{"tags":["Notes"],"summary":"List every label in use with how many active notes carry it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/rename_label":{"post":{"tags":["Notes"],"summary":"Rename a label on every note (merge into an existing label if the new name is already used).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":["string","null"]},"to":{"type":["string","null"]}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/duplicate":{"post":{"tags":["Notes"],"summary":"Make a copy of a note (same text, checklist, colour, labels and images; not pinned, no reminder).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of a notes record"}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/delete_label":{"post":{"tags":["Notes"],"summary":"Remove a label from every note (the notes stay).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":["string","null"]}},"required":["label"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/attach_image":{"post":{"tags":["Notes"],"summary":"Attach an image to a note (or start a new image note when note_id is empty). Send the image as base64; JPEG, PNG, WebP or GIF up to 5 MB.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note_id":{"type":"string","description":"Id of a notes record"},"data_base64":{"type":["string","null"]},"mime":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif"]},"width":{"type":["integer","null"],"minimum":1,"maximum":20000},"height":{"type":["integer","null"],"minimum":1,"maximum":20000}},"required":["data_base64","mime"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/import_keep":{"post":{"tags":["Notes"],"summary":"Import notes from a Google Takeout export of Keep. Pass the parsed JSON objects of the .json files (one per note). Trashed notes are skipped; notes already imported are skipped.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"array","items":{}}},"required":["notes"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/actions/empty_trash":{"post":{"tags":["Notes"],"summary":"Permanently delete every note in the trash. Cannot be undone.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/notes":{"get":{"tags":["Notes"],"summary":"List notes","description":"A text note or a checklist. Deleting moves it to the trash (restorable for 30 days).","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -updated_at"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"title","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on title (also title_before / title_after for ranges)"},{"name":"body","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on body (also body_before / body_after for ranges)"},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on kind (also kind_before / kind_after for ranges)"},{"name":"items","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on items (also items_before / items_after for ranges)"},{"name":"images","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on images (also images_before / images_after for ranges)"},{"name":"color","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on color (also color_before / color_after for ranges)"},{"name":"labels","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on labels (also labels_before / labels_after for ranges)"},{"name":"pinned","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on pinned (also pinned_before / pinned_after for ranges)"},{"name":"archived","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on archived (also archived_before / archived_after for ranges)"},{"name":"reminder_at","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on reminder_at (also reminder_at_before / reminder_at_after for ranges)"},{"name":"reminder_repeat","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on reminder_repeat (also reminder_repeat_before / reminder_repeat_after for ranges)"},{"name":"reminder_sent_at","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on reminder_sent_at (also reminder_sent_at_before / reminder_sent_at_after for ranges)"},{"name":"source","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on source (also source_before / source_after for ranges)"},{"name":"source_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on source_id (also source_id_before / source_id_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/notes_notes"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Notes"],"summary":"Create a note","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Title","type":["string","null"]},"body":{"description":"Text. Plain text; line breaks are kept","type":["string","null"]},"kind":{"description":"Kind","default":"text","type":"string","enum":["text","checklist"]},"items":{"description":"Checklist items. Used when kind is checklist","default":[],"type":"array","items":{"type":"object","properties":{"text":{"type":["string","null"]},"done":{"default":false,"type":"boolean"},"indent":{"description":"1 = sub-item of the item above","default":0,"type":["integer","null"],"minimum":0,"maximum":1}},"additionalProperties":false}},"images":{"description":"Images. Attached images, shown on top of the note. Upload with the attach_image action or POST /api/v1/files","default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"w":{"type":["integer","null"],"minimum":1,"maximum":20000},"h":{"type":["integer","null"],"minimum":1,"maximum":20000}},"additionalProperties":false}},"color":{"description":"Colour","default":"default","type":"string","enum":["default","red","orange","yellow","green","teal","blue","cerulean","purple","pink","brown","gray"]},"labels":{"description":"Labels","default":[],"type":"array","items":{"type":"string"}},"pinned":{"description":"Pinned","default":false,"type":"boolean"},"archived":{"description":"Archived","default":false,"type":"boolean"},"reminder_at":{"description":"Reminder. Notifies on your devices and shows in Today from this moment","type":["string","null"],"format":"date-time"},"reminder_repeat":{"description":"Repeat reminder","default":"none","type":"string","enum":["none","daily","weekly","monthly","yearly"]},"source":{"description":"Where the note came from, e.g. keep-import","type":["string","null"]},"source_id":{"type":["string","null"]}},"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/notes/notes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Notes"],"summary":"Get a note","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Notes"],"summary":"Update a note (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Title","type":["string","null"]},"body":{"description":"Text. Plain text; line breaks are kept","type":["string","null"]},"kind":{"description":"Kind","default":"text","type":"string","enum":["text","checklist"]},"items":{"description":"Checklist items. Used when kind is checklist","default":[],"type":"array","items":{"type":"object","properties":{"text":{"type":["string","null"]},"done":{"default":false,"type":"boolean"},"indent":{"description":"1 = sub-item of the item above","default":0,"type":["integer","null"],"minimum":0,"maximum":1}},"additionalProperties":false}},"images":{"description":"Images. Attached images, shown on top of the note. Upload with the attach_image action or POST /api/v1/files","default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"w":{"type":["integer","null"],"minimum":1,"maximum":20000},"h":{"type":["integer","null"],"minimum":1,"maximum":20000}},"additionalProperties":false}},"color":{"description":"Colour","default":"default","type":"string","enum":["default","red","orange","yellow","green","teal","blue","cerulean","purple","pink","brown","gray"]},"labels":{"description":"Labels","default":[],"type":"array","items":{"type":"string"}},"pinned":{"description":"Pinned","default":false,"type":"boolean"},"archived":{"description":"Archived","default":false,"type":"boolean"},"reminder_at":{"description":"Reminder. Notifies on your devices and shows in Today from this moment","type":["string","null"],"format":"date-time"},"reminder_repeat":{"description":"Repeat reminder","default":"none","type":"string","enum":["none","daily","weekly","monthly","yearly"]},"source":{"description":"Where the note came from, e.g. keep-import","type":["string","null"]},"source_id":{"type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Notes"],"summary":"Move a note to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/notes/notes/{id}/restore":{"post":{"tags":["Notes"],"summary":"Restore a note from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/tasks/settings":{"get":{"tags":["Tasks"],"summary":"Tasks settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"default_list":{"description":"List for new tasks","default":"Inbox","type":["string","null"]},"show_overdue_in_today":{"description":"Show overdue tasks in Today","default":true,"type":"boolean"},"upcoming_days":{"description":"Upcoming covers (days)","default":7,"type":["integer","null"],"minimum":1,"maximum":60}},"additionalProperties":false}}}}}},"patch":{"tags":["Tasks"],"summary":"Change Tasks settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"default_list":{"description":"List for new tasks","default":"Inbox","type":["string","null"]},"show_overdue_in_today":{"description":"Show overdue tasks in Today","default":true,"type":"boolean"},"upcoming_days":{"description":"Upcoming covers (days)","default":7,"type":["integer","null"],"minimum":1,"maximum":60}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/tasks/actions/quick_add":{"post":{"tags":["Tasks"],"summary":"Create a task from a sentence: 'pay rent friday #home !high every month'. Understands today, tomorrow, weekdays, 'in N days', 'next week', YYYY-MM-DD, DD/MM, #list, !high/!medium/!low and every day/weekday/week/month/year.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":["string","null"]}},"required":["text"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/tasks/actions/complete":{"post":{"tags":["Tasks"],"summary":"Mark a task done (repeating tasks move to their next date). Set done=false to reopen.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of a tasks record"},"done":{"default":true,"type":"boolean"}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/tasks/actions/lists":{"post":{"tags":["Tasks"],"summary":"Every list with its number of open tasks.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/tasks/tasks":{"get":{"tags":["Tasks"],"summary":"List tasks","description":"A to-do. Completing a repeating task moves it to its next date instead of closing it.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default due,-priority_rank,created_at"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"title","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on title (also title_before / title_after for ranges)"},{"name":"notes","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on notes (also notes_before / notes_after for ranges)"},{"name":"due","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on due (also due_before / due_after for ranges)"},{"name":"list","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on list (also list_before / list_after for ranges)"},{"name":"priority","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on priority (also priority_before / priority_after for ranges)"},{"name":"priority_rank","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on priority_rank (also priority_rank_before / priority_rank_after for ranges)"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on status (also status_before / status_after for ranges)"},{"name":"recurrence","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on recurrence (also recurrence_before / recurrence_after for ranges)"},{"name":"subtasks","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on subtasks (also subtasks_before / subtasks_after for ranges)"},{"name":"tags","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on tags (also tags_before / tags_after for ranges)"},{"name":"done_at","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on done_at (also done_at_before / done_at_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/tasks_tasks"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Tasks"],"summary":"Create a task","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Task","type":["string","null"]},"notes":{"description":"Notes","type":["string","null"]},"due":{"description":"Due","type":["string","null"],"format":"date"},"list":{"description":"List","default":"Inbox","type":["string","null"]},"priority":{"description":"Priority","default":"none","type":"string","enum":["none","low","medium","high"]},"status":{"description":"Status","default":"open","type":"string","enum":["open","done"]},"recurrence":{"description":"Repeats","default":"none","type":"string","enum":["none","daily","weekdays","weekly","monthly","yearly"]},"subtasks":{"description":"Subtasks","default":[],"type":"array","items":{"type":"object","properties":{"text":{"type":["string","null"]},"done":{"default":false,"type":"boolean"}},"additionalProperties":false}},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}}},"required":["title"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/tasks/tasks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Tasks"],"summary":"Get a task","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Tasks"],"summary":"Update a task (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"description":"Task","type":["string","null"]},"notes":{"description":"Notes","type":["string","null"]},"due":{"description":"Due","type":["string","null"],"format":"date"},"list":{"description":"List","default":"Inbox","type":["string","null"]},"priority":{"description":"Priority","default":"none","type":"string","enum":["none","low","medium","high"]},"status":{"description":"Status","default":"open","type":"string","enum":["open","done"]},"recurrence":{"description":"Repeats","default":"none","type":"string","enum":["none","daily","weekdays","weekly","monthly","yearly"]},"subtasks":{"description":"Subtasks","default":[],"type":"array","items":{"type":"object","properties":{"text":{"type":["string","null"]},"done":{"default":false,"type":"boolean"}},"additionalProperties":false}},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Tasks"],"summary":"Move a task to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/tasks/tasks/{id}/restore":{"post":{"tags":["Tasks"],"summary":"Restore a task from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/later/settings":{"get":{"tags":["Later"],"summary":"Later settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"fetch_titles":{"description":"Fetch page titles automatically","default":true,"type":"boolean"},"open_marks_read":{"description":"Opening a link marks it as read","default":true,"type":"boolean"}},"additionalProperties":false}}}}}},"patch":{"tags":["Later"],"summary":"Change Later settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fetch_titles":{"description":"Fetch page titles automatically","default":true,"type":"boolean"},"open_marks_read":{"description":"Opening a link marks it as read","default":true,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/later/actions/surprise":{"post":{"tags":["Later"],"summary":"Pick one random unread link, optionally within a tag.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tag":{"type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/later/links":{"get":{"tags":["Later"],"summary":"List links","description":"A saved web page.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -created_at"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"url","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on url (also url_before / url_after for ranges)"},{"name":"title","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on title (also title_before / title_after for ranges)"},{"name":"note","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on note (also note_before / note_after for ranges)"},{"name":"tags","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on tags (also tags_before / tags_after for ranges)"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on status (also status_before / status_after for ranges)"},{"name":"favorite","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on favorite (also favorite_before / favorite_after for ranges)"},{"name":"read_at","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on read_at (also read_at_before / read_at_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/later_links"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Later"],"summary":"Create a link","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"description":"URL","type":["string","null"],"format":"uri"},"title":{"description":"Title. Filled in from the page when left empty","type":["string","null"]},"note":{"description":"Note","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"status":{"description":"Status","default":"unread","type":"string","enum":["unread","read","archived"]},"favorite":{"description":"Favourite","default":false,"type":"boolean"}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/later/links/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Later"],"summary":"Get a link","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Later"],"summary":"Update a link (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"description":"URL","type":["string","null"],"format":"uri"},"title":{"description":"Title. Filled in from the page when left empty","type":["string","null"]},"note":{"description":"Note","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"status":{"description":"Status","default":"unread","type":"string","enum":["unread","read","archived"]},"favorite":{"description":"Favourite","default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Later"],"summary":"Move a link to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/later/links/{id}/restore":{"post":{"tags":["Later"],"summary":"Restore a link from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/habits/settings":{"get":{"tags":["Habits"],"summary":"Habits settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"week_starts":{"description":"Week starts on","default":"monday","type":"string","enum":["monday","sunday"]},"show_in_today":{"description":"List unfinished habits in Today","default":true,"type":"boolean"}},"additionalProperties":false}}}}}},"patch":{"tags":["Habits"],"summary":"Change Habits settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"week_starts":{"description":"Week starts on","default":"monday","type":"string","enum":["monday","sunday"]},"show_in_today":{"description":"List unfinished habits in Today","default":true,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/habits/actions/check_in":{"post":{"tags":["Habits"],"summary":"Mark a habit done for a day (default today). Set done=false to undo. Idempotent.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"habit_id":{"type":"string","description":"Id of a habits record"},"date":{"type":["string","null"],"format":"date"},"done":{"default":true,"type":"boolean"},"note":{"type":["string","null"]}},"required":["habit_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/habits/habits":{"get":{"tags":["Habits"],"summary":"List habits","description":"Something to do every day or a few times a week.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default order"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on name (also name_before / name_after for ranges)"},{"name":"emoji","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on emoji (also emoji_before / emoji_after for ranges)"},{"name":"target_per_week","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on target_per_week (also target_per_week_before / target_per_week_after for ranges)"},{"name":"color","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on color (also color_before / color_after for ranges)"},{"name":"archived","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on archived (also archived_before / archived_after for ranges)"},{"name":"order","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on order (also order_before / order_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/habits_habits"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Habits"],"summary":"Create a habit","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"emoji":{"description":"Emoji","type":["string","null"]},"target_per_week":{"description":"Times per week","default":7,"type":["integer","null"],"minimum":1,"maximum":7},"color":{"description":"Colour","default":"teal","type":"string","enum":["teal","amber","rose","sky","violet","lime","slate"]},"archived":{"description":"Archived","default":false,"type":"boolean"},"order":{"default":0,"type":["integer","null"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/habits/habits/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Habits"],"summary":"Get a habit","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Habits"],"summary":"Update a habit (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"emoji":{"description":"Emoji","type":["string","null"]},"target_per_week":{"description":"Times per week","default":7,"type":["integer","null"],"minimum":1,"maximum":7},"color":{"description":"Colour","default":"teal","type":"string","enum":["teal","amber","rose","sky","violet","lime","slate"]},"archived":{"description":"Archived","default":false,"type":"boolean"},"order":{"default":0,"type":["integer","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Habits"],"summary":"Move a habit to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/habits/habits/{id}/restore":{"post":{"tags":["Habits"],"summary":"Restore a habit from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/habits/checkins":{"get":{"tags":["Habits"],"summary":"List check-ins","description":"One habit done on one day. At most one per habit per day.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -date"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"habit_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on habit_id (also habit_id_before / habit_id_after for ranges)"},{"name":"date","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on date (also date_before / date_after for ranges)"},{"name":"note","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on note (also note_before / note_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/habits_checkins"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Habits"],"summary":"Create a check-in","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"habit_id":{"description":"Habit. Id of a habits record","type":"string"},"date":{"description":"Day. Defaults to today","type":["string","null"],"format":"date"},"note":{"description":"Note","type":["string","null"]}},"required":["habit_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/habits/checkins/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Habits"],"summary":"Get a check-in","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Habits"],"summary":"Update a check-in (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"habit_id":{"description":"Habit. Id of a habits record","type":"string"},"date":{"description":"Day. Defaults to today","type":["string","null"],"format":"date"},"note":{"description":"Note","type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Habits"],"summary":"Move a check-in to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/habits/checkins/{id}/restore":{"post":{"tags":["Habits"],"summary":"Restore a check-in from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/journal/settings":{"get":{"tags":["Journal"],"summary":"Journal settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"prompts":{"description":"Daily prompts. One is shown per day, in rotation","default":["What gave you energy today?","What drained it?","One thing you'd do differently.","What are you looking forward to?","Who did you enjoy time with?","What did you learn?","What are you grateful for?"],"type":"array","items":{"type":"string"}},"nudge_after_hour":{"description":"Remind me in Today after (hour)","default":19,"type":["integer","null"],"minimum":0,"maximum":23}},"additionalProperties":false}}}}}},"patch":{"tags":["Journal"],"summary":"Change Journal settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompts":{"description":"Daily prompts. One is shown per day, in rotation","default":["What gave you energy today?","What drained it?","One thing you'd do differently.","What are you looking forward to?","Who did you enjoy time with?","What did you learn?","What are you grateful for?"],"type":"array","items":{"type":"string"}},"nudge_after_hour":{"description":"Remind me in Today after (hour)","default":19,"type":["integer","null"],"minimum":0,"maximum":23}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/journal/actions/today":{"post":{"tags":["Journal"],"summary":"Today's entry (or null) and today's prompt.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/journal/actions/upsert_day":{"post":{"tags":["Journal"],"summary":"Create or update the entry for a day (default today). Text is appended when append=true.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":["string","null"],"format":"date"},"mood":{"type":["integer","null"],"minimum":1,"maximum":5},"energy":{"type":["integer","null"],"minimum":1,"maximum":5},"text":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"append":{"default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/journal/actions/stats":{"post":{"tags":["Journal"],"summary":"Average mood and energy, the daily series, entry streak and tag counts over the last N days (default 30).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"default":30,"type":["integer","null"],"minimum":7,"maximum":730}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/journal/entries":{"get":{"tags":["Journal"],"summary":"List entries","description":"One journal entry per day (date is unique).","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -date"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"date","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on date (also date_before / date_after for ranges)"},{"name":"mood","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on mood (also mood_before / mood_after for ranges)"},{"name":"energy","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on energy (also energy_before / energy_after for ranges)"},{"name":"text","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on text (also text_before / text_after for ranges)"},{"name":"prompt","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on prompt (also prompt_before / prompt_after for ranges)"},{"name":"tags","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on tags (also tags_before / tags_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/journal_entries"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Journal"],"summary":"Create a entry","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"description":"Day. Defaults to today; one entry per day","type":["string","null"],"format":"date"},"mood":{"description":"Mood (1–5)","type":["integer","null"],"minimum":1,"maximum":5},"energy":{"description":"Energy (1–5)","type":["integer","null"],"minimum":1,"maximum":5},"text":{"description":"Entry","type":["string","null"]},"prompt":{"description":"Prompt answered","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/journal/entries/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Journal"],"summary":"Get a entry","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Journal"],"summary":"Update a entry (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"description":"Day. Defaults to today; one entry per day","type":["string","null"],"format":"date"},"mood":{"description":"Mood (1–5)","type":["integer","null"],"minimum":1,"maximum":5},"energy":{"description":"Energy (1–5)","type":["integer","null"],"minimum":1,"maximum":5},"text":{"description":"Entry","type":["string","null"]},"prompt":{"description":"Prompt answered","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Journal"],"summary":"Move a entry to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/journal/entries/{id}/restore":{"post":{"tags":["Journal"],"summary":"Restore a entry from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/renewals/settings":{"get":{"tags":["Renewals"],"summary":"Renewals settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"default_notice_days":{"description":"Default notice (days)","default":30,"type":["integer","null"],"minimum":0,"maximum":730},"upcoming_window_days":{"description":"Show as upcoming within (days)","default":60,"type":["integer","null"],"minimum":7,"maximum":365}},"additionalProperties":false}}}}}},"patch":{"tags":["Renewals"],"summary":"Change Renewals settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"default_notice_days":{"description":"Default notice (days)","default":30,"type":["integer","null"],"minimum":0,"maximum":730},"upcoming_window_days":{"description":"Show as upcoming within (days)","default":60,"type":["integer","null"],"minimum":7,"maximum":365}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/renewals/actions/renew":{"post":{"tags":["Renewals"],"summary":"Mark an item as renewed: moves due_date forward by its recurrence (or to new_due_date). Items that don't repeat become done.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of a items record"},"new_due_date":{"type":["string","null"],"format":"date"}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/renewals/items":{"get":{"tags":["Renewals"],"summary":"List items","description":"Something that expires or renews on a date.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default due_date"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on name (also name_before / name_after for ranges)"},{"name":"category","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on category (also category_before / category_after for ranges)"},{"name":"due_date","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on due_date (also due_date_before / due_date_after for ranges)"},{"name":"notice_days","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on notice_days (also notice_days_before / notice_days_after for ranges)"},{"name":"recurrence","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on recurrence (also recurrence_before / recurrence_after for ranges)"},{"name":"auto_renews","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on auto_renews (also auto_renews_before / auto_renews_after for ranges)"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on status (also status_before / status_after for ranges)"},{"name":"reference","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on reference (also reference_before / reference_after for ranges)"},{"name":"notes","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on notes (also notes_before / notes_after for ranges)"},{"name":"link","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on link (also link_before / link_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/renewals_items"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Renewals"],"summary":"Create a item","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"category":{"description":"Category","default":"other","type":"string","enum":["id","insurance","vehicle","property","contract","subscription","domain","health","tax","other"]},"due_date":{"description":"Due / expiry date","type":["string","null"],"format":"date"},"notice_days":{"description":"Notice (days). Act this many days before the due date","type":["integer","null"],"minimum":0,"maximum":730},"recurrence":{"description":"Repeats","default":"yearly","type":"string","enum":["none","monthly","quarterly","yearly","every_2_years","every_3_years","every_5_years","every_10_years"]},"auto_renews":{"description":"Renews automatically","default":false,"type":"boolean"},"status":{"description":"Status","default":"active","type":"string","enum":["active","done"]},"reference":{"description":"Reference / policy no.","type":["string","null"]},"notes":{"description":"Notes","type":["string","null"]},"link":{"description":"Link","type":["string","null"],"format":"uri"}},"required":["name","due_date"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/renewals/items/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Renewals"],"summary":"Get a item","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Renewals"],"summary":"Update a item (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"category":{"description":"Category","default":"other","type":"string","enum":["id","insurance","vehicle","property","contract","subscription","domain","health","tax","other"]},"due_date":{"description":"Due / expiry date","type":["string","null"],"format":"date"},"notice_days":{"description":"Notice (days). Act this many days before the due date","type":["integer","null"],"minimum":0,"maximum":730},"recurrence":{"description":"Repeats","default":"yearly","type":"string","enum":["none","monthly","quarterly","yearly","every_2_years","every_3_years","every_5_years","every_10_years"]},"auto_renews":{"description":"Renews automatically","default":false,"type":"boolean"},"status":{"description":"Status","default":"active","type":"string","enum":["active","done"]},"reference":{"description":"Reference / policy no.","type":["string","null"]},"notes":{"description":"Notes","type":["string","null"]},"link":{"description":"Link","type":["string","null"],"format":"uri"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Renewals"],"summary":"Move a item to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/renewals/items/{id}/restore":{"post":{"tags":["Renewals"],"summary":"Restore a item from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/subs/settings":{"get":{"tags":["Subs"],"summary":"Subs settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"base_currency":{"description":"Base currency","default":"EUR","type":["string","null"]},"fx_rates":{"description":"FX rates. Value of 1 unit of each currency in the base currency","default":{"USD":0.92,"GBP":1.17},"type":"object"},"warn_days":{"description":"Warn this many days before a charge","default":3,"type":["integer","null"],"minimum":0,"maximum":30}},"additionalProperties":false}}}}}},"patch":{"tags":["Subs"],"summary":"Change Subs settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"base_currency":{"description":"Base currency","default":"EUR","type":["string","null"]},"fx_rates":{"description":"FX rates. Value of 1 unit of each currency in the base currency","default":{"USD":0.92,"GBP":1.17},"type":"object"},"warn_days":{"description":"Warn this many days before a charge","default":3,"type":["integer","null"],"minimum":0,"maximum":30}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/subs/actions/summary":{"post":{"tags":["Subs"],"summary":"Totals per month and per year in the base currency, by category, plus subscriptions missing an FX rate.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/subs/actions/roll_forward":{"post":{"tags":["Subs"],"summary":"Move every next_charge date that is in the past forward by its cycle. Runs daily on its own.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/subs/subs":{"get":{"tags":["Subs"],"summary":"List subscriptions","description":"A recurring charge.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default next_charge"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on name (also name_before / name_after for ranges)"},{"name":"amount","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on amount (also amount_before / amount_after for ranges)"},{"name":"currency","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on currency (also currency_before / currency_after for ranges)"},{"name":"cycle","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on cycle (also cycle_before / cycle_after for ranges)"},{"name":"next_charge","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on next_charge (also next_charge_before / next_charge_after for ranges)"},{"name":"category","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on category (also category_before / category_after for ranges)"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on status (also status_before / status_after for ranges)"},{"name":"payment_method","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on payment_method (also payment_method_before / payment_method_after for ranges)"},{"name":"cancel_url","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on cancel_url (also cancel_url_before / cancel_url_after for ranges)"},{"name":"notes","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on notes (also notes_before / notes_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/subs_subs"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Subs"],"summary":"Create a subscription","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"amount":{"description":"Amount","type":["number","null"],"minimum":0},"currency":{"description":"Currency","default":"EUR","type":["string","null"]},"cycle":{"description":"Billed","default":"monthly","type":"string","enum":["weekly","monthly","quarterly","yearly"]},"next_charge":{"description":"Next charge","type":["string","null"],"format":"date"},"category":{"description":"Category","default":"other","type":"string","enum":["software","media","utilities","finance","health","home","transport","learning","other"]},"status":{"description":"Status","default":"active","type":"string","enum":["active","trial","paused","cancelled"]},"payment_method":{"description":"Paid with","type":["string","null"]},"cancel_url":{"description":"Cancel link","type":["string","null"],"format":"uri"},"notes":{"description":"Notes","type":["string","null"]}},"required":["name","amount"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/subs/subs/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Subs"],"summary":"Get a subscription","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Subs"],"summary":"Update a subscription (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"amount":{"description":"Amount","type":["number","null"],"minimum":0},"currency":{"description":"Currency","default":"EUR","type":["string","null"]},"cycle":{"description":"Billed","default":"monthly","type":"string","enum":["weekly","monthly","quarterly","yearly"]},"next_charge":{"description":"Next charge","type":["string","null"],"format":"date"},"category":{"description":"Category","default":"other","type":"string","enum":["software","media","utilities","finance","health","home","transport","learning","other"]},"status":{"description":"Status","default":"active","type":"string","enum":["active","trial","paused","cancelled"]},"payment_method":{"description":"Paid with","type":["string","null"]},"cancel_url":{"description":"Cancel link","type":["string","null"],"format":"uri"},"notes":{"description":"Notes","type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Subs"],"summary":"Move a subscription to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/subs/subs/{id}/restore":{"post":{"tags":["Subs"],"summary":"Restore a subscription from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/people/settings":{"get":{"tags":["People"],"summary":"People settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"default_cadence_days":{"description":"Default rhythm for new people (days)","default":60,"type":["integer","null"],"minimum":0,"maximum":730},"birthday_notice_days":{"description":"Show birthdays this many days ahead","default":7,"type":["integer","null"],"minimum":0,"maximum":60}},"additionalProperties":false}}}}}},"patch":{"tags":["People"],"summary":"Change People settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"default_cadence_days":{"description":"Default rhythm for new people (days)","default":60,"type":["integer","null"],"minimum":0,"maximum":730},"birthday_notice_days":{"description":"Show birthdays this many days ahead","default":7,"type":["integer","null"],"minimum":0,"maximum":60}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/people/actions/log_touch":{"post":{"tags":["People"],"summary":"Record that you were in touch with someone (default today).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"person_id":{"type":"string","description":"Id of a people record"},"channel":{"default":"other","type":"string","enum":["call","whatsapp","message","email","meeting","other"]},"note":{"type":["string","null"]},"date":{"type":["string","null"],"format":"date"}},"required":["person_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/people/actions/due":{"post":{"tags":["People"],"summary":"People due for a catch-up, most overdue first.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/people/people":{"get":{"tags":["People"],"summary":"List people","description":"Someone you want to stay in touch with.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default name"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on name (also name_before / name_after for ranges)"},{"name":"email","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on email (also email_before / email_after for ranges)"},{"name":"phone","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on phone (also phone_before / phone_after for ranges)"},{"name":"company","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on company (also company_before / company_after for ranges)"},{"name":"role","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on role (also role_before / role_after for ranges)"},{"name":"tags","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on tags (also tags_before / tags_after for ranges)"},{"name":"cadence_days","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on cadence_days (also cadence_days_before / cadence_days_after for ranges)"},{"name":"last_contact","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on last_contact (also last_contact_before / last_contact_after for ranges)"},{"name":"birthday","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on birthday (also birthday_before / birthday_after for ranges)"},{"name":"notes","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on notes (also notes_before / notes_after for ranges)"},{"name":"pinned","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on pinned (also pinned_before / pinned_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/people_people"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["People"],"summary":"Create a person","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"email":{"description":"Email","type":["string","null"],"format":"email"},"phone":{"description":"Phone","type":["string","null"]},"company":{"description":"Company","type":["string","null"]},"role":{"description":"Role","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"cadence_days":{"description":"Catch up every (days). 0 = no rhythm","type":["integer","null"],"minimum":0,"maximum":730},"last_contact":{"description":"Last contact","type":["string","null"],"format":"date"},"birthday":{"description":"Birthday. Year is ignored; use 1900 if unknown","type":["string","null"],"format":"date"},"notes":{"description":"Notes","type":["string","null"]},"pinned":{"description":"Pinned","default":false,"type":"boolean"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/people/people/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["People"],"summary":"Get a person","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["People"],"summary":"Update a person (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"email":{"description":"Email","type":["string","null"],"format":"email"},"phone":{"description":"Phone","type":["string","null"]},"company":{"description":"Company","type":["string","null"]},"role":{"description":"Role","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"cadence_days":{"description":"Catch up every (days). 0 = no rhythm","type":["integer","null"],"minimum":0,"maximum":730},"last_contact":{"description":"Last contact","type":["string","null"],"format":"date"},"birthday":{"description":"Birthday. Year is ignored; use 1900 if unknown","type":["string","null"],"format":"date"},"notes":{"description":"Notes","type":["string","null"]},"pinned":{"description":"Pinned","default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["People"],"summary":"Move a person to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/people/people/{id}/restore":{"post":{"tags":["People"],"summary":"Restore a person from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/people/touches":{"get":{"tags":["People"],"summary":"List touches","description":"A moment you were in contact with someone. Updates the person's last_contact.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -date"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"person_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on person_id (also person_id_before / person_id_after for ranges)"},{"name":"date","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on date (also date_before / date_after for ranges)"},{"name":"channel","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on channel (also channel_before / channel_after for ranges)"},{"name":"note","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on note (also note_before / note_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/people_touches"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["People"],"summary":"Create a touch","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"person_id":{"description":"Person. Id of a people record","type":"string"},"date":{"description":"Day. Defaults to today","type":["string","null"],"format":"date"},"channel":{"description":"How","default":"other","type":"string","enum":["call","whatsapp","message","email","meeting","other"]},"note":{"description":"Note","type":["string","null"]}},"required":["person_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/people/touches/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["People"],"summary":"Get a touch","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["People"],"summary":"Update a touch (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"person_id":{"description":"Person. Id of a people record","type":"string"},"date":{"description":"Day. Defaults to today","type":["string","null"],"format":"date"},"channel":{"description":"How","default":"other","type":"string","enum":["call","whatsapp","message","email","meeting","other"]},"note":{"description":"Note","type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["People"],"summary":"Move a touch to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/people/touches/{id}/restore":{"post":{"tags":["People"],"summary":"Restore a touch from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/forms/settings":{"get":{"tags":["Forms"],"summary":"Forms settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"show_in_today":{"description":"Show new submissions in Today","default":true,"type":"boolean"},"honeypot":{"description":"Block bots with a hidden field","default":true,"type":"boolean"}},"additionalProperties":false}}}}}},"patch":{"tags":["Forms"],"summary":"Change Forms settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"show_in_today":{"description":"Show new submissions in Today","default":true,"type":"boolean"},"honeypot":{"description":"Block bots with a hidden field","default":true,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/forms/actions/export_csv":{"post":{"tags":["Forms"],"summary":"All submissions of a form as CSV text (semicolon-safe, UTF-8).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"form_id":{"type":"string","description":"Id of a forms record"},"status":{"type":"string","enum":["new","done","spam"]}},"required":["form_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/forms/actions/mark_all":{"post":{"tags":["Forms"],"summary":"Set the status of every submission of a form that currently has from_status.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"form_id":{"type":"string","description":"Id of a forms record"},"from_status":{"default":"new","type":"string","enum":["new","done","spam"]},"to_status":{"type":"string","enum":["new","done","spam"]}},"required":["form_id","to_status"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/forms/forms":{"get":{"tags":["Forms"],"summary":"List forms","description":"A form with a hosted page at /f/{id} and a public endpoint at /api/public/forms/{id}.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -created_at"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on name (also name_before / name_after for ranges)"},{"name":"intro","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on intro (also intro_before / intro_after for ranges)"},{"name":"fields","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on fields (also fields_before / fields_after for ranges)"},{"name":"button_label","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on button_label (also button_label_before / button_label_after for ranges)"},{"name":"success_message","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on success_message (also success_message_before / success_message_after for ranges)"},{"name":"redirect_url","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on redirect_url (also redirect_url_before / redirect_url_after for ranges)"},{"name":"allowed_origins","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on allowed_origins (also allowed_origins_before / allowed_origins_after for ranges)"},{"name":"active","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on active (also active_before / active_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/forms_forms"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Forms"],"summary":"Create a form","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"intro":{"description":"Intro text. Shown above the hosted form","type":["string","null"]},"fields":{"description":"Fields","default":[{"name":"email","label":"Email","type":"email","required":true}],"type":"array","items":{"type":"object","properties":{"name":{"description":"Key in the submission data (letters, numbers, _)","type":["string","null"]},"label":{"type":["string","null"]},"type":{"default":"text","type":"string","enum":["text","email","textarea","select","checkbox","number","phone","url"]},"required":{"default":false,"type":"boolean"},"options":{"description":"Choices for select","type":"array","items":{"type":"string"}}},"additionalProperties":false}},"button_label":{"description":"Button label","default":"Send","type":["string","null"]},"success_message":{"description":"Thank-you message","default":"Thanks, we got it.","type":["string","null"]},"redirect_url":{"description":"Redirect after submit. Optional; otherwise the thank-you message is shown","type":["string","null"],"format":"uri"},"allowed_origins":{"description":"Allowed sites. Origins allowed to POST from the browser, e.g. https://example.com. Empty = any","default":[],"type":"array","items":{"type":"string"}},"active":{"description":"Accepting submissions","default":true,"type":"boolean"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/forms/forms/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Forms"],"summary":"Get a form","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Forms"],"summary":"Update a form (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Name","type":["string","null"]},"intro":{"description":"Intro text. Shown above the hosted form","type":["string","null"]},"fields":{"description":"Fields","default":[{"name":"email","label":"Email","type":"email","required":true}],"type":"array","items":{"type":"object","properties":{"name":{"description":"Key in the submission data (letters, numbers, _)","type":["string","null"]},"label":{"type":["string","null"]},"type":{"default":"text","type":"string","enum":["text","email","textarea","select","checkbox","number","phone","url"]},"required":{"default":false,"type":"boolean"},"options":{"description":"Choices for select","type":"array","items":{"type":"string"}}},"additionalProperties":false}},"button_label":{"description":"Button label","default":"Send","type":["string","null"]},"success_message":{"description":"Thank-you message","default":"Thanks, we got it.","type":["string","null"]},"redirect_url":{"description":"Redirect after submit. Optional; otherwise the thank-you message is shown","type":["string","null"],"format":"uri"},"allowed_origins":{"description":"Allowed sites. Origins allowed to POST from the browser, e.g. https://example.com. Empty = any","default":[],"type":"array","items":{"type":"string"}},"active":{"description":"Accepting submissions","default":true,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Forms"],"summary":"Move a form to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/forms/forms/{id}/restore":{"post":{"tags":["Forms"],"summary":"Restore a form from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/forms/submissions":{"get":{"tags":["Forms"],"summary":"List submissions","description":"One response to a form. Created by the public endpoint; you can triage, edit or delete them.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -created_at"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"form_id","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on form_id (also form_id_before / form_id_after for ranges)"},{"name":"data","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on data (also data_before / data_after for ranges)"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on status (also status_before / status_after for ranges)"},{"name":"note","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on note (also note_before / note_after for ranges)"},{"name":"meta","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on meta (also meta_before / meta_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/forms_submissions"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Forms"],"summary":"Create a submission","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"form_id":{"description":"Form. Id of a forms record","type":"string"},"data":{"description":"Answers","type":"object"},"status":{"description":"Status","default":"new","type":"string","enum":["new","done","spam"]},"note":{"description":"Your note","type":["string","null"]}},"required":["form_id","data"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/forms/submissions/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Forms"],"summary":"Get a submission","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Forms"],"summary":"Update a submission (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"form_id":{"description":"Form. Id of a forms record","type":"string"},"data":{"description":"Answers","type":"object"},"status":{"description":"Status","default":"new","type":"string","enum":["new","done","spam"]},"note":{"description":"Your note","type":["string","null"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Forms"],"summary":"Move a submission to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/forms/submissions/{id}/restore":{"post":{"tags":["Forms"],"summary":"Restore a submission from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/short/settings":{"get":{"tags":["Short"],"summary":"Short settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"slug_length":{"description":"Random slug length","default":6,"type":["integer","null"],"minimum":4,"maximum":16},"permanent_redirects":{"description":"Use permanent (301) redirects. Browsers cache 301s; clicks then stop being counted","default":false,"type":"boolean"}},"additionalProperties":false}}}}}},"patch":{"tags":["Short"],"summary":"Change Short settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug_length":{"description":"Random slug length","default":6,"type":["integer","null"],"minimum":4,"maximum":16},"permanent_redirects":{"description":"Use permanent (301) redirects. Browsers cache 301s; clicks then stop being counted","default":false,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}}},"/short/actions/stats":{"post":{"tags":["Short"],"summary":"Total clicks and the most-clicked links.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"top":{"default":10,"type":["integer","null"],"minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/short/links":{"get":{"tags":["Short"],"summary":"List links","description":"A slug that redirects to a URL at /s/{slug}. Slugs are unique across the service.","parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search"},{"name":"sort","in":"query","schema":{"type":"string"},"description":"Field name, '-' prefix for descending. Default -created_at"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":500}},{"name":"offset","in":"query","schema":{"type":"integer"}},{"name":"trashed","in":"query","schema":{"type":"string","enum":["false","true","only"]}},{"name":"slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on slug (also slug_before / slug_after for ranges)"},{"name":"url","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on url (also url_before / url_after for ranges)"},{"name":"title","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on title (also title_before / title_after for ranges)"},{"name":"tags","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on tags (also tags_before / tags_after for ranges)"},{"name":"active","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on active (also active_before / active_after for ranges)"},{"name":"expires_at","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on expires_at (also expires_at_before / expires_at_after for ranges)"},{"name":"clicks","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on clicks (also clicks_before / clicks_after for ranges)"},{"name":"last_click_at","in":"query","required":false,"schema":{"type":"string"},"description":"Filter on last_click_at (also last_click_at_before / last_click_at_after for ranges)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/short_links"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"tags":["Short"],"summary":"Create a short link","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"description":"Slug. Leave empty for a random one","type":["string","null"]},"url":{"description":"Destination URL","type":["string","null"],"format":"uri"},"title":{"description":"Title","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"active":{"description":"Active","default":true,"type":"boolean"},"expires_at":{"description":"Expires","type":["string","null"],"format":"date-time"}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created"},"402":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/short/links/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Short"],"summary":"Get a short link","responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Short"],"summary":"Update a short link (merge)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"description":"Slug. Leave empty for a random one","type":["string","null"]},"url":{"description":"Destination URL","type":["string","null"],"format":"uri"},"title":{"description":"Title","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"active":{"description":"Active","default":true,"type":"boolean"},"expires_at":{"description":"Expires","type":["string","null"],"format":"date-time"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"422":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Short"],"summary":"Move a short link to the trash (?permanent=true to purge)","parameters":[{"name":"permanent","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/short/links/{id}/restore":{"post":{"tags":["Short"],"summary":"Restore a short link from the trash","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"object"}}}}}}},"schemas":{"notes_notes":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"description":"Title","type":["string","null"]},"body":{"description":"Text. Plain text; line breaks are kept","type":["string","null"]},"kind":{"description":"Kind","default":"text","type":"string","enum":["text","checklist"]},"items":{"description":"Checklist items. Used when kind is checklist","default":[],"type":"array","items":{"type":"object","properties":{"text":{"type":["string","null"]},"done":{"default":false,"type":"boolean"},"indent":{"description":"1 = sub-item of the item above","default":0,"type":["integer","null"],"minimum":0,"maximum":1}},"additionalProperties":false}},"images":{"description":"Images. Attached images, shown on top of the note. Upload with the attach_image action or POST /api/v1/files","default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"w":{"type":["integer","null"],"minimum":1,"maximum":20000},"h":{"type":["integer","null"],"minimum":1,"maximum":20000}},"additionalProperties":false}},"color":{"description":"Colour","default":"default","type":"string","enum":["default","red","orange","yellow","green","teal","blue","cerulean","purple","pink","brown","gray"]},"labels":{"description":"Labels","default":[],"type":"array","items":{"type":"string"}},"pinned":{"description":"Pinned","default":false,"type":"boolean"},"archived":{"description":"Archived","default":false,"type":"boolean"},"reminder_at":{"description":"Reminder. Notifies on your devices and shows in Today from this moment","type":["string","null"],"format":"date-time"},"reminder_repeat":{"description":"Repeat reminder","default":"none","type":"string","enum":["none","daily","weekly","monthly","yearly"]},"reminder_sent_at":{"readOnly":true,"type":["string","null"],"format":"date-time"},"source":{"description":"Where the note came from, e.g. keep-import","type":["string","null"]},"source_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"tasks_tasks":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"description":"Task","type":["string","null"]},"notes":{"description":"Notes","type":["string","null"]},"due":{"description":"Due","type":["string","null"],"format":"date"},"list":{"description":"List","default":"Inbox","type":["string","null"]},"priority":{"description":"Priority","default":"none","type":"string","enum":["none","low","medium","high"]},"priority_rank":{"readOnly":true,"default":0,"type":["integer","null"]},"status":{"description":"Status","default":"open","type":"string","enum":["open","done"]},"recurrence":{"description":"Repeats","default":"none","type":"string","enum":["none","daily","weekdays","weekly","monthly","yearly"]},"subtasks":{"description":"Subtasks","default":[],"type":"array","items":{"type":"object","properties":{"text":{"type":["string","null"]},"done":{"default":false,"type":"boolean"}},"additionalProperties":false}},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"done_at":{"readOnly":true,"type":["string","null"],"format":"date-time"},"overdue":{"type":"boolean"},"due_in":{"description":"Days until due (negative when overdue)","type":["integer","null"]},"subtasks_done":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"later_links":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"description":"URL","type":["string","null"],"format":"uri"},"title":{"description":"Title. Filled in from the page when left empty","type":["string","null"]},"note":{"description":"Note","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"status":{"description":"Status","default":"unread","type":"string","enum":["unread","read","archived"]},"favorite":{"description":"Favourite","default":false,"type":"boolean"},"read_at":{"readOnly":true,"type":["string","null"],"format":"date-time"},"site":{"description":"Host name of the URL","type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"habits_habits":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"Name","type":["string","null"]},"emoji":{"description":"Emoji","type":["string","null"]},"target_per_week":{"description":"Times per week","default":7,"type":["integer","null"],"minimum":1,"maximum":7},"color":{"description":"Colour","default":"teal","type":"string","enum":["teal","amber","rose","sky","violet","lime","slate"]},"archived":{"description":"Archived","default":false,"type":"boolean"},"order":{"default":0,"type":["integer","null"]},"done_today":{"type":"boolean"},"this_week":{"description":"Check-ins this week","type":["integer","null"]},"streak":{"type":["integer","null"]},"streak_unit":{"description":"days or weeks","type":["string","null"]},"recent":{"description":"Dates checked in over the last 84 days","type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"habits_checkins":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"habit_id":{"description":"Habit. Id of a habits record","type":"string"},"date":{"description":"Day. Defaults to today","type":["string","null"],"format":"date"},"note":{"description":"Note","type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"journal_entries":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"description":"Day. Defaults to today; one entry per day","type":["string","null"],"format":"date"},"mood":{"description":"Mood (1–5)","type":["integer","null"],"minimum":1,"maximum":5},"energy":{"description":"Energy (1–5)","type":["integer","null"],"minimum":1,"maximum":5},"text":{"description":"Entry","type":["string","null"]},"prompt":{"description":"Prompt answered","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"renewals_items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"Name","type":["string","null"]},"category":{"description":"Category","default":"other","type":"string","enum":["id","insurance","vehicle","property","contract","subscription","domain","health","tax","other"]},"due_date":{"description":"Due / expiry date","type":["string","null"],"format":"date"},"notice_days":{"description":"Notice (days). Act this many days before the due date","type":["integer","null"],"minimum":0,"maximum":730},"recurrence":{"description":"Repeats","default":"yearly","type":"string","enum":["none","monthly","quarterly","yearly","every_2_years","every_3_years","every_5_years","every_10_years"]},"auto_renews":{"description":"Renews automatically","default":false,"type":"boolean"},"status":{"description":"Status","default":"active","type":"string","enum":["active","done"]},"reference":{"description":"Reference / policy no.","type":["string","null"]},"notes":{"description":"Notes","type":["string","null"]},"link":{"description":"Link","type":["string","null"],"format":"uri"},"act_by":{"description":"due_date minus notice_days","type":["string","null"],"format":"date"},"days_left":{"description":"Days until due_date (negative when overdue)","type":["integer","null"]},"state":{"type":"string","enum":["overdue","act_now","upcoming","ok","done"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"subs_subs":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"Name","type":["string","null"]},"amount":{"description":"Amount","type":["number","null"],"minimum":0},"currency":{"description":"Currency","default":"EUR","type":["string","null"]},"cycle":{"description":"Billed","default":"monthly","type":"string","enum":["weekly","monthly","quarterly","yearly"]},"next_charge":{"description":"Next charge","type":["string","null"],"format":"date"},"category":{"description":"Category","default":"other","type":"string","enum":["software","media","utilities","finance","health","home","transport","learning","other"]},"status":{"description":"Status","default":"active","type":"string","enum":["active","trial","paused","cancelled"]},"payment_method":{"description":"Paid with","type":["string","null"]},"cancel_url":{"description":"Cancel link","type":["string","null"],"format":"uri"},"notes":{"description":"Notes","type":["string","null"]},"monthly_cost":{"description":"amount per month in its own currency","type":["number","null"]},"yearly_cost":{"type":["number","null"]},"monthly_cost_base":{"description":"per month in the base currency (null if no FX rate set); 0 when paused/cancelled","type":["number","null"]},"days_to_charge":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"people_people":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"Name","type":["string","null"]},"email":{"description":"Email","type":["string","null"],"format":"email"},"phone":{"description":"Phone","type":["string","null"]},"company":{"description":"Company","type":["string","null"]},"role":{"description":"Role","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"cadence_days":{"description":"Catch up every (days). 0 = no rhythm","type":["integer","null"],"minimum":0,"maximum":730},"last_contact":{"description":"Last contact","type":["string","null"],"format":"date"},"birthday":{"description":"Birthday. Year is ignored; use 1900 if unknown","type":["string","null"],"format":"date"},"notes":{"description":"Notes","type":["string","null"]},"pinned":{"description":"Pinned","default":false,"type":"boolean"},"next_followup":{"type":["string","null"],"format":"date"},"due":{"description":"next_followup is today or earlier","type":"boolean"},"days_since_contact":{"type":["integer","null"]},"next_birthday":{"type":["string","null"],"format":"date"},"days_to_birthday":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"people_touches":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"person_id":{"description":"Person. Id of a people record","type":"string"},"date":{"description":"Day. Defaults to today","type":["string","null"],"format":"date"},"channel":{"description":"How","default":"other","type":"string","enum":["call","whatsapp","message","email","meeting","other"]},"note":{"description":"Note","type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"forms_forms":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"Name","type":["string","null"]},"intro":{"description":"Intro text. Shown above the hosted form","type":["string","null"]},"fields":{"description":"Fields","default":[{"name":"email","label":"Email","type":"email","required":true}],"type":"array","items":{"type":"object","properties":{"name":{"description":"Key in the submission data (letters, numbers, _)","type":["string","null"]},"label":{"type":["string","null"]},"type":{"default":"text","type":"string","enum":["text","email","textarea","select","checkbox","number","phone","url"]},"required":{"default":false,"type":"boolean"},"options":{"description":"Choices for select","type":"array","items":{"type":"string"}}},"additionalProperties":false}},"button_label":{"description":"Button label","default":"Send","type":["string","null"]},"success_message":{"description":"Thank-you message","default":"Thanks, we got it.","type":["string","null"]},"redirect_url":{"description":"Redirect after submit. Optional; otherwise the thank-you message is shown","type":["string","null"],"format":"uri"},"allowed_origins":{"description":"Allowed sites. Origins allowed to POST from the browser, e.g. https://example.com. Empty = any","default":[],"type":"array","items":{"type":"string"}},"active":{"description":"Accepting submissions","default":true,"type":"boolean"},"public_url":{"type":["string","null"],"format":"uri"},"post_url":{"type":["string","null"],"format":"uri"},"submissions":{"type":["integer","null"]},"new_submissions":{"type":["integer","null"]},"last_submission_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"forms_submissions":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"form_id":{"description":"Form. Id of a forms record","type":"string"},"data":{"description":"Answers","type":"object"},"status":{"description":"Status","default":"new","type":"string","enum":["new","done","spam"]},"note":{"description":"Your note","type":["string","null"]},"meta":{"description":"Referrer and user agent","readOnly":true,"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"short_links":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"description":"Slug. Leave empty for a random one","type":["string","null"]},"url":{"description":"Destination URL","type":["string","null"],"format":"uri"},"title":{"description":"Title","type":["string","null"]},"tags":{"description":"Tags","default":[],"type":"array","items":{"type":"string"}},"active":{"description":"Active","default":true,"type":"boolean"},"expires_at":{"description":"Expires","type":["string","null"],"format":"date-time"},"clicks":{"readOnly":true,"default":0,"type":["integer","null"]},"last_click_at":{"readOnly":true,"type":["string","null"],"format":"date-time"},"short_url":{"type":["string","null"],"format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}