{"openapi":"3.1.0","info":{"title":"Ahya API","description":"Each tenant route uses the workspace in its URL. For example, a member of the fictional Northwind Studio can read only its permitted documents while that workspace is selected. Space and document ACLs apply to workspace owners and admins as well as members. The service resolves current membership before applying the operation’s role and token scope requirements. A foreign resource ID and an unknown ID have the same result.\n\nFor browser writes, send the installation’s exact Origin. Supply JSON bodies as application/json. A workspace-bound PAT or OAuth access token travels in Authorization: Bearer. Request the absolute /api/v1 resource in the OAuth authorization flow. Refresh preserves the workspace selected during consent.\n\nDiscover the [OAuth authorization server](/.well-known/oauth-authorization-server/api/auth) and [REST resource metadata](/.well-known/oauth-protected-resource/api/v1). For MCP tool discovery, initialize a client at the [MCP endpoint](/mcp) with its own resource-bound credential and call tools/list.\n\n## Versioning and deprecation\n\nStable REST endpoints use major-version paths beginning with `/api/v1`. Breaking contract changes require a new major path prefix (`/api/v2`). Any deprecated endpoint announces its status via RFC 9745 `Deprecation` and `Sunset` response headers alongside release notes.\n\n## Rate limits\n\nEach service instance enforces 1,200 requests per minute per transport peer at ingress and 240 requests per minute per authenticated user across REST and MCP. Responses include IETF `RateLimit-Policy` and `RateLimit` headers; throttled `429` responses also include `Retry-After`.\n\n## Error model\n\nAll REST errors return `application/json` with `{ \"error\": { \"code\", \"message\", \"hint?\", \"details?\" } }`.","version":"1.0.0"},"externalDocs":{"description":"Interactive API reference and agent integration guide","url":"https://ahya.wild.as/api/docs"},"servers":[{"url":"https://ahya.wild.as","description":"Configured Ahya origin"},{"url":"/","description":"Relative to current origin"}],"tags":[{"name":"Workspaces","description":"Workspace tenancy, membership, invitations, and DNS domain claims."},{"name":"Spaces","description":"Knowledge spaces, document trees, gallery previews, and Markdown ZIP exports."},{"name":"Documents","description":"Document CRUD, outlines, surgical patching, moves, and knowledge graph links."},{"name":"Versions","description":"Immutable document snapshots, diffs, and non-destructive restores."},{"name":"Comments","description":"Block-anchored discussions, replies, reactions, and resolution."},{"name":"Search","description":"Permission-filtered hybrid pgvector semantic and keyword search."},{"name":"Groups","description":"Workspace member directory and ACL group administration."},{"name":"Sharing","description":"Hierarchical access control entries on spaces and documents."},{"name":"Identity and tokens","description":"Active caller principal and workspace-bound personal access tokens."},{"name":"Integrations","description":"Link preview unfurling and signed outbound webhook deliveries."},{"name":"Events","description":"Permission-filtered workspace Server-Sent Events stream."}],"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Interactive sign-in cookie, prefixed __Secure- on HTTPS. Browser writes require the exact installation Origin."},"personalAccessToken":{"type":"http","scheme":"bearer","description":"Personal access token bound to one workspace and its issuing member."},"oauth":{"type":"oauth2","description":"Delegated workspace credential with the REST resource audience. Use authorization code with S256 PKCE.","flows":{"authorizationCode":{"authorizationUrl":"/api/auth/oauth2/authorize","tokenUrl":"/api/auth/oauth2/token","refreshUrl":"/api/auth/oauth2/token","scopes":{"docs:read":"Read documents you can access","docs:write":"Read and edit documents you can edit","admin":"Read the workspace member directory and use your administrative permissions","offline_access":"Request a refresh token."}}}}},"responses":{"Error400":{"description":"Invalid request parameters, media type or JSON body.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error401":{"description":"Authentication required or credential invalid.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error403":{"description":"Insufficient authority or untrusted browser Origin.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error404":{"description":"Resource unavailable to this caller, including unknown and foreign IDs.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error409":{"description":"The operation conflicts with the current state.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error413":{"description":"Request or export exceeds the size limit.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error422":{"description":"Snapshots exceed the comparison limits.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error429":{"description":"Request rate limit reached. Retry after the indicated interval.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds until the rate limit resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Error503":{"description":"The delivery queue is unavailable.","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"schemas":{"ApiError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Document":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"openingParagraph":{"type":["string","null"]},"icon":{"type":["string","null"]},"position":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"inheritParent":{"type":"boolean"},"contentMd":{"type":"string"},"contentJson":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","workspaceId","spaceId","parentId","title","openingParagraph","icon","position","inheritParent","contentMd","contentJson","version","archivedAt","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false}}},"paths":{"/api/v1/workspaces":{"get":{"operationId":"listWorkspaces","tags":["Workspaces"],"summary":"List your workspaces","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required.","responses":{"200":{"description":"List your workspaces","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","owner"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]}},"required":["id","name","role","coverKey"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}},"post":{"operationId":"createWorkspace","tags":["Workspaces"],"summary":"Create a workspace","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required. The creator becomes its sole owner.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]},"example":{"name":"Northwind Studio"}}}},"responses":{"201":{"description":"Create a workspace","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","owner"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]}},"required":["id","name","role","coverKey"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/api/v1/invitations/{token}/accept":{"post":{"operationId":"acceptWorkspaceInvitation","tags":["Workspaces"],"summary":"Accept a workspace invitation","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required. Requires the recipient’s verified email and an unused, unexpired invitation.","responses":{"200":{"description":"Accept a workspace invitation","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","owner"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]}},"required":["id","name","role","coverKey"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"token","required":true,"description":"Single-use invitation token."}]}},"/api/v1/workspaces/{workspaceId}":{"get":{"operationId":"getWorkspace","tags":["Workspaces"],"summary":"Get the active workspace","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"Get the active workspace","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","owner"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]}},"required":["id","name","role","coverKey"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]},"patch":{"operationId":"updateWorkspace","tags":["Workspaces"],"summary":"Update the workspace name or cover","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin. Supply one or both properties. Set coverKey to null to remove the cover.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]}},"additionalProperties":false,"minProperties":1}}}},"responses":{"200":{"description":"Update the workspace name or cover","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role":{"type":"string","enum":["member","admin","owner"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]}},"required":["id","name","role","coverKey"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]},"delete":{"operationId":"deleteWorkspace","tags":["Workspaces"],"summary":"Permanently delete the workspace","security":[{"sessionCookie":[]}],"description":"The current workspace owner’s browser session is required. Confirm by supplying the current workspace name.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Permanently delete the workspace","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/members":{"get":{"operationId":"listWorkspaceMembers","tags":["Workspaces"],"summary":"List workspace members","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace member. The directory includes member emails and roles. The credential must have one of admin.","responses":{"200":{"description":"List workspace members","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"type":["string","null"]},"role":{"type":"string","enum":["member","admin","owner"]}},"required":["userId","name","email","image","role"],"additionalProperties":false}}},"required":["members"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/members/{userId}":{"patch":{"operationId":"changeWorkspaceMemberRole","tags":["Workspaces"],"summary":"Change a member’s role","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace owner. The credential must have one of admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["member","admin"]}},"required":["role"]}}}},"responses":{"200":{"description":"Change a member’s role","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true,"description":"Account ID of the workspace member."}]},"delete":{"operationId":"removeWorkspaceMember","tags":["Workspaces"],"summary":"Remove a workspace member","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin. Only the owner may remove an admin. Use the leave operation for your own membership.","responses":{"200":{"description":"Remove a workspace member","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true,"description":"Account ID of the workspace member."}]}},"/api/v1/workspaces/{workspaceId}/leave":{"post":{"operationId":"leaveWorkspace","tags":["Workspaces"],"summary":"Leave the workspace","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace member or admin. The owner must transfer ownership first. The credential must have one of admin.","responses":{"200":{"description":"Leave the workspace","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/transfer":{"post":{"operationId":"transferWorkspaceOwnership","tags":["Workspaces"],"summary":"Transfer ownership","security":[{"sessionCookie":[]}],"description":"The current workspace owner’s browser session is required. The recipient must be an existing member. Supply the current workspace name.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"userId":{"type":"string","minLength":1}},"required":["name","userId"]}}}},"responses":{"200":{"description":"Transfer ownership","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/invitations":{"get":{"operationId":"listWorkspaceInvitations","tags":["Workspaces"],"summary":"List outstanding invitations","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","responses":{"200":{"description":"List outstanding invitations","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","email","expiresAt"],"additionalProperties":false}}},"required":["invitations"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]},"post":{"operationId":"inviteWorkspaceMember","tags":["Workspaces"],"summary":"Invite a member by verified email","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin. The single-use token expires after seven days.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"]},"example":{"email":"mira@example.test"}}}},"responses":{"201":{"description":"Invite a member by verified email","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","email","expiresAt"],"additionalProperties":false},"token":{"type":"string"}},"required":["invitation","token"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/invitations/{id}":{"delete":{"operationId":"revokeWorkspaceInvitation","tags":["Workspaces"],"summary":"Revoke an invitation","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","responses":{"200":{"description":"Revoke an invitation","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/domains":{"get":{"operationId":"listWorkspaceDomains","tags":["Workspaces"],"summary":"List workspace DNS claims","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","responses":{"200":{"description":"List workspace DNS claims","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"txtName":{"type":"string"},"txtValue":{"type":"string"},"challengeExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verifiedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verified":{"type":"boolean"},"autoJoin":{"type":"boolean"}},"required":["id","domain","txtName","txtValue","challengeExpiresAt","verifiedUntil","verified","autoJoin"],"additionalProperties":false}}},"required":["domains"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]},"post":{"operationId":"claimWorkspaceDomain","tags":["Workspaces"],"summary":"Request a DNS TXT challenge for verification or renewal","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace owner. The credential must have one of admin. Issuing a challenge replaces the previous challenge for this workspace and domain. Publish the new TXT value within 24 hours. Current verification remains valid until its expiry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$"}},"required":["domain"]}}}},"responses":{"201":{"description":"Request a DNS TXT challenge for verification or renewal","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"txtName":{"type":"string"},"txtValue":{"type":"string"},"challengeExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verifiedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verified":{"type":"boolean"},"autoJoin":{"type":"boolean"}},"required":["id","domain","txtName","txtValue","challengeExpiresAt","verifiedUntil","verified","autoJoin"],"additionalProperties":false}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/domains/{id}/verify":{"post":{"operationId":"verifyWorkspaceDomain","tags":["Workspaces"],"summary":"Verify an exact domain claim","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace owner. The credential must have one of admin. Publish the current TXT challenge before verification. Successful verification consumes the challenge and permits auto-join for 30 days when enabled. Request a new challenge to renew.","responses":{"200":{"description":"Verify an exact domain claim","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"txtName":{"type":"string"},"txtValue":{"type":"string"},"challengeExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verifiedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verified":{"type":"boolean"},"autoJoin":{"type":"boolean"}},"required":["id","domain","txtName","txtValue","challengeExpiresAt","verifiedUntil","verified","autoJoin"],"additionalProperties":false}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/domains/{id}":{"patch":{"operationId":"setWorkspaceDomainAutoJoin","tags":["Workspaces"],"summary":"Change automatic membership for a verified domain","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoJoin":{"type":"boolean"}},"required":["autoJoin"]}}}},"responses":{"200":{"description":"Change automatic membership for a verified domain","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"domain":{"type":"string"},"txtName":{"type":"string"},"txtValue":{"type":"string"},"challengeExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verifiedUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"verified":{"type":"boolean"},"autoJoin":{"type":"boolean"}},"required":["id","domain","txtName","txtValue","challengeExpiresAt","verifiedUntil","verified","autoJoin"],"additionalProperties":false}},"required":["domain"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"releaseWorkspaceDomain","tags":["Workspaces"],"summary":"Release a domain claim","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace owner. The credential must have one of admin.","responses":{"200":{"description":"Release a domain claim","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/me":{"get":{"operationId":"getCurrentPrincipal","tags":["Identity and tokens"],"summary":"Get the active principal","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"Get the active principal","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"principal":{"type":"object","properties":{"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"membershipId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceRole":{"type":"string","enum":["member","admin","owner"]},"isInstanceOperator":{"type":"boolean"},"userId":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"isOrgAdmin":{"type":"boolean"},"groupIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"authMethod":{"type":"string","enum":["session","pat","oauth"]},"channel":{"type":"string","enum":["rest","mcp","collab"]},"scopes":{"type":"array","items":{"anyOf":[{"type":"string","enum":["docs:read","docs:write","admin"]},{"type":"string","const":"*"}]}}},"required":["workspaceId","membershipId","workspaceRole","isInstanceOperator","userId","name","email","isOrgAdmin","groupIds","authMethod","scopes"],"additionalProperties":false}},"required":["principal"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/tokens":{"get":{"operationId":"listApiTokens","tags":["Identity and tokens"],"summary":"List your workspace tokens","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required.","responses":{"200":{"description":"List your workspace tokens","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"tokenPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["docs:read","docs:write","admin"]}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","name","tokenPrefix","scopes","expiresAt","createdAt","lastUsedAt","revokedAt"],"additionalProperties":false}}},"required":["tokens"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]},"post":{"operationId":"createApiToken","tags":["Identity and tokens"],"summary":"Create a workspace token","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required. The response includes the secret once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"default":["docs:read"],"minItems":1,"type":"array","items":{"type":"string","enum":["docs:read","docs:write","admin"]}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"201":{"description":"Create a workspace token","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"tokenPrefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["docs:read","docs:write","admin"]}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"token":{"type":"string"}},"required":["id","name","tokenPrefix","scopes","expiresAt","createdAt","token"],"additionalProperties":false}},"required":["token"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/tokens/{id}":{"delete":{"operationId":"revokeApiToken","tags":["Identity and tokens"],"summary":"Revoke your workspace token","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required.","responses":{"200":{"description":"Revoke your workspace token","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean","const":true}},"required":["revoked"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/avatars":{"post":{"operationId":"uploadAccountAvatar","tags":["Account avatars"],"summary":"Upload your avatar","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","maxLength":1400000}},"required":["image"]}}}},"responses":{"200":{"description":"Upload your avatar","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string"}},"required":["image"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/avatars/{avatarId}":{"get":{"operationId":"getAccountAvatar","tags":["Account avatars"],"summary":"Read a workspace member avatar","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required.","responses":{"200":{"description":"Read a workspace member avatar","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"image/webp":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"avatarId","required":true}]}},"/api/v1/workspaces/{workspaceId}/unfurl":{"post":{"operationId":"unfurlLink","tags":["Integrations"],"summary":"Preview a supported public link","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048}},"required":["url"]}}}},"responses":{"200":{"description":"Preview a supported public link","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"object","properties":{"provider":{"type":"string","enum":["figma","github","google"]},"kind":{"type":"string"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"frameUrl":{"type":"string","format":"uri"}},"required":["provider","kind","url","title"],"additionalProperties":false}},"required":["preview"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/webhooks":{"get":{"operationId":"listWebhooks","tags":["Integrations"],"summary":"List webhooks","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Workspace admin or owner for workspace-wide hooks. Space admin for a space hook. The credential must have one of admin. Omit spaceId for workspace-wide webhooks.","parameters":[{"in":"query","name":"spaceId","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}],"responses":{"200":{"description":"List webhooks","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"spaceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"enabled":{"type":"boolean"},"events":{"type":"array","items":{"type":"string","enum":["doc.created","doc.updated","doc.archived","doc.moved","acl.updated","comment.created","comment.resolved","comment.reacted","version.created"]}}},"required":["id","name","url","spaceId","enabled","events"],"additionalProperties":false}}},"required":["webhooks"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}},"post":{"operationId":"createWebhook","tags":["Integrations"],"summary":"Create a signed webhook","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Workspace admin or owner for workspace-wide hooks. Space admin for a space hook. The credential must have one of admin. Save the returned signing secret.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["doc.created","doc.updated","doc.archived","doc.moved","acl.updated","comment.created","comment.resolved","comment.reacted","version.created"]}},"enabled":{"default":true,"type":"boolean"},"spaceId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name","url","events"]}}}},"responses":{"201":{"description":"Create a signed webhook","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"spaceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"enabled":{"type":"boolean"},"events":{"type":"array","items":{"type":"string","enum":["doc.created","doc.updated","doc.archived","doc.moved","acl.updated","comment.created","comment.resolved","comment.reacted","version.created"]}}},"required":["id","name","url","spaceId","enabled","events"],"additionalProperties":false},"secret":{"type":"string"}},"required":["webhook","secret"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/webhooks/{id}":{"patch":{"operationId":"updateWebhook","tags":["Integrations"],"summary":"Update a webhook","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Workspace admin or owner for workspace-wide hooks. Space admin for a space hook. The credential must have one of admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["doc.created","doc.updated","doc.archived","doc.moved","acl.updated","comment.created","comment.resolved","comment.reacted","version.created"]}},"enabled":{"default":true,"type":"boolean"}},"required":["name","url","events"]}}}},"responses":{"200":{"description":"Update a webhook","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"spaceId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"enabled":{"type":"boolean"},"events":{"type":"array","items":{"type":"string","enum":["doc.created","doc.updated","doc.archived","doc.moved","acl.updated","comment.created","comment.resolved","comment.reacted","version.created"]}}},"required":["id","name","url","spaceId","enabled","events"],"additionalProperties":false}},"required":["webhook"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"removeWebhook","tags":["Integrations"],"summary":"Remove a webhook","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Workspace admin or owner for workspace-wide hooks. Space admin for a space hook. The credential must have one of admin.","responses":{"200":{"description":"Remove a webhook","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean","const":true}},"required":["removed"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/webhooks/{id}/ping":{"post":{"operationId":"pingWebhook","tags":["Integrations"],"summary":"Queue a webhook ping","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Workspace admin or owner for workspace-wide hooks. Space admin for a space hook. The credential must have one of admin.","responses":{"202":{"description":"Queue a webhook ping","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deliveryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["deliveryId"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/webhooks/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Integrations"],"summary":"List recent webhook deliveries","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Workspace admin or owner for workspace-wide hooks. Space admin for a space hook. The credential must have one of admin.","responses":{"200":{"description":"List recent webhook deliveries","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string"},"status":{"type":"string","enum":["pending","retrying","sent","failed","cancelled"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"httpStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"lastError":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","event","status","attempts","httpStatus","lastError","createdAt"],"additionalProperties":false}}},"required":["deliveries"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/events":{"get":{"operationId":"streamWorkspaceEvents","tags":["Events"],"summary":"Subscribe to workspace events","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin. The stream starts with connected and sends a ping heartbeat every 25 seconds. Each permitted change has an event name and JSON data containing workspaceId, spaceId, actorId, timestamp and event-specific fields.","responses":{"200":{"description":"Subscribe to workspace events","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/groups":{"get":{"operationId":"listGroups","tags":["Groups"],"summary":"List workspace groups","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"List workspace groups","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","workspaceId","slug","name","description","createdBy","createdAt"],"additionalProperties":false}}},"required":["groups"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]},"post":{"operationId":"createGroup","tags":["Groups"],"summary":"Create a group","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9-]+$"},"description":{"type":"string","maxLength":500}},"required":["name","slug"]}}}},"responses":{"201":{"description":"Create a group","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"group":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","workspaceId","slug","name","description","createdBy","createdAt"],"additionalProperties":false}},"required":["group"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/groups/directory":{"get":{"operationId":"getWorkspaceDirectory","tags":["Groups"],"summary":"Read the workspace directory","security":[{"sessionCookie":[]}],"description":"Signed-in browser session required.","responses":{"200":{"description":"Read the workspace directory","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["id","name","email"],"additionalProperties":false}}},"required":["users"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/groups/{id}/members":{"get":{"operationId":"listGroupMembers","tags":["Groups"],"summary":"List a group’s members","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","responses":{"200":{"description":"List a group’s members","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["members"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]},"post":{"operationId":"addGroupMember","tags":["Groups"],"summary":"Add a workspace member to a group","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"]}}}},"responses":{"201":{"description":"Add a workspace member to a group","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"boolean","const":true}},"required":["added"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/groups/{id}/members/{userId}":{"delete":{"operationId":"removeGroupMember","tags":["Groups"],"summary":"Remove a group member","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Current workspace admin or owner. The credential must have one of admin.","responses":{"200":{"description":"Remove a group member","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean","const":true}},"required":["removed"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"userId","required":true,"description":"Account ID of the workspace member."}]}},"/api/v1/workspaces/{workspaceId}/spaces":{"get":{"operationId":"listSpaces","tags":["Spaces"],"summary":"List visible spaces","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"List visible spaces","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"spaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"tint":{"type":"string","enum":["sky","sand","sage","lavender","neutral","rose","terracotta","teal","slate"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]},"visibility":{"type":"string","enum":["org","restricted"]},"defaultOrgRole":{"anyOf":[{"type":"string","enum":["viewer","commenter","editor"]},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]}},"required":["id","workspaceId","slug","name","description","tint","coverKey","visibility","defaultOrgRole","createdBy","createdAt","updatedAt","role"],"additionalProperties":false}}},"required":["spaces"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]},"post":{"operationId":"createSpace","tags":["Spaces"],"summary":"Create a space","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member with write access on the credential. The credential must have one of docs:write, admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tint":{"type":"string","enum":["sky","sand","sage","lavender","neutral","rose","terracotta","teal","slate"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9-]+$"},"description":{"type":"string","maxLength":500},"visibility":{"default":"org","type":"string","enum":["org","restricted"]},"defaultOrgRole":{"default":"viewer","anyOf":[{"type":"string","enum":["viewer","commenter","editor"]},{"type":"null"}]}},"required":["name","slug"]}}}},"responses":{"201":{"description":"Create a space","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"tint":{"type":"string","enum":["sky","sand","sage","lavender","neutral","rose","terracotta","teal","slate"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]},"visibility":{"type":"string","enum":["org","restricted"]},"defaultOrgRole":{"anyOf":[{"type":"string","enum":["viewer","commenter","editor"]},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","workspaceId","slug","name","description","tint","coverKey","visibility","defaultOrgRole","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"required":["space"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/spaces/gallery":{"get":{"operationId":"listSpaceGallery","tags":["Spaces"],"summary":"List visible gallery previews","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"List visible gallery previews","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"gallery":{"type":"array","items":{"type":"object","properties":{"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}}},"required":["spaceId","count","documents"],"additionalProperties":false}}},"required":["gallery"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/spaces/{id}":{"get":{"operationId":"getSpace","tags":["Spaces"],"summary":"Read a space","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"Read a space","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"tint":{"type":"string","enum":["sky","sand","sage","lavender","neutral","rose","terracotta","teal","slate"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]},"visibility":{"type":"string","enum":["org","restricted"]},"defaultOrgRole":{"anyOf":[{"type":"string","enum":["viewer","commenter","editor"]},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]}},"required":["id","workspaceId","slug","name","description","tint","coverKey","visibility","defaultOrgRole","createdBy","createdAt","updatedAt","role"],"additionalProperties":false}},"required":["space"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]},"patch":{"operationId":"updateSpace","tags":["Spaces"],"summary":"Edit a space","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Admin on the resource. The credential must have one of admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tint":{"type":"string","enum":["sky","sand","sage","lavender","neutral","rose","terracotta","teal","slate"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"visibility":{"type":"string","enum":["org","restricted"]},"defaultOrgRole":{"anyOf":[{"type":"string","enum":["viewer","commenter","editor"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Edit a space","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"tint":{"type":"string","enum":["sky","sand","sage","lavender","neutral","rose","terracotta","teal","slate"]},"coverKey":{"anyOf":[{"type":"string","enum":["sport-running","sport-cycling","sport-skiing","sport-tennis","sport-rowing","sport-swimmer","sport-water-gesture","swimmer","swimming","sport-dancers","dancers","duet","hiker","hikers","birds","wing","bird-ochre","bird-blue","bird-rust","bird-sage","bird-sea","bird-lake","bird-river","bird-mountains","feather-rose","feathers-sunrise","feather-coral","macro-feather-1","macro-feather-2","macro-feather-3","macro-feather-4","butterfly","foliage","leaves","grasses","wildflowers","petals","seed-head","autumn","forest","old-growth","fish","fin","wave","tide","ocean","sailboat","ship","dawn","dusk","horizon","clouds-pink","clouds-red-blue","rain","storm","snow","flurry","mountain","glacier","desert","volcano","eruption","magma-lake","lava-river","lava-detail","fabric","pages"]},{"type":"null"}]},"visibility":{"type":"string","enum":["org","restricted"]},"defaultOrgRole":{"anyOf":[{"type":"string","enum":["viewer","commenter","editor"]},{"type":"null"}]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","workspaceId","slug","name","description","tint","coverKey","visibility","defaultOrgRole","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"required":["space"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/spaces/{id}/tree":{"get":{"operationId":"getSpaceTree","tags":["Spaces"],"summary":"List readable documents in a space","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin. Each returned document requires at least viewer access.","responses":{"200":{"description":"List readable documents in a space","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"position":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"inheritParent":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"icon":{"type":["string","null"]},"indexed":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}}},"required":["id","spaceId","title","parentId","position","inheritParent","updatedAt","version","role","createdAt","icon","indexed","tags"],"additionalProperties":false}}},"required":["documents"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/spaces/{id}/export":{"get":{"operationId":"exportSpaceMarkdown","tags":["Spaces"],"summary":"Export readable documents as Markdown","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin. Returns a ZIP archive containing up to 4,096 files and 16 MiB of readable Markdown. It does not include attachment bytes.","responses":{"200":{"description":"Export readable documents as Markdown","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs":{"post":{"operationId":"createDocument","tags":["Documents"],"summary":"Create a document","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin. Requires editor access on the parent document or, for a root document, on the target space.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":240},"icon":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"position":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"inheritParent":{"default":true,"type":"boolean"},"contentMd":{"default":"","type":"string"}},"required":["spaceId","title"]}}}},"responses":{"201":{"description":"Create a document","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/meta":{"get":{"operationId":"getDocumentMeta","tags":["Documents"],"summary":"Read document metadata","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"Read document metadata","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"openingParagraph":{"type":["string","null"]},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"position":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"inheritParent":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]}},"required":["id","spaceId","title","openingParagraph","parentId","position","inheritParent","updatedAt","version","role"],"additionalProperties":false}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/outline":{"get":{"operationId":"getDocumentOutline","tags":["Documents"],"summary":"Read headings and visible links","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"Read headings and visible links","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"outline":{"type":"object","properties":{"headings":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string"},"blockId":{"type":"string"},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"},"blockCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sectionId","blockId","level","text","blockCount"],"additionalProperties":false}},"blockCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokenEstimate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"backlinkCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outgoingDocLinks":{"type":"array","items":{"type":"object","properties":{"targetDocId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"anchorText":{"type":["string","null"]}},"required":["targetDocId","anchorText"],"additionalProperties":false}}},"required":["headings","blockCount","tokenEstimate","id","spaceId","title","version","parentId","tags","backlinkCount","outgoingDocLinks"],"additionalProperties":false}},"required":["outline"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/backlinks":{"get":{"operationId":"listDocumentBacklinks","tags":["Documents"],"summary":"List visible backlinks","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"List visible backlinks","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"backlinks":{"type":"array","items":{"type":"object","properties":{"sourceDocId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"anchorText":{"type":["string","null"]}},"required":["sourceDocId","title","spaceId","anchorText"],"additionalProperties":false}}},"required":["backlinks"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/related":{"get":{"operationId":"getRelatedDocuments","tags":["Documents"],"summary":"Traverse visible document relationships","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin.","parameters":[{"in":"query","name":"depth","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":2}},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Traverse visible document relationships","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"related":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"distance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"relations":{"type":"array","items":{"type":"string","enum":["child","parent","outgoing_link","incoming_link"]}}},"required":["id","spaceId","title","distance","relations"],"additionalProperties":false}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"to":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["hierarchy","doc_link"]}},"required":["from","to","type"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false}},"required":["related"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}}},"/api/v1/workspaces/{workspaceId}/docs/{id}":{"get":{"operationId":"readDocument","tags":["Documents"],"summary":"Read a document or slice","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin. With a format, sectionId or comma-separated blockIds and maxTokens select a slice. Omit format for the full document row.","parameters":[{"in":"query","name":"format","required":false,"schema":{"type":"string","enum":["markdown","blocks"]}},{"in":"query","name":"sectionId","required":false,"schema":{"type":"string","minLength":1}},{"in":"query","name":"blockIds","required":false,"schema":{"type":"string","minLength":1}},{"in":"query","name":"maxTokens","required":false,"schema":{"type":"integer","minimum":1,"maximum":100000}},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Read a document or slice","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"openingParagraph":{"type":["string","null"]},"icon":{"type":["string","null"]},"position":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"inheritParent":{"type":"boolean"},"contentMd":{"type":"string"},"contentJson":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]}},"required":["id","workspaceId","spaceId","parentId","title","openingParagraph","icon","position","inheritParent","contentMd","contentJson","version","archivedAt","createdBy","updatedBy","createdAt","updatedAt","role"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]},"truncated":{"type":"boolean"},"format":{"type":"string","const":"markdown"},"markdown":{"type":"string"}},"required":["id","spaceId","title","version","role","truncated","format","markdown"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"version":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]},"truncated":{"type":"boolean"},"format":{"type":"string","const":"blocks"},"blocks":{"type":"array","items":{"type":"object","properties":{"blockId":{"type":"string"},"type":{"type":"string"},"text":{"type":"string"},"markdown":{"type":"string"}},"required":["blockId","type","text","markdown"],"additionalProperties":false}}},"required":["id","spaceId","title","version","role","truncated","format","blocks"],"additionalProperties":false}]}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}},"patch":{"operationId":"updateDocumentMeta","tags":["Documents"],"summary":"Edit document metadata","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin. The opening paragraph is separate from document content. Set it to null to clear it. Supplying inheritParent requires resource admin authority and admin token scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":240},"openingParagraph":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"inheritParent":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}}}}}},"responses":{"200":{"description":"Edit document metadata","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"archiveDocument","tags":["Documents"],"summary":"Archive a document subtree","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin. Requires editor access throughout the active subtree.","responses":{"200":{"description":"Archive a document subtree","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"type":"boolean","const":true}},"required":["archived"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/patch":{"post":{"operationId":"patchDocument","tags":["Documents"],"summary":"Apply content patches","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"replace_section"},"sectionId":{"type":"string","minLength":1},"markdown":{"type":"string"},"includeHeading":{"type":"boolean"}},"required":["type","sectionId","markdown"]},{"type":"object","properties":{"type":{"type":"string","const":"replace_block"},"blockId":{"type":"string","minLength":1},"markdown":{"type":"string"}},"required":["type","blockId","markdown"]},{"type":"object","properties":{"type":{"type":"string","const":"insert_after_block"},"blockId":{"type":"string","minLength":1},"markdown":{"type":"string"}},"required":["type","blockId","markdown"]},{"type":"object","properties":{"type":{"type":"string","const":"delete_block"},"blockId":{"type":"string","minLength":1}},"required":["type","blockId"]},{"type":"object","properties":{"type":{"type":"string","const":"append_markdown"},"markdown":{"type":"string"}},"required":["type","markdown"]},{"type":"object","properties":{"type":{"type":"string","const":"find_and_replace"},"find":{"type":"string","minLength":1},"replace":{"type":"string"},"all":{"type":"boolean"}},"required":["type","find","replace"]}]}}},"required":["operations"]}}}},"responses":{"200":{"description":"Apply content patches","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"appliedCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outline":{"type":"object","properties":{"headings":{"type":"array","items":{"type":"object","properties":{"sectionId":{"type":"string"},"blockId":{"type":"string"},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"},"blockCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sectionId","blockId","level","text","blockCount"],"additionalProperties":false}},"blockCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokenEstimate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["headings","blockCount","tokenEstimate"],"additionalProperties":false}},"required":["document","appliedCount","outline"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/move":{"post":{"operationId":"moveDocument","tags":["Documents"],"summary":"Move or reorder a document","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin. Changing parent or space requires admin on the source subtree, an admin-scoped credential and editor on the destination. Sibling reorder requires editor.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"beforeDocId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetSpaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetParentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"position":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["targetParentId"]}}}},"responses":{"200":{"description":"Move or reorder a document","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"}},"required":["document"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/attachments":{"post":{"operationId":"uploadDocumentAttachment","tags":["Documents"],"summary":"Upload a document attachment","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin. Accepts one JPEG, PNG, WebP, or PDF up to 10 MiB. Insert the returned ID into the owning document to display the attachment.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"201":{"description":"Upload a document attachment","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"attachment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp","application/pdf"]},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id","filename","contentType","sizeBytes"],"additionalProperties":false}},"required":["attachment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/attachments/{attachmentId}":{"get":{"operationId":"readDocumentAttachment","tags":["Documents"],"summary":"Read a document attachment","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin. Returns the original stored bytes. Images are served inline and PDFs as downloads.","responses":{"200":{"description":"Read a document attachment","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"attachmentId","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/versions":{"get":{"operationId":"listDocumentVersions","tags":["Versions"],"summary":"List document snapshots","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"List document snapshots","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":["string","null"]},"source":{"type":"string","enum":["api","mcp","human","restore"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"docId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authorId":{"type":["string","null"]},"title":{"type":"string"}},"required":["id","versionNumber","label","source","createdAt","docId","authorId","title"],"additionalProperties":false}}},"required":["versions"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]},"post":{"operationId":"createDocumentVersion","tags":["Versions"],"summary":"Create a document snapshot","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120}}}}}},"responses":{"201":{"description":"Create a document snapshot","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":["string","null"]},"source":{"type":"string","enum":["api","mcp","human","restore"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"docId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"authorId":{"type":["string","null"]},"title":{"type":"string"}},"required":["id","versionNumber","label","source","createdAt","docId","authorId","title"],"additionalProperties":false}},"required":["version"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/versions/{versionId}/diff":{"get":{"operationId":"diffDocumentVersion","tags":["Versions"],"summary":"Compare snapshot content","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin. Omit compareTo to compare against the current document.","parameters":[{"in":"query","name":"compareTo","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"versionId","required":true}],"responses":{"200":{"description":"Compare snapshot content","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"diff":{"type":"object","properties":{"fromVersion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":["string","null"]}},"required":["id","versionNumber","label"],"additionalProperties":false},"toVersion":{"type":"object","properties":{"versionNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"}},"required":["versionNumber","label"],"additionalProperties":false},"unifiedDiff":{"type":"string"},"changes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"added":{"type":"boolean"},"removed":{"type":"boolean"}},"required":["value","count","added","removed"],"additionalProperties":false}}},"required":["fromVersion","toVersion","unifiedDiff","changes"],"additionalProperties":false}},"required":["diff"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"}}}},"/api/v1/workspaces/{workspaceId}/docs/{id}/versions/{versionId}/restore":{"post":{"operationId":"restoreDocumentVersion","tags":["Versions"],"summary":"Restore a snapshot","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Editor or higher on the resource. The credential must have one of docs:write, admin.","responses":{"200":{"description":"Restore a snapshot","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"version":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"versionNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":["string","null"]},"source":{"type":"string","enum":["api","mcp","human","restore"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","versionNumber","label","source","createdAt"],"additionalProperties":false}},"required":["document","version"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"versionId","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/comments":{"get":{"operationId":"listDocumentComments","tags":["Comments"],"summary":"List document comments","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Viewer or higher on the resource. The credential must have one of docs:read, docs:write, admin.","responses":{"200":{"description":"List document comments","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"docId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"blockId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":500},"start":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"},"end":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["quote","start","end"],"additionalProperties":false},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"authorId":{"type":"string"},"body":{"type":"string"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"authorName":{"type":"string"},"authorImage":{"type":["string","null"]},"authorEmail":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string"},"userIds":{"type":"array","items":{"type":"string"}}},"required":["emoji","userIds"],"additionalProperties":false}}},"required":["id","docId","blockId","anchor","parentCommentId","authorId","body","resolvedAt","resolvedBy","createdAt","updatedAt","authorName","authorImage","authorEmail","reactions"],"additionalProperties":false}}},"required":["comments"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]},"post":{"operationId":"createDocumentComment","tags":["Comments"],"summary":"Add a comment or reply","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Commenter or higher on the document. The credential must have one of docs:write, admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"blockId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"anchor":{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":500},"start":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"},"end":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["quote","start","end"]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["body"]}}}},"responses":{"201":{"description":"Add a comment or reply","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"docId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"blockId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":500},"start":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"},"end":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["quote","start","end"],"additionalProperties":false},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"authorId":{"type":"string"},"body":{"type":"string"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","docId","blockId","anchor","parentCommentId","authorId","body","resolvedAt","resolvedBy","createdAt","updatedAt"],"additionalProperties":false}},"required":["comment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/comments/{commentId}/reaction":{"put":{"operationId":"setDocumentCommentReaction","tags":["Comments"],"summary":"Set your reaction to a comment","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Commenter or higher on the document. The credential must have one of docs:write, admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emoji":{"type":"string","enum":["👍","👀","🎯","🔥","💡","✅"]},"active":{"type":"boolean"}},"required":["emoji","active"]}}}},"responses":{"200":{"description":"Set your reaction to a comment","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"commentId","required":true}]}},"/api/v1/workspaces/{workspaceId}/docs/{id}/comments/{commentId}":{"patch":{"operationId":"updateDocumentComment","tags":["Comments"],"summary":"Resolve or reopen a comment","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Commenter or higher on the document. The credential must have one of docs:write, admin. Requires authorship of the comment or editor access on the document.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"boolean"}},"required":["resolved"]}}}},"responses":{"200":{"description":"Resolve or reopen a comment","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"docId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"blockId":{"type":["string","null"]},"anchor":{"anyOf":[{"type":"object","properties":{"quote":{"type":"string","minLength":1,"maxLength":500},"start":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"},"end":{"type":"string","minLength":1,"maxLength":512,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["quote","start","end"],"additionalProperties":false},{"type":"null"}]},"parentCommentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"authorId":{"type":"string"},"body":{"type":"string"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","docId","blockId","anchor","parentCommentId","authorId","body","resolvedAt","resolvedBy","createdAt","updatedAt"],"additionalProperties":false}},"required":["comment"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"commentId","required":true}]}},"/api/v1/workspaces/{workspaceId}/search":{"get":{"operationId":"searchDocuments","tags":["Search"],"summary":"Search readable documents","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin. Repeat tags in the query or separate them with commas.","parameters":[{"in":"query","name":"q","required":true,"schema":{"type":"string","minLength":1,"maxLength":500}},{"in":"query","name":"spaceId","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"tags","required":false,"schema":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":50}},{"in":"query","name":"mode","required":false,"schema":{"default":"hybrid","type":"string","enum":["hybrid","keyword","semantic"]}},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}],"responses":{"200":{"description":"Search readable documents","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"mode":{"type":"string","enum":["hybrid","keyword","semantic"]},"effectiveMode":{"type":"string","enum":["hybrid","keyword","semantic"]},"results":{"type":"array","items":{"type":"object","properties":{"docId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceName":{"type":"string"},"spaceSlug":{"type":"string"},"title":{"type":"string"},"score":{"type":"number"},"semanticScore":{"type":["number","null"]},"keywordScore":{"type":["number","null"]},"sectionId":{"type":["string","null"]},"headingPath":{"type":"array","items":{"type":"string"}},"blockIds":{"type":"array","items":{"type":"string"}},"snippet":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["docId","spaceId","spaceName","spaceSlug","title","score","semanticScore","keywordScore","sectionId","headingPath","blockIds","snippet","tags","updatedAt"],"additionalProperties":false}}},"required":["query","mode","effectiveMode","results"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}},"post":{"operationId":"searchDocumentsPost","tags":["Search"],"summary":"Search with a JSON request","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["docs:read"]},{"oauth":["docs:write"]},{"oauth":["admin"]}],"description":"Current workspace member. The credential must have one of docs:read, docs:write, admin.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":500},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"mode":{"default":"hybrid","type":"string","enum":["hybrid","keyword","semantic"]}},"required":["q"]}}}},"responses":{"200":{"description":"Search with a JSON request","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"mode":{"type":"string","enum":["hybrid","keyword","semantic"]},"effectiveMode":{"type":"string","enum":["hybrid","keyword","semantic"]},"results":{"type":"array","items":{"type":"object","properties":{"docId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"spaceName":{"type":"string"},"spaceSlug":{"type":"string"},"title":{"type":"string"},"score":{"type":"number"},"semanticScore":{"type":["number","null"]},"keywordScore":{"type":["number","null"]},"sectionId":{"type":["string","null"]},"headingPath":{"type":"array","items":{"type":"string"}},"blockIds":{"type":"array","items":{"type":"string"}},"snippet":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["docId","spaceId","spaceName","spaceSlug","title","score","semanticScore","keywordScore","sectionId","headingPath","blockIds","snippet","tags","updatedAt"],"additionalProperties":false}}},"required":["query","mode","effectiveMode","results"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/acl":{"get":{"operationId":"listAclEntries","tags":["Sharing"],"summary":"List access control entries","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Admin on the resource. The credential must have one of admin.","parameters":[{"in":"query","name":"resourceType","required":true,"schema":{"type":"string","enum":["space","doc"]}},{"in":"query","name":"resourceId","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}],"responses":{"200":{"description":"List access control entries","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resourceType":{"type":"string","enum":["space","doc"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectType":{"type":"string","enum":["user","group","org"]},"subjectId":{"type":["string","null"]},"spaceResource":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"docResource":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"userSubject":{"type":["string","null"]},"groupSubject":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"effect":{"default":"allow","type":"string","enum":["allow","deny"]},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","workspaceId","resourceType","resourceId","subjectType","subjectId","spaceResource","docResource","userSubject","groupSubject","effect","role","createdBy","createdAt"],"additionalProperties":false}}},"required":["entries"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}}},"put":{"operationId":"setAclEntry","tags":["Sharing"],"summary":"Set an access control entry","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Admin on the resource. The credential must have one of admin. For an org subject, send a null subjectId. For a user or group, supply the subject ID in this workspace.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resourceType":{"type":"string","enum":["space","doc"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectType":{"type":"string","enum":["user","group","org"]},"subjectId":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"effect":{"default":"allow","type":"string","enum":["allow","deny"]},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]}},"required":["resourceType","resourceId","subjectType","role"]}}}},"responses":{"200":{"description":"Set an access control entry","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workspaceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"resourceType":{"type":"string","enum":["space","doc"]},"resourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"subjectType":{"type":"string","enum":["user","group","org"]},"subjectId":{"type":["string","null"]},"spaceResource":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"docResource":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"userSubject":{"type":["string","null"]},"groupSubject":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"effect":{"default":"allow","type":"string","enum":["allow","deny"]},"role":{"type":"string","enum":["viewer","commenter","editor","admin"]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","workspaceId","resourceType","resourceId","subjectType","subjectId","spaceResource","docResource","userSubject","groupSubject","effect","role","createdBy","createdAt"],"additionalProperties":false}},"required":["entry"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true}]}},"/api/v1/workspaces/{workspaceId}/acl/{id}":{"delete":{"operationId":"removeAclEntry","tags":["Sharing"],"summary":"Remove an access control entry","security":[{"sessionCookie":[]},{"personalAccessToken":[]},{"oauth":["admin"]}],"description":"Admin on the resource. The credential must have one of admin.","responses":{"200":{"description":"Remove an access control entry","headers":{"RateLimit-Policy":{"description":"Quota policy in IETF RateLimit structured-field format.","schema":{"type":"string"}},"RateLimit":{"description":"Remaining quota and reset window in IETF RateLimit structured-field format.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"workspaceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}]}}}}