{"openapi":"3.1.0","info":{"title":"PostMD API","description":"Markdown documents published as web pages.\n\nPublishing, reading, and changing or deleting a document that has no password need no credential. A document with a password takes it in the `X-Document-Password` header. An API key, issued from the web app and sent as `Authorization: Bearer pmk_...`, makes the documents it publishes its owner's and is needed for groups, notes and a member's own lists. Each operation below says which applies.\n\nA document code forms two addresses: `/d/{docCode}` is the viewer a person opens, `/share/{docCode}` is the address to hand out because it carries the title in link previews. Neither returns the document to a caller that does not run scripts: the viewer returns a service notice and the share address a short page holding only the title. The document itself comes from `GET /api/v1/documents/{docCode}/raw`.\n\nA document can be revised in edit mode, where the server holds a working copy that readers do not see until it is applied.\n\nThis specification covers the endpoints only. What the service can do and which page describes each thing is listed at `/llms.txt`. One capability is not an endpoint at all: a document can carry graph data inside its markdown, described at `/docs/graph`.","version":"v1"},"servers":[{"url":"https://postmd.turink.com","description":"Generated server url"}],"paths":{"/api/v1/groups":{"get":{"tags":["group-controller"],"description":"Requires API key scope `groups:read`.","operationId":"list","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListGroupItem"}}}}},"security":[{"apiKey":[]}]},"post":{"tags":["group-controller"],"description":"Requires API key scope `groups:write`.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseGroupItem"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/groups/{groupId}/update":{"post":{"tags":["group-controller"],"description":"Requires API key scope `groups:write`.","operationId":"update","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseGroupItem"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/groups/{groupId}/delete":{"post":{"tags":["group-controller"],"description":"Requires API key scope `groups:write`.","operationId":"delete","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/documents":{"post":{"tags":["document-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"upload","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"array","items":{"type":"string","format":"binary"}},"images":{"type":"array","items":{"type":"string","format":"binary"}},"title":{"type":"string"},"password":{"type":"string"},"viewerStyle":{"type":"string"},"groupId":{"type":"integer","format":"int64"}},"required":["file"]}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDocumentCode"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/update":{"post":{"tags":["document-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"update_1","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"images":{"type":"array","items":{"type":"string","format":"binary"}},"title":{"type":"string"},"password":{"type":"string"},"clearPassword":{"type":"boolean","default":false},"viewerStyle":{"type":"string"},"notesOnReplace":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDocumentCode"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/notes":{"get":{"tags":["document-note-controller"],"description":"Requires API key scope `documents:read`.","operationId":"list_1","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListNoteView"}}}}},"security":[{"apiKey":[]}]},"post":{"tags":["document-note-controller"],"description":"Requires API key scope `documents:write`.","operationId":"create_1","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteWrite"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseNoteView"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/documents/{docCode}/notes/{noteId}/update":{"post":{"tags":["document-note-controller"],"description":"Requires API key scope `documents:write`.","operationId":"update_2","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteWrite"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseNoteView"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/documents/{docCode}/notes/{noteId}/resolve":{"post":{"tags":["document-note-controller"],"description":"Requires API key scope `documents:write`.","operationId":"resolve","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteResolve"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseNoteView"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/documents/{docCode}/notes/{noteId}/delete":{"post":{"tags":["document-note-controller"],"description":"Requires API key scope `documents:write`.","operationId":"delete_1","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/documents/{docCode}/group":{"post":{"tags":["document-controller"],"description":"Requires API key scope `documents:write`.","operationId":"moveToGroup","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAssignRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/documents/{docCode}/edit/takeover":{"post":{"tags":["document-edit-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"takeover","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseTakeoverResult"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/edit/start":{"post":{"tags":["document-edit-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"start","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseStartResult"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/edit/publish":{"post":{"tags":["document-edit-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"publish","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"notesOnReplace","in":"query","required":false,"schema":{"type":"string"}},{"name":"overwriteChanged","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDocumentCode"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/edit/discard":{"post":{"tags":["document-edit-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"discard","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/edit/content":{"get":{"tags":["document-edit-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:read`.","operationId":"readContent","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/markdown;charset=UTF-8":{"schema":{"type":"string"}}}}},"security":[{},{"apiKey":[]}]},"post":{"tags":["document-edit-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"saveContent","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"images":{"type":"array","items":{"type":"string","format":"binary"}}},"required":["file"]}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseContentResult"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/delete":{"post":{"tags":["document-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:write`.","operationId":"delete_2","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/bulk":{"post":{"tags":["document-controller"],"description":"Requires API key scope `documents:write`.","operationId":"uploadBulk","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"}},"password":{"type":"string"},"viewerStyle":{"type":"string"},"groupId":{"type":"integer","format":"int64"}},"required":["files"]}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseBulkUploadResult"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/auth/withdraw":{"post":{"tags":["auth-controller"],"operationId":"withdraw","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/auth/register":{"post":{"tags":["auth-controller"],"operationId":"register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberSummary"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth-controller"],"operationId":"refresh","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseTokenResponse"}}}}}}},"/api/v1/auth/me/password":{"post":{"tags":["auth-controller"],"operationId":"changePassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/auth/me/language":{"post":{"tags":["auth-controller"],"operationId":"updateLanguage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguageRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberSummary"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/auth/logout":{"post":{"tags":["auth-controller"],"operationId":"logout","parameters":[{"name":"allDevices","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/auth/login":{"post":{"tags":["auth-controller"],"operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseLoginResponse"}}}}}}},"/api/v1/account/note-colors":{"get":{"tags":["account-note-color-controller"],"operationId":"get","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseColorLabels"}}}}},"security":[{"apiKey":[]}]},"post":{"tags":["account-note-color-controller"],"operationId":"save","requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseColorLabels"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/account/note-colors/reset":{"post":{"tags":["account-note-color-controller"],"operationId":"reset","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseColorLabels"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/account/api-keys":{"get":{"tags":["account-api-key-controller"],"operationId":"list_2","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListKeyItem"}}}}},"security":[{"apiKey":[]}]},"post":{"tags":["account-api-key-controller"],"operationId":"create_2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseCreatedKey"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/account/api-keys/{id}/revoke":{"post":{"tags":["account-api-key-controller"],"operationId":"revoke","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseVoid"}}}}},"security":[{"apiKey":[]}]}},"/uploads/{file}":{"get":{"tags":["image-controller"],"operationId":"image","parameters":[{"name":"file","in":"path","required":true,"schema":{"type":"string"}},{"name":"t","in":"query","required":false,"schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/share/{docCode}":{"get":{"tags":["share-meta-controller"],"operationId":"preview","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/html;charset=UTF-8":{"schema":{"type":"string"}}}}}}},"/llms.txt":{"get":{"tags":["public-docs-controller"],"operationId":"llmsTxt","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/docs":{"get":{"tags":["public-docs-controller"],"operationId":"index","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/docs/{slug}":{"get":{"tags":["public-docs-controller"],"operationId":"doc","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/v1/notes":{"get":{"tags":["my-note-controller"],"description":"Requires API key scope `documents:read`.","operationId":"mine","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListNoteWithDocument"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/groups/{groupId}/documents":{"get":{"tags":["group-controller"],"description":"Requires API key scope `groups:read`, `documents:read`.","operationId":"documents","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListGroupDocument"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/documents/{docCode}":{"get":{"tags":["document-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:read`.","operationId":"view","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDocumentView"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/raw":{"get":{"tags":["document-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:read`.","operationId":"raw","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/markdown;charset=UTF-8":{"schema":{"type":"string"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/meta":{"get":{"tags":["document-controller"],"description":"No credential needed. Called with an API key, the key needs scope `documents:read`.","operationId":"meta","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseDocumentMeta"}}}}},"security":[{},{"apiKey":[]}]}},"/api/v1/documents/{docCode}/edit/status":{"get":{"tags":["document-edit-controller"],"operationId":"status","parameters":[{"name":"docCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Document-Password","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Edit-Session","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseStatusResult"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth-controller"],"operationId":"me","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseMemberSummary"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/account/storage":{"get":{"tags":["account-storage-controller"],"description":"Requires API key scope `documents:read`.","operationId":"storage","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseStorageUsage"}}}}},"security":[{"apiKey":[]}]}},"/api/v1/account/api-key-scopes":{"get":{"tags":["account-api-key-controller"],"operationId":"scopeOptions","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiResponseListScopeOption"}}}}},"security":[{"apiKey":[]}]}}},"components":{"schemas":{"CreateRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":0}},"required":["name"]},"ApiResponseGroupItem":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/GroupItem"}}},"GroupItem":{"type":"object","properties":{"groupId":{"type":"integer","format":"int64"},"name":{"type":"string"},"groupCode":{"type":"string"},"owner":{"type":"boolean"},"isDefault":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"Pagination":{"type":"object","properties":{"totalItemCount":{"type":"integer","format":"int64"},"pageItemCount":{"type":"integer","format":"int32"},"pageNo":{"type":"integer","format":"int32"}}},"UpdateRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":0}}},"ApiResponseVoid":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{}}},"ApiResponseDocumentCode":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/DocumentCode"}}},"DocumentCode":{"type":"object","properties":{"docCode":{"type":"string"},"shareUrl":{"type":"string"},"viewerUrl":{"type":"string"},"anonymous":{"type":"boolean"},"retainedUntil":{"type":"string","format":"date-time"},"images":{"$ref":"#/components/schemas/Report"}}},"Replaced":{"type":"object","properties":{"path":{"type":"string"},"url":{"type":"string"}}},"Report":{"type":"object","properties":{"replaced":{"type":"array","items":{"$ref":"#/components/schemas/Replaced"}},"unmatched":{"type":"array","items":{"type":"string"}},"unused":{"type":"array","items":{"type":"string"}},"unsupported":{"type":"array","items":{"type":"string"}}}},"NoteWrite":{"type":"object","properties":{"content":{"type":"string","maxLength":4000,"minLength":0},"quotedContent":{"type":"string","maxLength":4000,"minLength":0},"scope":{"type":"string"},"color":{"type":"string"},"textStart":{"type":"integer","format":"int32"}}},"ApiResponseNoteView":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/NoteView"}}},"NoteView":{"type":"object","properties":{"noteId":{"type":"integer","format":"int64"},"noteNo":{"type":"integer","format":"int32"},"content":{"type":"string"},"quotedContent":{"type":"string"},"scope":{"type":"string"},"color":{"type":"string"},"textStart":{"type":"integer","format":"int32"},"mine":{"type":"boolean"},"manageable":{"type":"boolean"},"authorName":{"type":"string"},"resolvedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"NoteResolve":{"type":"object","properties":{"resolved":{"type":"boolean"}}},"GroupAssignRequest":{"type":"object","properties":{"groupId":{"type":"integer","format":"int64"}}},"ApiResponseTakeoverResult":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/TakeoverResult"}}},"TakeoverResult":{"type":"object","properties":{"granted":{"type":"boolean"},"waitUntil":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"editSession":{"type":"string"}}},"ApiResponseStartResult":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/StartResult"}}},"StartResult":{"type":"object","properties":{"editSession":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"hasDraft":{"type":"boolean"},"draftUpdatedAt":{"type":"string","format":"date-time"},"baseUpdatedAt":{"type":"string","format":"date-time"}}},"ApiResponseContentResult":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/ContentResult"}}},"ContentResult":{"type":"object","properties":{"draftUpdatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"images":{"$ref":"#/components/schemas/Report"}}},"ApiResponseBulkUploadResult":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/BulkUploadResult"}}},"BulkItemResult":{"type":"object","properties":{"fileName":{"type":"string"},"success":{"type":"boolean"},"docCode":{"type":"string"},"resultCode":{"type":"string"},"message":{"type":"string"}}},"BulkUploadResult":{"type":"object","properties":{"total":{"type":"integer","format":"int32"},"succeeded":{"type":"integer","format":"int32"},"results":{"type":"array","items":{"$ref":"#/components/schemas/BulkItemResult"}}}},"WithdrawRequest":{"type":"object","properties":{"password":{"type":"string","minLength":1}},"required":["password"]},"RegisterRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"password":{"type":"string","maxLength":100,"minLength":8},"name":{"type":"string","maxLength":100,"minLength":0},"language":{"type":"string"}},"required":["email","name","password"]},"ApiResponseMemberSummary":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/MemberSummary"}}},"MemberSummary":{"type":"object","properties":{"memberId":{"type":"integer","format":"int64"},"email":{"type":"string"},"name":{"type":"string"},"preferredLanguage":{"type":"string"}}},"ApiResponseTokenResponse":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/TokenResponse"}}},"TokenResponse":{"type":"object","properties":{"accessToken":{"type":"string"},"accessTokenExpiresIn":{"type":"integer","format":"int64"}}},"ChangePasswordRequest":{"type":"object","properties":{"currentPassword":{"type":"string","minLength":1},"newPassword":{"type":"string","maxLength":100,"minLength":8}},"required":["currentPassword","newPassword"]},"LanguageRequest":{"type":"object","properties":{"language":{"type":"string","minLength":1}},"required":["language"]},"LoginRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"password":{"type":"string","minLength":1},"trustThisDevice":{"type":"boolean"}},"required":["email","password"]},"ApiResponseLoginResponse":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/LoginResponse"}}},"LoginResponse":{"type":"object","properties":{"accessToken":{"type":"string"},"accessTokenExpiresIn":{"type":"integer","format":"int64"},"member":{"$ref":"#/components/schemas/MemberSummary"}}},"ApiResponseColorLabels":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/ColorLabels"}}},"ColorLabels":{"type":"object","properties":{"colors":{"type":"array","items":{"type":"string"}},"labels":{"type":"object","additionalProperties":{"type":"string"}}}},"ApiResponseCreatedKey":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/CreatedKey"}}},"CreatedKey":{"type":"object","properties":{"apiKey":{"type":"string"},"info":{"$ref":"#/components/schemas/KeyItem"}}},"KeyItem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"keyPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expireDate":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXPIRED","REVOKED"]},"createdAt":{"type":"string","format":"date-time"}}},"ApiResponseListNoteWithDocument":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NoteWithDocument"}}}},"NoteWithDocument":{"type":"object","properties":{"note":{"$ref":"#/components/schemas/NoteView"},"docCode":{"type":"string"},"documentTitle":{"type":"string"}}},"ApiResponseListGroupItem":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupItem"}}}},"ApiResponseListGroupDocument":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupDocument"}}}},"GroupDocument":{"type":"object","properties":{"docCode":{"type":"string"},"title":{"type":"string"},"fileName":{"type":"string"},"owner":{"type":"boolean"},"hasPassword":{"type":"boolean"},"viewerStyle":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"anchoredNoteCount":{"type":"integer","format":"int32"}}},"ApiResponseDocumentView":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/DocumentView"}}},"DocumentView":{"type":"object","properties":{"docCode":{"type":"string"},"title":{"type":"string"},"fileName":{"type":"string"},"hasPassword":{"type":"boolean"},"viewerStyle":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"notesAllowed":{"type":"boolean"},"owner":{"type":"boolean"},"content":{"type":"string"},"imageToken":{"type":"string"}}},"ApiResponseListNoteView":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NoteView"}}}},"ApiResponseDocumentMeta":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/DocumentMeta"}}},"DocumentMeta":{"type":"object","properties":{"docCode":{"type":"string"},"title":{"type":"string"},"fileName":{"type":"string"},"hasPassword":{"type":"boolean"},"viewerStyle":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ApiResponseStatusResult":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/StatusResult"}}},"StatusResult":{"type":"object","properties":{"editing":{"type":"boolean"},"mine":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"},"takeoverRequested":{"type":"boolean"},"draftUpdatedAt":{"type":"string","format":"date-time"}}},"ApiResponseStorageUsage":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"$ref":"#/components/schemas/StorageUsage"}}},"StorageUsage":{"type":"object","properties":{"usedBytes":{"type":"integer","format":"int64"},"quotaBytes":{"type":"integer","format":"int64"}}},"ApiResponseListKeyItem":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/KeyItem"}}}},"ApiResponseListScopeOption":{"type":"object","properties":{"resultCode":{"type":"string"},"message":{"type":"string"},"pagination":{"$ref":"#/components/schemas/Pagination"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ScopeOption"}}}},"ScopeOption":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}}}},"securitySchemes":{"apiKey":{"type":"http","description":"API key issued from the web app. The value starts with `pmk_` and is shown once at creation.\n\nScopes are independent: `documents:write` does not grant `documents:read`.","scheme":"bearer"}}}}