{"openapi":"3.1.0","info":{"title":"dazie API","version":"1.0.0","summary":"Read and write a dazie user's journal, to-dos and companion memories.","description":"dazie is a voice-first journaling companion. Every request acts as one signed-in user and sees only their data. Get a token with `npx dazie login`, or run the OAuth 2.1 flow described at /.well-known/oauth-protected-resource. The same operations are available as MCP tools at /mcp.","contact":{"url":"https://docs.dazie.io"}},"servers":[{"url":"https://api.dazie.io/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Account"},{"name":"Journal"},{"name":"To-dos"},{"name":"Memories"},{"name":"Calls"}],"paths":{"/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"The signed-in user","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/journal-entries":{"get":{"operationId":"listJournalEntries","tags":["Journal"],"summary":"List journal entries, newest first","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"since","in":"query","description":"Only entries created on or after this date","schema":{"type":"string","format":"date","example":"2026-10-29"}},{"name":"query","in":"query","description":"Only entries whose title, text, summary, tags or insights mention this, case-insensitive","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["total","entries"],"properties":{"total":{"type":"integer"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/JournalEntrySummary"}}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"operationId":"createJournalEntry","tags":["Journal"],"summary":"Write a journal entry in the user's own words","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewJournalEntry"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntrySummary"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/OnboardingRequired"}}}},"/journal-entries/{id}":{"get":{"operationId":"getJournalEntry","tags":["Journal"],"summary":"Read one journal entry in full","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"include_transcript","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/todos":{"get":{"operationId":"listTodos","tags":["To-dos"],"summary":"List to-dos","parameters":[{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/TodoStatus"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Todo"}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"operationId":"addTodo","tags":["To-dos"],"summary":"Add a to-do","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"dueDate":{"type":"string","format":"date","example":"2026-10-29"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Todo"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/todos/{id}":{"patch":{"operationId":"updateTodo","tags":["To-dos"],"summary":"Complete, drop, reopen or edit a to-do","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"status":{"$ref":"#/components/schemas/TodoStatus"},"text":{"type":"string","minLength":1,"maxLength":2000},"dueDate":{"type":["string","null"],"format":"date","example":"2026-10-29"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Todo"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/memories":{"get":{"operationId":"listMemories","tags":["Memories"],"summary":"What the companion remembers about the user","parameters":[{"name":"type","in":"query","schema":{"$ref":"#/components/schemas/MemoryType"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Memory"}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"operationId":"addMemory","tags":["Memories"],"summary":"Tell the companion something to remember","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","content"],"properties":{"type":{"$ref":"#/components/schemas/MemoryType"},"content":{"type":"string","minLength":1,"maxLength":20000},"importance":{"type":"string","enum":["high","medium","low"],"default":"medium"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memory"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/OnboardingRequired"}}}},"/schedules":{"get":{"operationId":"getCallSchedule","tags":["Calls"],"summary":"When dazie is set to call the user","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CallSchedule"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A dazie access token from `dazie login` or the OAuth 2.1 flow."}},"responses":{"InvalidRequest":{"description":"The request did not validate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid or expired access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not found, or not this user's","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"OnboardingRequired":{"description":"The user has not finished onboarding at app.dazie.io","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","not_found","onboarding_required","internal_error"]},"message":{"type":"string"}}}}},"Me":{"type":"object","required":["id","email","onboarded"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":["string","null"]},"timezone":{"type":["string","null"]},"onboarded":{"type":"boolean"},"companion":{"type":["object","null"],"properties":{"name":{"type":"string"}}}}},"JournalEntrySummary":{"type":"object","required":["id","title","createdAt","tags","fromCall"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"mood":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":["string","null"]},"fromCall":{"type":"boolean"}}},"JournalEntry":{"type":"object","required":["id","title","content","createdAt"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"content":{"type":"string"},"summary":{"type":["string","null"]},"mood":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}},"insights":{},"callLogId":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"},"transcript":{"type":["string","null"],"description":"Only with include_transcript=true"}}},"NewJournalEntry":{"type":"object","required":["title","content"],"properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":1,"maxLength":20000},"mood":{"type":"string","maxLength":50},"tags":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":50}}}},"TodoStatus":{"type":"string","enum":["open","done","dropped"]},"Todo":{"type":"object","required":["id","text","status"],"properties":{"id":{"type":"integer"},"text":{"type":"string"},"status":{"$ref":"#/components/schemas/TodoStatus"},"dueDate":{"type":["string","null"],"format":"date"},"sourceCallId":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"}}},"MemoryType":{"type":"string","enum":["emotional_state","goals","relationships","insights","patterns","preferences"]},"Memory":{"type":"object","required":["id","type","content"],"properties":{"id":{"type":"integer"},"type":{"$ref":"#/components/schemas/MemoryType"},"content":{"type":"string"},"importance":{"type":["string","null"]},"lastReferenced":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"CallSchedule":{"type":"object","required":["id","timeOfDay","daysOfWeek","active"],"properties":{"id":{"type":"integer"},"timeOfDay":{"type":"string","example":"20:00"},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"0 = Sunday"},"active":{"type":"boolean"}}}}}}