{"openapi":"3.1.0","info":{"title":"Check-In Line API","version":"0.1.0","description":"Daily phone check-ins for an aging parent. Same capabilities as the MCP tools."},"servers":[{"url":"https://checkin.keelcroft.com/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.1 access token or a personal API key (ck_...)"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error","code"]}}},"paths":{"/me":{"get":{"operationId":"getMe","summary":"Account and subscription status","responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents":{"get":{"operationId":"listParents","summary":"List parents with status","responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addParent","summary":"Add a parent and start the consent call","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","phone","timezone","checkin_time"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"timezone":{"type":"string"},"checkin_time":{"type":"string"},"locale":{"type":"string"},"caller_name":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/status":{"get":{"operationId":"getStatus","summary":"Today's status","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/history":{"get":{"operationId":"getHistory","summary":"Check-in history and pattern facts","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/voice-notes":{"get":{"operationId":"getVoiceNotes","summary":"Voice messages from the parent","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/call-now":{"post":{"operationId":"requestCheckinNow","summary":"Place a check-in call now","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/setup-call":{"post":{"operationId":"startSetupCall","summary":"Place the consent call","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/schedule":{"put":{"operationId":"setSchedule","summary":"Change schedule","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/pause":{"post":{"operationId":"pauseCheckins","summary":"Pause calls","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"until":{"type":"string"},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/resume":{"post":{"operationId":"resumeCheckins","summary":"Resume calls","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/messages":{"post":{"operationId":"addMessage","summary":"Queue a spoken message","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"from_name":{"type":"string"},"deliver_on":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/parents/{parentId}/contacts":{"post":{"operationId":"addContact","summary":"Add an escalation contact","parameters":[{"name":"parentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"notify_missed":{"type":"boolean"},"notify_ok":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/alerts":{"get":{"operationId":"getRecentAlerts","summary":"Proactive events","parameters":[{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"parent_id","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}