{"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"dn_live_...","description":"A personal API key. Each operation needs one scope, listed with it."}},"parameters":{"id":{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]}},"limit":{"name":"limit","in":"query","description":"How many items to return.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},"offset":{"name":"offset","in":"query","description":"How many items to skip.","schema":{"type":"integer","minimum":0,"default":0}}},"responses":{"BadRequest":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_REQUEST","message":"Note title is required"},"requestId":"6f1c2a9e4b7d"}}}},"Unauthorized":{"description":"The API key is missing, wrong, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHORIZED","message":"A valid DeNotes credential is required"},"requestId":"6f1c2a9e4b7d"}}}},"Forbidden":{"description":"The API key does not have the scope this needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INSUFFICIENT_SCOPE","message":"This operation requires notes:write"},"requestId":"6f1c2a9e4b7d"}}}},"NotFound":{"description":"Not found, or in the Private Vault.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"Note not found"},"requestId":"6f1c2a9e4b7d"}}}},"Conflict":{"description":"Google Drive is not connected, needs reconnecting, or the note is only on a device.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"CONFLICT","message":"Google Drive is not connected"},"requestId":"6f1c2a9e4b7d"}}}},"RateLimited":{"description":"Too many requests. Wait for the seconds in Retry-After.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"Too many requests"}}}}}},"schemas":{"Folder":{"type":"object","required":["id","name","parentId","favorite","archived","order","goalId","phaseId","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"name":{"type":"string","examples":["Work"]},"parentId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"The folder this one sits in. null at the top level."},"favorite":{"type":"boolean"},"archived":{"type":"boolean"},"order":{"type":"integer","description":"Position among its siblings."},"goalId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"File":{"type":"object","description":"A file groups notes.","required":["id","name","folderId","favorite","archived","order","goalId","phaseId","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"name":{"type":"string","examples":["Meeting notes"]},"folderId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"The folder it sits in. null at the top level."},"favorite":{"type":"boolean"},"archived":{"type":"boolean"},"order":{"type":"integer"},"goalId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Note":{"type":"object","description":"A note without its body. Lists and writes return this.","required":["id","title","fileId","goalId","phaseId","tags","favorite","archived","pinned","order","contentAvailable","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"title":{"type":"string","examples":["Weekly review"]},"fileId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"The file it belongs to. null when it is not in a file."},"goalId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"examples":[["work","ideas"]]},"favorite":{"type":"boolean"},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"order":{"type":"integer"},"contentAvailable":{"type":"boolean","description":"false when the body is kept only on a device and the API cannot read it."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"NoteWithContent":{"type":"object","description":"A note with its Markdown body.","required":["id","title","fileId","goalId","phaseId","tags","favorite","archived","pinned","order","contentAvailable","createdAt","updatedAt","content"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"title":{"type":"string","examples":["Weekly review"]},"fileId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"The file it belongs to. null when it is not in a file."},"goalId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"examples":[["work","ideas"]]},"favorite":{"type":"boolean"},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"order":{"type":"integer"},"contentAvailable":{"type":"boolean","description":"false when the body is kept only on a device and the API cannot read it."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"content":{"type":"string","description":"The Markdown body. Empty when it cannot be read.","examples":["# Weekly review\n\n- Ship the docs"]}}},"Progress":{"type":"object","description":"Worked out from the goal's items.","required":["completed","total","percent"],"properties":{"completed":{"type":"integer"},"total":{"type":"integer"},"percent":{"type":"integer","minimum":0,"maximum":100}}},"Goal":{"type":"object","required":["id","title","description","startDate","endDate","status","color","icon","order","createdAt","updatedAt","progress"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"title":{"type":"string","examples":["Run a marathon"]},"description":{"type":"string"},"startDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"status":{"type":"string","enum":["active","completed","archived"]},"color":{"type":"string","description":"A hex colour.","examples":["#1a8cd8"]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"progress":{"$ref":"#/components/schemas/Progress"}}},"Phase":{"type":"object","description":"A stage inside a goal.","required":["id","goalId","title","description","startDate","endDate","order","status","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"goalId":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"title":{"type":"string","examples":["Base training"]},"description":{"type":"string"},"startDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"order":{"type":"integer"},"status":{"type":"string","enum":["upcoming","active","completed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"GoalItem":{"type":"object","description":"A task on a goal.","required":["id","goalId","phaseId","title","description","status","order","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"goalId":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"null when the item sits on the goal itself."},"title":{"type":"string","examples":["Buy running shoes"]},"description":{"type":"string"},"status":{"type":"string","enum":["todo","ongoing","completed"]},"order":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SearchResult":{"type":"object","required":["id","title","fileId","folderId","snippet","updatedAt"],"properties":{"id":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"title":{"type":"string"},"fileId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"folderId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"snippet":{"type":"string","description":"The start of the note as plain text, up to 220 characters."},"updatedAt":{"type":"string","format":"date-time"}}},"Pagination":{"type":"object","required":["limit","offset","total","nextOffset"],"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer","description":"How many items match, across all pages."},"nextOffset":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Pass this as offset to get the next page. null on the last page."}}},"FolderList":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"FileList":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"NoteList":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Note"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"SearchResultList":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"GoalList":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Goal"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PhaseList":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Phase"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"GoalItemList":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GoalItem"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","examples":["NOT_FOUND"]},"message":{"type":"string","examples":["Note not found"]}}},"requestId":{"type":"string","description":"Quote this if you contact us about a failed request."}}},"FolderCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"examples":["Work"]},"parentId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"Put the folder inside this one. Leave out or null for the top level."}},"additionalProperties":false},"FileCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"examples":["Meeting notes"]},"folderId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"Leave out or null for the top level."}},"additionalProperties":false},"NoteCreate":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"examples":["Weekly review"]},"content":{"type":"string","description":"The Markdown body.","examples":["- Ship the docs"]},"tags":{"type":"array","items":{"type":"string"}},"fileId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"goalId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"Needs goalId as well."}},"additionalProperties":false},"NoteUpdate":{"type":"object","description":"Send only the fields you want to change.","properties":{"title":{"type":"string","minLength":1},"content":{"type":"string","description":"Replaces the whole body."},"tags":{"type":"array","items":{"type":"string"},"description":"Replaces all tags."},"favorite":{"type":"boolean"},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"fileId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"null takes the note out of its file."},"goalId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}]}},"additionalProperties":false},"GoalCreate":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"examples":["Run a marathon"]},"description":{"type":"string"},"startDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"color":{"type":"string","description":"A hex colour.","examples":["#1a8cd8"],"default":"#1a8cd8"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"GoalUpdate":{"type":"object","description":"Send only the fields you want to change.","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"startDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"status":{"type":"string","enum":["active","completed","archived"]},"color":{"type":"string","description":"A hex colour.","examples":["#1a8cd8"]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"PhaseCreate":{"type":"object","required":["goalId","title"],"properties":{"goalId":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"title":{"type":"string","minLength":1,"examples":["Base training"]},"description":{"type":"string"},"startDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"status":{"type":"string","enum":["upcoming","active","completed"],"default":"upcoming"}},"additionalProperties":false},"PhaseUpdate":{"type":"object","description":"Send only the fields you want to change.","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"startDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date","description":"A calendar day, YYYY-MM-DD.","examples":["2026-12-31"]},{"type":"null"}]},"status":{"type":"string","enum":["upcoming","active","completed"]}},"additionalProperties":false},"GoalItemCreate":{"type":"object","required":["goalId","title"],"properties":{"goalId":{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"A phase of the same goal. Leave out to put the item on the goal itself."},"title":{"type":"string","minLength":1,"examples":["Buy running shoes"]},"description":{"type":"string"},"status":{"type":"string","enum":["todo","ongoing","completed"],"default":"todo"}},"additionalProperties":false},"GoalItemUpdate":{"type":"object","description":"Send only the fields you want to change.","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"status":{"type":"string","enum":["todo","ongoing","completed"]},"phaseId":{"anyOf":[{"type":"string","description":"A 21 character id.","examples":["V1StGXR8_Z5jdHi6B-myT"]},{"type":"null"}],"description":"Move the item to another phase of the same goal, or null to put it on the goal itself."}},"additionalProperties":false}}},"info":{"title":"DeNotes API","version":"1.0.0","description":"Read and write your DeNotes folders, files, notes and goals.\n\nEvery request needs an API key, sent as `Authorization: Bearer \u003ckey\u003e`. Create one in the app under Settings, Developer API.\n\nGuides: https://denotes.space/docs"},"openapi":"3.1.0","paths":{"/folders":{"get":{"operationId":"listFolders","summary":"List folders","tags":["Folders"],"security":[{"apiKey":["folders:read"]}],"x-scope":"folders:read","parameters":[{"name":"parentId","in":"query","required":false,"description":"Only folders inside this folder. Use `root` for top-level folders. Leave out for all folders.","schema":{"type":"string"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createFolder","summary":"Create a folder","tags":["Folders"],"security":[{"apiKey":["folders:write"]}],"x-scope":"folders:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/folders/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"getFolder","summary":"Get a folder","tags":["Folders"],"security":[{"apiKey":["folders:read"]}],"x-scope":"folders:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/files":{"get":{"operationId":"listFiles","summary":"List files","tags":["Files"],"security":[{"apiKey":["files:read"]}],"x-scope":"files:read","parameters":[{"name":"folderId","in":"query","required":false,"description":"Only files in this folder. Use `root` for top-level files. Leave out for all files.","schema":{"type":"string"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createFile","summary":"Create a file","tags":["Files"],"security":[{"apiKey":["files:write"]}],"x-scope":"files:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/files/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"getFile","summary":"Get a file","tags":["Files"],"security":[{"apiKey":["files:read"]}],"x-scope":"files:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/notes":{"get":{"operationId":"listNotes","summary":"List notes","description":"Newest changes first. Bodies are not included; get a note to read its body.","tags":["Notes"],"security":[{"apiKey":["notes:read"]}],"x-scope":"notes:read","parameters":[{"name":"fileId","in":"query","required":false,"description":"Only notes in this file. Use `root` for notes not in a file. Leave out for all notes.","schema":{"type":"string"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createNote","summary":"Create a note","description":"The body is saved to your Google Drive, so Drive must be connected.","tags":["Notes"],"security":[{"apiKey":["notes:write"]}],"x-scope":"notes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/notes/search":{"get":{"operationId":"searchNotes","summary":"Search notes","description":"Matches titles and tags, then the text of your most recent notes. Title and tag matches come first. Archived notes are left out.","tags":["Notes"],"security":[{"apiKey":["notes:read"]}],"x-scope":"notes:read","parameters":[{"name":"query","in":"query","required":true,"description":"What to look for. `q` also works.","schema":{"type":"string","minLength":1},"example":"roadmap"},{"name":"limit","in":"query","description":"How many results to return.","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/notes/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"getNote","summary":"Get a note","description":"Returns the note with its Markdown body.","tags":["Notes"],"security":[{"apiKey":["notes:read"]}],"x-scope":"notes:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteWithContent"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateNote","summary":"Update a note","description":"Only the fields you send change. Send null for fileId, goalId or phaseId to clear it.","tags":["Notes"],"security":[{"apiKey":["notes:write"]}],"x-scope":"notes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/goals":{"get":{"operationId":"listGoals","summary":"List goals","description":"Newest changes first, each with its progress.","tags":["Goals"],"security":[{"apiKey":["goals:read"]}],"x-scope":"goals:read","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createGoal","summary":"Create a goal","tags":["Goals"],"security":[{"apiKey":["goals:write"]}],"x-scope":"goals:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/goals/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"getGoal","summary":"Get a goal","tags":["Goals"],"security":[{"apiKey":["goals:read"]}],"x-scope":"goals:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateGoal","summary":"Update a goal","description":"Only the fields you send change.","tags":["Goals"],"security":[{"apiKey":["goals:write"]}],"x-scope":"goals:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/phases":{"get":{"operationId":"listPhases","summary":"List phases","tags":["Phases"],"security":[{"apiKey":["phases:read"]}],"x-scope":"phases:read","parameters":[{"name":"goalId","in":"query","required":false,"description":"Only phases of this goal.","schema":{"type":"string"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createPhase","summary":"Create a phase","tags":["Phases"],"security":[{"apiKey":["phases:write"]}],"x-scope":"phases:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phase"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/phases/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"getPhase","summary":"Get a phase","tags":["Phases"],"security":[{"apiKey":["phases:read"]}],"x-scope":"phases:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phase"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updatePhase","summary":"Update a phase","description":"Only the fields you send change.","tags":["Phases"],"security":[{"apiKey":["phases:write"]}],"x-scope":"phases:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Phase"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/goal-items":{"get":{"operationId":"listGoalItems","summary":"List goal items","tags":["Goal items"],"security":[{"apiKey":["items:read"]}],"x-scope":"items:read","parameters":[{"name":"goalId","in":"query","required":false,"description":"Only items of this goal.","schema":{"type":"string"}},{"name":"phaseId","in":"query","required":false,"description":"Only items in this phase. Use `root` for items on the goal itself.","schema":{"type":"string"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalItemList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createGoalItem","summary":"Create a goal item","tags":["Goal items"],"security":[{"apiKey":["items:write"]}],"x-scope":"items:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalItemCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalItem"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/goal-items/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"getGoalItem","summary":"Get a goal item","tags":["Goal items"],"security":[{"apiKey":["items:read"]}],"x-scope":"items:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalItem"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateGoalItem","summary":"Update a goal item","description":"Only the fields you send change.","tags":["Goal items"],"security":[{"apiKey":["items:write"]}],"x-scope":"items:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalItemUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalItem"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"security":[{"apiKey":[]}],"servers":[{"url":"https://beta.api.denotes.space/v1"}],"tags":[{"name":"Folders","description":"Folders hold files and other folders."},{"name":"Files","description":"Files group notes."},{"name":"Notes","description":"Markdown notes. Bodies live in your Google Drive."},{"name":"Goals","description":"Goals, with progress worked out from their items."},{"name":"Phases","description":"Stages inside a goal."},{"name":"Goal items","description":"Tasks on a goal or in one of its phases."}]}