{"openapi":"3.1.0","info":{"title":"Aligned","version":"1.0","description":"Read and add to a shared Aligned page. Each key works for one page."},"servers":[{"url":"https://getaligned.space/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"security":[{"bearer":[]}],"paths":{"/page":{"get":{"operationId":"readPage","summary":"Read everything on the page: lists, calendar, notes, feed.","responses":{"200":{"description":"Saved"}}}},"/list":{"post":{"operationId":"addToList","summary":"Add items to a shared list (default: Groceries). Creates the list if it doesn't exist.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string","description":"List name, e.g. Groceries"},"items":{"type":"array","items":{"type":"string"}}},"required":["items"]}}}},"responses":{"200":{"description":"Saved"}}}},"/list/check":{"post":{"operationId":"checkOffItem","summary":"Mark a list item done (or not done).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string"},"item":{"type":"string"},"done":{"type":"boolean"}},"required":["item"]}}}},"responses":{"200":{"description":"Saved"}}}},"/calendar":{"post":{"operationId":"addEvent","summary":"Add an event to the shared calendar.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calendar":{"type":"string"},"title":{"type":"string"},"date":{"type":"string","description":"YYYY-MM-DD"},"time":{"type":"string","description":"HH:MM, 24-hour"},"kind":{"type":"string","description":"Kind of event, which sets its color, e.g. Us, Rentals, Work"}},"required":["title","date"]}}}},"responses":{"200":{"description":"Saved"}}}},"/list/edit":{"post":{"operationId":"editListItem","summary":"Change the wording of a list item.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string"},"new_text":{"type":"string"},"list":{"type":"string"}},"required":["item","new_text"]}}}},"responses":{"200":{"description":"Saved"}}}},"/list/remove":{"post":{"operationId":"removeListItem","summary":"Delete an item from a list.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string"},"list":{"type":"string"}},"required":["item"]}}}},"responses":{"200":{"description":"Saved"}}}},"/list/clear-checked":{"post":{"operationId":"clearCheckedItems","summary":"Delete every checked-off item from a list.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"Saved"}}}},"/calendar/update":{"post":{"operationId":"updateEvent","summary":"Rename, move or recolor a calendar event, found by its title (and date if several share it).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"date":{"type":"string"},"new_title":{"type":"string"},"new_date":{"type":"string"},"new_time":{"type":"string"},"kind":{"type":"string"},"calendar":{"type":"string"}},"required":["title"]}}}},"responses":{"200":{"description":"Saved"}}}},"/calendar/delete":{"post":{"operationId":"deleteEvent","summary":"Delete a calendar event.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"date":{"type":"string"},"calendar":{"type":"string"}},"required":["title"]}}}},"responses":{"200":{"description":"Saved"}}}},"/note/edit":{"post":{"operationId":"editNote","summary":"Find and replace text in a note; an empty replace deletes the text.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"find":{"type":"string"},"replace":{"type":"string"},"note":{"type":"string"},"all":{"type":"boolean"}},"required":["find","replace"]}}}},"responses":{"200":{"description":"Saved"}}}},"/daily":{"post":{"operationId":"dailyTask","summary":"Check off, uncheck, add or remove a task on the daily list.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task":{"type":"string"},"action":{"type":"string","enum":["check","uncheck","add","remove"]},"list":{"type":"string"}},"required":["task","action"]}}}},"responses":{"200":{"description":"Saved"}}}},"/feed":{"post":{"operationId":"postUpdate","summary":"Post an update to the page's bot feed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}}}},"responses":{"200":{"description":"Saved"}}}},"/note":{"post":{"operationId":"appendToNote","summary":"Append text to a note (creates it if missing).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","description":"Note title"},"text":{"type":"string"}},"required":["text"]}}}},"responses":{"200":{"description":"Saved"}}}}}}