{"openapi":"3.1.0","info":{"title":"Blua API","version":"0.0.0","description":"Cloudflare-native comment service API"},"components":{"securitySchemes":{"session":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"First-party Better Auth session. HTTPS uses the secure cookie prefix."},"embed":{"type":"apiKey","in":"header","name":"Blua-Guest-Token"}},"schemas":{"HealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"service":{"type":"string","enum":["api","assets","jobs"]},"version":{"type":"string","minLength":1,"maxLength":40},"environment":{"type":"string","minLength":1,"maxLength":40},"requestId":{"type":"string","pattern":"^req_[A-Za-z0-9_-]{16,80}$"},"timestamp":{"type":"string","format":"date-time"},"checks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"status":{"type":"string","enum":["ok","failed"]}},"required":["name","status"],"additionalProperties":false},"maxItems":10}},"required":["status","service","version","environment","requestId","timestamp"],"additionalProperties":false},"PublicBootstrapResponse":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/SitePublic"},"page":{"$ref":"#/components/schemas/PagePublic"},"threads":{"$ref":"#/components/schemas/ThreadPage"},"serverTime":{"type":"string","format":"date-time"}},"required":["site","page","threads","serverTime"],"additionalProperties":false},"SitePublic":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"locale":{"type":"string","minLength":1,"maxLength":35},"configVersion":{"type":"integer","minimum":0},"features":{"type":"object","properties":{"guestCommenting":{"type":"boolean"},"voting":{"type":"boolean"},"commentImages":{"type":"boolean"}},"required":["guestCommenting","voting"],"additionalProperties":false},"privacyUrl":{"type":"string","format":"uri"},"challenge":{"$ref":"#/components/schemas/SiteChallenge"}},"required":["key","name","locale","configVersion","features"],"additionalProperties":false},"SiteChallenge":{"type":"object","properties":{"provider":{"type":"string","enum":["turnstile"]},"siteKey":{"type":"string","minLength":1,"maxLength":100},"mode":{"type":"string","enum":["managed","non-interactive"]}},"required":["provider","siteKey","mode"],"additionalProperties":false},"PagePublic":{"type":"object","properties":{"id":{"type":"string","minLength":1},"key":{"type":"string","minLength":1,"maxLength":500},"title":{"type":"string","nullable":true,"maxLength":300},"canonicalUrl":{"type":"string","nullable":true,"format":"uri"},"status":{"type":"string","enum":["active","locked","hidden"]},"commentCount":{"type":"integer","minimum":0},"rootCount":{"type":"integer","minimum":0},"lastCommentedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","key","title","canonicalUrl","status","commentCount","rootCount","lastCommentedAt"],"additionalProperties":false},"ThreadPage":{"type":"object","properties":{"roots":{"type":"array","items":{"$ref":"#/components/schemas/CommentPublic"},"maxItems":100},"repliesByRoot":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/CommentPublic"},"maxItems":100}},"nextCursor":{"type":"string","nullable":true,"minLength":1},"totalRoots":{"type":"integer","minimum":0}},"required":["roots","repliesByRoot","nextCursor","totalRoots"],"additionalProperties":false},"CommentPublic":{"type":"object","properties":{"id":{"type":"string","minLength":1},"pageId":{"type":"string","minLength":1},"parentId":{"type":"string","nullable":true,"minLength":1},"rootId":{"type":"string","minLength":1},"replyToId":{"type":"string","nullable":true,"minLength":1},"depth":{"type":"integer","minimum":0},"author":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"avatarKey":{"type":"string","format":"uuid"},"websiteUrl":{"type":"string","format":"uri"},"badge":{"type":"string","minLength":1,"maxLength":40}},"required":["name"],"additionalProperties":false},"imageDescription":{"type":"string","maxLength":160},"safeHtml":{"type":"string"},"plainText":{"type":"string"},"status":{"type":"string","enum":["published","pending","deleted"]},"upVotes":{"type":"integer","minimum":0},"downVotes":{"type":"integer","minimum":0},"replyCount":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"viewerVote":{"type":"string","nullable":true,"enum":["up","down",null]},"ownComment":{"type":"boolean"}},"required":["id","pageId","parentId","rootId","replyToId","depth","author","safeHtml","plainText","status","upVotes","downVotes","replyCount","createdAt","updatedAt"],"additionalProperties":false},"Problem":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":160},"status":{"type":"integer","minimum":400,"maximum":599},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,79}$"},"detail":{"type":"string","minLength":1,"maxLength":500},"instance":{"type":"string","maxLength":500},"requestId":{"type":"string","pattern":"^req_[A-Za-z0-9_-]{16,80}$"},"retryAfter":{"type":"integer","minimum":0},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer","minimum":0}]},"maxItems":20},"reason":{"type":"string","minLength":1,"maxLength":80}},"required":["path","reason"],"additionalProperties":false},"maxItems":100,"default":[]}},"required":["type","title","status","code","detail","instance","requestId"],"additionalProperties":false},"CommentListResponse":{"type":"object","properties":{"threads":{"$ref":"#/components/schemas/ThreadPage"},"page":{"$ref":"#/components/schemas/PagePublic"}},"required":["threads","page"],"additionalProperties":false},"CommentRepliesResponse":{"type":"object","properties":{"replies":{"type":"array","items":{"$ref":"#/components/schemas/CommentPublic"},"maxItems":100},"nextCursor":{"type":"string","nullable":true,"minLength":1}},"required":["replies","nextCursor"],"additionalProperties":false},"CreateCommentResponse":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/CommentPublic"},"disposition":{"type":"string","enum":["published","pending"]},"guestToken":{"type":"string","minLength":1}},"required":["comment","disposition"],"additionalProperties":false},"CreateCommentRequest":{"type":"object","properties":{"page":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":500},"title":{"type":"string","minLength":1,"maxLength":300},"canonicalUrl":{"type":"string","format":"uri"}},"required":["key"],"additionalProperties":false},"parentId":{"type":"string","nullable":true,"minLength":1},"replyToId":{"type":"string","nullable":true,"minLength":1},"content":{"type":"object","properties":{"format":{"type":"string","enum":["markdown"]},"value":{"type":"string","minLength":1,"maxLength":10000}},"required":["format","value"],"additionalProperties":false},"image":{"type":"object","properties":{"png":{"type":"string","minLength":1,"maxLength":349528},"description":{"type":"string","minLength":1,"maxLength":160}},"required":["png","description"],"additionalProperties":false},"author":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":80},"websiteUrl":{"type":"string","format":"uri"}},"required":["displayName"],"additionalProperties":false},"challenge":{"$ref":"#/components/schemas/Challenge"},"client":{"type":"object","properties":{"sdkVersion":{"type":"string","minLength":1,"maxLength":40},"timeToSubmitMs":{"type":"integer","minimum":0},"honeypot":{"type":"string","maxLength":200}},"required":["sdkVersion"],"additionalProperties":false}},"required":["page","content","client"],"additionalProperties":false},"Challenge":{"type":"object","properties":{"provider":{"type":"string","enum":["turnstile"]},"token":{"type":"string","minLength":1,"maxLength":2048},"action":{"type":"string","enum":["comment-create"]}},"required":["provider","token","action"],"additionalProperties":false},"CommentResponse":{"type":"object","properties":{"comment":{"$ref":"#/components/schemas/CommentPublic"}},"required":["comment"],"additionalProperties":false},"UpdateCommentRequest":{"type":"object","properties":{"content":{"type":"object","properties":{"format":{"type":"string","enum":["markdown"]},"value":{"type":"string","minLength":1,"maxLength":10000}},"required":["format","value"],"additionalProperties":false},"version":{"type":"integer","minimum":1}},"required":["content","version"],"additionalProperties":false},"VoteRequest":{"type":"object","properties":{"value":{"type":"string","enum":["up","down"]}},"required":["value"],"additionalProperties":false}},"parameters":{}},"paths":{"/health/live":{"get":{"tags":["System"],"summary":"Check whether the API Worker can serve requests","responses":{"200":{"description":"The Worker runtime is live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/health/storage":{"get":{"tags":["System"],"summary":"Check the control and primary data stores","responses":{"200":{"description":"All required storage bindings are ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"503":{"description":"At least one required storage binding is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/sites/{siteKey}/bootstrap":{"get":{"tags":["Comments"],"summary":"Load the public site/page/thread bootstrap for an embed page","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"name":"pageKey","in":"query"},{"schema":{"type":"string","maxLength":300},"required":false,"name":"pageTitle","in":"query"},{"schema":{"type":"string","enum":["newest","oldest"],"default":"newest"},"required":false,"name":"sort","in":"query"}],"responses":{"200":{"description":"Public bootstrap payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBootstrapResponse"}}}},"304":{"description":"Unchanged since the provided ETag"},"400":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sites/{siteKey}/comments":{"get":{"tags":["Comments"],"summary":"Paginate root comments of a page with a signed keyset cursor","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"name":"pageKey","in":"query"},{"schema":{"type":"string","enum":["newest","oldest"],"default":"newest"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of root threads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentListResponse"}}}},"400":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Comments"],"summary":"Create a comment or reply (idempotent)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentRequest"}}}},"responses":{"201":{"description":"Comment created (or idempotent replay)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentResponse"}}}},"400":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sites/{siteKey}/comments/{commentId}/replies":{"get":{"tags":["Comments"],"summary":"Paginate replies of a root comment (or children of a comment)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"commentId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of replies, oldest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentRepliesResponse"}}}},"400":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sites/{siteKey}/comments/{commentId}":{"patch":{"tags":["Comments"],"summary":"Edit an own comment within the edit window","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"commentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentRequest"}}}},"responses":{"200":{"description":"The updated comment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"400":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Comments"],"summary":"Delete an own comment (tombstone when it has replies)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"commentId","in":"path"}],"responses":{"204":{"description":"Comment deleted or tombstoned"},"403":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sites/{siteKey}/comments/{commentId}/vote":{"put":{"tags":["Comments"],"summary":"Set or switch the caller vote on a comment","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"commentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteRequest"}}}},"responses":{"200":{"description":"The comment with updated counters and viewer vote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"400":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Comments"],"summary":"Remove the caller vote from a comment (idempotent)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"commentId","in":"path"}],"responses":{"200":{"description":"The comment with updated counters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"403":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"RFC 9457 problem response","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sites/{siteKey}/comments/{id}/image":{"get":{"summary":"Read the PNG of a publicly visible comment","tags":["Accounts"],"security":[],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Read the PNG of a publicly visible comment","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/v1/admin/comments/{id}/image":{"get":{"summary":"Review a quarantined comment image","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Review a quarantined comment image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Authorization or origin check failed"}}}},"/v1/me/avatar":{"delete":{"summary":"Remove the default account avatar","tags":["Accounts"],"security":[{"session":[]}],"responses":{"204":{"description":"Remove the default account avatar"},"403":{"description":"Authorization or origin check failed"}}},"put":{"summary":"Set a default private PNG avatar for new sites","tags":["Accounts"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Set a default private PNG avatar for new sites"},"400":{"description":"Invalid PNG structure, dimensions or raster"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"},"415":{"description":"Use image/png for the avatar body"}}},"get":{"summary":"Read the account default avatar","tags":["Accounts"],"security":[{"session":[]}],"responses":{"200":{"description":"Read the account default avatar","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Authorization or origin check failed"}}}},"/v1/sites/{siteKey}/account/avatar":{"delete":{"summary":"Remove the site avatar and its comment snapshots","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"responses":{"204":{"description":"Remove the site avatar and its comment snapshots"},"403":{"description":"Authorization or origin check failed"}}},"put":{"summary":"Upload a static PNG up to 512 × 512 pixels and 256 KiB","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Upload a static PNG up to 512 × 512 pixels and 256 KiB"},"400":{"description":"Invalid PNG structure, dimensions or raster"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"},"415":{"description":"Use image/png for the avatar body"}}}},"/v1/me/profile":{"patch":{"summary":"Set the default display name for new sites","tags":["Accounts"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Set the default display name for new sites"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/me":{"get":{"summary":"Get account availability, the signed-in user and connected sites","tags":["Accounts"],"security":[],"responses":{"200":{"description":"Get account availability, the signed-in user and connected sites"}}}},"/v1/me/export":{"get":{"summary":"Download the signed-in account and its site data","tags":["Accounts"],"security":[{"session":[]}],"responses":{"200":{"description":"Download the signed-in account and its site data"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/me/erasure":{"post":{"summary":"Request erasure across this installation","tags":["Accounts"],"security":[{"session":[]}],"responses":{"202":{"description":"Request erasure across this installation"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/me/connect":{"post":{"summary":"Authorize one site origin and issue an embed capability","tags":["Accounts"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"siteKey":{"type":"string"},"origin":{"type":"string","format":"uri"}},"required":["siteKey","origin"],"additionalProperties":false}}}},"responses":{"200":{"description":"Authorize one site origin and issue an embed capability"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/sites/{siteKey}/account":{"get":{"summary":"Read a site profile","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"responses":{"200":{"description":"Read a site profile"},"403":{"description":"Authorization or origin check failed"}}},"patch":{"summary":"Change a nickname and reply notification preference","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"notify":{"type":"boolean"}},"required":["name","notify"],"additionalProperties":false}}}},"responses":{"200":{"description":"Change a nickname and reply notification preference"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/sites/{siteKey}/account/replies":{"get":{"summary":"Read the current actor’s visible replies","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Read the current actor’s visible replies","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"excerpt":{"type":"string"},"page":{"type":"string"},"url":{"type":"string","nullable":true,"format":"uri"},"publishedAt":{"type":"string","format":"date-time"},"read":{"type":"boolean"}},"required":["id","name","excerpt","page","url","publishedAt","read"],"additionalProperties":false},"maxItems":20},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"],"additionalProperties":false}}}},"401":{"description":"An active first-party session or site credential is required"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/sites/{siteKey}/account/replies/{id}/read":{"put":{"summary":"Mark one received reply as read","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Mark one received reply as read"},"401":{"description":"An active first-party session or site credential is required"},"403":{"description":"Authorization or origin check failed"},"404":{"description":"The reply is absent from this inbox"}}}},"/v1/sites/{siteKey}/account/comment-state":{"post":{"summary":"Read personal authorship and votes for displayed comments","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":80}},"required":["ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Read personal authorship and votes for displayed comments","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"own":{"type":"boolean"},"vote":{"type":"string","nullable":true,"enum":["up","down",null]}},"required":["id","own","vote"],"additionalProperties":false},"maxItems":80}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"An active first-party session or site credential is required"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/sites/{siteKey}/account/export":{"get":{"summary":"Export the site profile, avatar, comments and votes","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"responses":{"200":{"description":"Export the site profile, avatar, comments and votes"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/sites/{siteKey}/account/erasure":{"post":{"summary":"Request site-scoped erasure","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"responses":{"202":{"description":"Request site-scoped erasure"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/sites/{siteKey}/account/session":{"delete":{"summary":"Revoke the current embed capability","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"}],"responses":{"204":{"description":"Revoke the current embed capability"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/sites/{siteKey}/comments/{id}/source":{"get":{"summary":"Read original Markdown and its edit version as the author","tags":["Accounts"],"security":[{"embed":[]},{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"siteKey","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Read original Markdown and its edit version as the author"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/avatars/{key}":{"get":{"summary":"Read a current public avatar","tags":["Accounts"],"security":[],"parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"responses":{"200":{"description":"Read a current public avatar","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/v1/admin/sites":{"get":{"summary":"List sites, active origins and configured policies","tags":["Administration"],"security":[{"session":[]}],"responses":{"200":{"description":"List sites, active origins and configured policies"},"403":{"description":"Authorization or origin check failed"}}},"post":{"summary":"Create a site","tags":["Administration"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"origins":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"maxItems":50}},"required":["key","name","origins"],"additionalProperties":false}}}},"responses":{"201":{"description":"Create a site"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/admin/sites/{key}/policy":{"put":{"summary":"Replace a site moderation and abuse policy","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"privacyUrl":{"type":"string","maxLength":2000,"format":"uri"},"moderation":{"type":"string","enum":["rules","manual","webhook","llm","jev"],"default":"rules"},"reviewProbability":{"type":"number","minimum":0,"maximum":1,"default":0.5},"spamProbability":{"type":"number","minimum":0,"maximum":1,"default":0.95},"blockedTerms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100,"default":[]},"postsPerMinute":{"type":"integer","minimum":1,"maximum":1000,"default":10},"ipPostsPerMinute":{"type":"integer","minimum":1,"maximum":1000,"default":30},"imagesPerSite":{"type":"integer","minimum":0,"maximum":100000,"default":1024},"votesPerMinute":{"type":"integer","minimum":1,"maximum":1000,"default":30},"cooldownMinutes":{"type":"integer","minimum":0,"maximum":1440,"default":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Replace a site moderation and abuse policy"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/admin/sites/{key}/origins":{"put":{"summary":"Replace the set of allowed embedding origins","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"origins":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"maxItems":50}},"required":["origins"],"additionalProperties":false}}}},"responses":{"200":{"description":"Replace the set of allowed embedding origins"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/admin/comments":{"get":{"summary":"Search comments by site, text, author, page and status","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"site","in":"query"},{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Search comments by site, text, author, page and status"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/comments/{id}":{"patch":{"summary":"Moderate a comment using its observed version","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["published","pending","spam","rejected"]},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["status","version"],"additionalProperties":false}}}},"responses":{"200":{"description":"Moderate a comment using its observed version"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/admin/actors/{id}/status":{"put":{"summary":"Block or unblock a site identity","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","blocked"]}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Block or unblock a site identity"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/admin/accounts":{"get":{"summary":"Find a provisioned account by exact email","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"email","in":"query"}],"responses":{"200":{"description":"Find a provisioned account by exact email"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/accounts/{id}/ban":{"put":{"summary":"Change the account-wide posting restriction","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"blocked":{"type":"boolean"}},"required":["blocked"],"additionalProperties":false}}}},"responses":{"200":{"description":"Change the account-wide posting restriction"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}},"/v1/admin/blocks":{"get":{"summary":"List active network cooldowns","tags":["Administration"],"security":[{"session":[]}],"responses":{"200":{"description":"List active network cooldowns"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/blocks/{scope}":{"delete":{"summary":"Release a network cooldown","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"scope","in":"path"}],"responses":{"204":{"description":"Release a network cooldown"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/erasure":{"get":{"summary":"List open erasure requests","tags":["Administration"],"security":[{"session":[]}],"responses":{"200":{"description":"List open erasure requests"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/erasure/{id}/complete":{"post":{"summary":"Complete or resume a verified erasure request","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Complete or resume a verified erasure request"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/backups":{"get":{"summary":"List encrypted archives","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List encrypted archives"},"403":{"description":"Authorization or origin check failed"}}},"post":{"summary":"Create an encrypted installation archive in maintenance mode","tags":["Administration"],"security":[{"session":[]}],"responses":{"201":{"description":"Create an encrypted installation archive in maintenance mode"},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/backups/{id}":{"get":{"summary":"Download an encrypted installation archive","tags":["Administration"],"security":[{"session":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Download an encrypted installation archive","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Authorization or origin check failed"}}}},"/v1/admin/restore":{"post":{"summary":"Import an archive into an isolated maintenance installation","tags":["Administration"],"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Import an archive into an isolated maintenance installation"},"403":{"description":"Authorization or origin check failed"},"413":{"description":"Request exceeds the byte limit"}}}}}}