{"openapi":"3.0.3","info":{"title":"Treehouse Public API","version":"1.1.1","description":"Family-scoped HTTP API for Treehouse tasks, calendar events, and lists. Intended for assistants and connectors (e.g. Meta Muse). Authenticate with a family API key. Authenticated routes are limited to 100 requests per API key per minute; over-limit calls return HTTP 429.","contact":{"email":"support@treehousetasks.com"}},"servers":[{"url":"https://api.treehousetasks.com","description":"Production"},{"url":"https://yphzagdxgsubmkkfhavi.supabase.co/functions/v1/public-api","description":"Direct Supabase (legacy)"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"th_live_…","description":"Family API key minted via create-api-key while signed in as a parent."}},"schemas":{"Task":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["todo","inProgress","done","backlog"]},"assigned_to":{"type":"string","format":"uuid","nullable":true},"due_date":{"type":"string","format":"date-time","nullable":true},"family_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CalendarEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time","nullable":true},"is_all_day":{"type":"boolean"},"type":{"type":"string","enum":["task","event","reminder"]},"assigned_to":{"type":"string","format":"uuid","nullable":true},"assigned_users":{"type":"array","items":{"type":"string","format":"uuid"}},"family_id":{"type":"string","format":"uuid"},"task_id":{"type":"string","format":"uuid","nullable":true},"event_type_id":{"type":"string","format":"uuid","nullable":true},"recurrence_type":{"type":"string","enum":["none","daily","weekly","bi_weekly","monthly","quarterly","yearly"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FamilyList":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"emoji":{"type":"string","nullable":true},"folder_id":{"type":"string","format":"uuid","nullable":true},"family_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"list_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"notes":{"type":"string","nullable":true},"is_completed":{"type":"boolean"},"assigned_to":{"type":"string","format":"uuid","nullable":true},"order_position":{"type":"integer"},"completed_at":{"type":"string","format":"date-time","nullable":true},"completed_by":{"type":"string","format":"uuid","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/health":{"get":{"security":[],"summary":"Health check","responses":{"200":{"description":"OK"}}}},"/openapi.json":{"get":{"security":[],"summary":"OpenAPI document","responses":{"200":{"description":"OpenAPI 3 JSON"}}}},"/v1/me":{"get":{"summary":"Current API key context","responses":{"200":{"description":"Family and key metadata"},"401":{"description":"Unauthorized"}}}},"/v1/tasks":{"get":{"summary":"List family tasks","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["todo","inProgress","done","backlog"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Task list"},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create a task","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["todo","inProgress","done","backlog"]},"assigned_to":{"type":"string","format":"uuid"},"due_date":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"}}}},"/v1/tasks/{id}":{"get":{"summary":"Get a task","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Task"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}},"patch":{"summary":"Update a task","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["todo","inProgress","done","backlog"]},"assigned_to":{"type":"string","format":"uuid","nullable":true}}}}}},"responses":{"200":{"description":"Updated"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}},"delete":{"summary":"Soft-delete a task","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}}},"/v1/calendar/events":{"get":{"summary":"List calendar events","parameters":[{"name":"start","in":"query","description":"Inclusive lower bound on start_date (ISO-8601)","schema":{"type":"string","format":"date-time"}},{"name":"end","in":"query","description":"Inclusive upper bound on start_date (ISO-8601)","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Event list"},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create a calendar event","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","start_date"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time"},"is_all_day":{"type":"boolean"},"type":{"type":"string","enum":["task","event","reminder"]},"assigned_to":{"type":"string","format":"uuid"},"assigned_users":{"type":"array","items":{"type":"string","format":"uuid"}},"recurrence_type":{"type":"string","enum":["none","daily","weekly","bi_weekly","monthly","quarterly","yearly"]},"task_id":{"type":"string","format":"uuid"},"event_type_id":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"}}}},"/v1/calendar/events/{id}":{"get":{"summary":"Get a calendar event","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Event"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}},"patch":{"summary":"Update a calendar event","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string","nullable":true},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time","nullable":true},"is_all_day":{"type":"boolean"},"type":{"type":"string","enum":["task","event","reminder"]},"assigned_to":{"type":"string","format":"uuid","nullable":true},"assigned_users":{"type":"array","items":{"type":"string","format":"uuid"}},"recurrence_type":{"type":"string","enum":["none","daily","weekly","bi_weekly","monthly","quarterly","yearly"]},"task_id":{"type":"string","format":"uuid","nullable":true},"event_type_id":{"type":"string","format":"uuid","nullable":true}}}}}},"responses":{"200":{"description":"Updated"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}},"delete":{"summary":"Hard-delete a calendar event","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}}},"/v1/lists":{"get":{"summary":"List family lists","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List collection"},"401":{"description":"Unauthorized"}}},"post":{"summary":"Create a list","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"emoji":{"type":"string"},"folder_id":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"}}}},"/v1/lists/{id}":{"get":{"summary":"Get a list","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}},"patch":{"summary":"Update a list","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string","nullable":true},"emoji":{"type":"string","nullable":true},"folder_id":{"type":"string","format":"uuid","nullable":true}}}}}},"responses":{"200":{"description":"Updated"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}},"delete":{"summary":"Soft-delete a list","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}}},"/v1/lists/{id}/items":{"get":{"summary":"List items in a list","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Items"},"401":{"description":"Unauthorized"},"404":{"description":"List not found"}}},"post":{"summary":"Create a list item","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"notes":{"type":"string"},"assigned_to":{"type":"string","format":"uuid"},"order_position":{"type":"integer"}}}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"404":{"description":"List not found"}}}},"/v1/lists/{listId}/items/{itemId}":{"patch":{"summary":"Update a list item","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"notes":{"type":"string","nullable":true},"is_completed":{"type":"boolean"},"assigned_to":{"type":"string","format":"uuid","nullable":true},"order_position":{"type":"integer"}}}}}},"responses":{"200":{"description":"Updated"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}},"delete":{"summary":"Hard-delete a list item","parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}}}}}}