{"openapi":"3.1.0","info":{"title":"KnowsYou Personal API","version":"1.0.0","description":"Read and update the authenticated user's supported KnowsYou records."},"servers":[{"url":"https://localhost:3101"}],"paths":{"/api/v1/commands":{"get":{"operationId":"listKnowsYouCommands","summary":"List KnowsYou commands","description":"Return the current command names, descriptions, permissions and input schemas. Call this before execution when an input shape is uncertain.","security":[{"personalApiKey":[]}],"responses":{"200":{"description":"Current command catalog.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Invalid or missing API key."},"429":{"description":"API-key rate limit reached."}}}},"/api/v1/command":{"post":{"operationId":"runKnowsYouCommand","summary":"Read or update KnowsYou","description":"Run one supported personal-data command. Call listKnowsYouCommands first when the input is uncertain. Write commands should include a stable Idempotency-Key.","security":[{"personalApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Required for write commands. Reuse it only when retrying the same request.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["command","input"],"properties":{"command":{"type":"string","enum":["meal log","meal list","meal update","meal void","meal rate","nutrition today","nutrition recap","food history","nutrition lookup","barcode","treatment set","treatment list","treatment take","treatment fix","treatment void","condition set","condition list","condition void","habit set","habit list","habit log","habit fix","habit void","activity log","activity start","activity stop","activity list","activity update","workout start","workout set","workout done","workout cancel","workout list","training recap","exercise history","workout exercise","workout remove","workout fix","body log","vital log","body list","body fix","body delete","nudge add","nudge update","nudge cancel","routine list","routine set","nudge cancel","routine due","checkin record","checkin list","checkin void","goal set","goal list","goal templates","goal template","goal apply","goal void","lab record","lab recap","lab list","lab report","lab void","lab marker rename","lab marker range","lab plan set","lab plan void","ref list","ref void","exercise search","exercise note","template list","template set","template add","template void","memory save","memory list","memory forget","photo list","photo delete","feedback send","whoop"]},"input":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Command completed.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid request."},"401":{"description":"Invalid or missing API key."},"409":{"description":"Idempotency conflict."},"413":{"description":"Request body too large."},"422":{"description":"The command could not be completed."},"429":{"description":"API-key rate limit reached."}}}}},"components":{"securitySchemes":{"personalApiKey":{"type":"http","scheme":"bearer","bearerFormat":"KnowsYou personal API key"}}}}