{"openapi":"3.1.0","info":{"title":"LoG API","version":"1.0.0","description":"HTTP and WebSocket API shared by LoG web, Tauri desktop, and future native clients. Every Log is tied to an authenticated, non-automated account; OAuth is an identity binding and does not itself prove a person's humanity. LoG never injects AI/dummy social actors or reactions. The current runtime enables only deterministic local rule-based moderation assistance and no external model. Search assistance, summaries, translation, and alt-text drafting are future-permitted policy uses, not implemented API capabilities. AI cannot autonomously publish, reply, DM, advertise, or start rooms.","license":{"name":"Proprietary"}},"servers":[{"url":"/v1","description":"Same-origin web/API proxy"},{"url":"https://log-social-api.mmm0115.workers.dev/v1","description":"Cloudflare Worker API"}],"tags":[{"name":"System"},{"name":"Auth"},{"name":"Users"},{"name":"Logs"},{"name":"Search"},{"name":"Notifications"},{"name":"Moderation"},{"name":"Media"},{"name":"Servers"},{"name":"Messages"},{"name":"Live"},{"name":"Calls"},{"name":"Realtime"},{"name":"Ads"},{"name":"Billing"}],"paths":{"/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Get service health","parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Worker, authentication provider, storage, realtime, billing, and truthful AI policy/runtime capability health","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"500":{"$ref":"#/components/responses/InternalError"}}}},"/openapi.json":{"get":{"operationId":"getOpenApiDocument","tags":["System"],"summary":"Get the OpenAPI document","parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"OpenAPI 3.1 JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocumentResponse"}}}},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/sign-up/email":{"post":{"operationId":"signUpEmail","tags":["Auth"],"summary":"Create a user account","description":"Available only when EMAIL_PASSWORD_SIGNUP_ENABLED is exactly true. Production keeps it false while no transactional email verification provider exists; use Google sign-in for a verified email. Platform AI/service identities are forbidden and automated identities are rejected by user APIs.","parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignUpEmailRequest"}}}},"responses":{"200":{"description":"Account and session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/sign-in/email":{"post":{"operationId":"signInEmail","tags":["Auth"],"summary":"Sign in with email and password","parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInEmailRequest"}}}},"responses":{"200":{"description":"Signed in","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInEmailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/sign-in/social":{"post":{"operationId":"socialSignIn","tags":["Auth"],"summary":"Start Google sign-in","description":"Available only when both GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are configured. Google must return a verified email. LoG does not create AI/dummy participants, but OAuth is not proof that a person rather than automation controls the account.","parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialSignInRequest"}}}},"responses":{"200":{"description":"Google authorization URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialSignInResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/sign-out":{"post":{"operationId":"signOut","tags":["Auth"],"summary":"Sign out the active session","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Signed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignOutResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/get-session":{"get":{"operationId":"getSession","tags":["Auth"],"summary":"Get the current session","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Current session or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/change-password":{"post":{"operationId":"changePassword","tags":["Auth"],"summary":"Change the signed-in user's password","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Password changed; token is null unless other sessions were revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/list-sessions":{"get":{"operationId":"listSessions","tags":["Auth"],"summary":"List the signed-in user's active sessions","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Active sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/list-accounts":{"get":{"operationId":"listAuthAccounts","tags":["Auth"],"summary":"List authentication methods linked to the signed-in user","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Linked credential and OAuth accounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthAccountListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/link-social":{"post":{"operationId":"linkGoogleAccount","tags":["Auth"],"summary":"Explicitly link Google to the signed-in account","description":"Requires an existing authenticated session. Better Auth verifies that the Google email matches before linking; implicit same-email linking remains disabled. Linking adds an authentication method only and never overwrites the existing LoG handle, display name, or profile image.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialSignInRequest"}}}},"responses":{"200":{"description":"Google authorization URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialSignInResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/revoke-session":{"post":{"operationId":"revokeSession","tags":["Auth"],"summary":"Revoke one active session by token","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeSessionRequest"}}}},"responses":{"200":{"description":"Session revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/revoke-other-sessions":{"post":{"operationId":"revokeOtherSessions","tags":["Auth"],"summary":"Revoke every session except the current one","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Other sessions revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/auth/delete-user":{"post":{"operationId":"deleteUser","tags":["Auth"],"summary":"Delete the signed-in account","description":"Credential accounts submit their password. OAuth-only accounts omit password and must use a fresh authenticated session. The profile is hidden and disabled in a constant-size transaction; related rows drain through bounded cleanup jobs. An account that still owns a Server receives 409 and must transfer or delete it first.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserRequest"}}}},"responses":{"200":{"description":"Account tombstoned or deletion verification initiated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/me":{"get":{"operationId":"getCurrentProfile","tags":["Users"],"summary":"Get the signed-in profile","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Current profile and settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"operationId":"updateCurrentProfile","tags":["Users"],"summary":"Update the signed-in profile","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}}},"responses":{"200":{"description":"Updated profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatedProfile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/settings":{"get":{"operationId":"getSettings","tags":["Users"],"summary":"Get privacy and notification settings","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"operationId":"updateSettings","tags":["Users"],"summary":"Update privacy and notification settings","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}}},"responses":{"200":{"description":"Settings updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/users/{handle}":{"parameters":[{"$ref":"#/components/parameters/HandlePath"}],"get":{"operationId":"getUserByHandle","tags":["Users"],"summary":"Get a public user profile","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Profile and viewer relationship","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUser"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/users/{handle}/posts":{"parameters":[{"$ref":"#/components/parameters/HandlePath"}],"get":{"operationId":"listUserPosts","tags":["Users"],"summary":"List visible Logs by a user","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Cursor-paginated Logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCursorPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/users/{handle}/followers":{"parameters":[{"$ref":"#/components/parameters/HandlePath"}],"get":{"operationId":"listUserFollowers","tags":["Users"],"summary":"List a user's visible followers","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Follower profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConnectionListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/users/{handle}/following":{"parameters":[{"$ref":"#/components/parameters/HandlePath"}],"get":{"operationId":"listUserFollowing","tags":["Users"],"summary":"List profiles followed by a user","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Followed profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConnectionListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/users/{id}/follow":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"followUser","tags":["Users"],"summary":"Follow a user or request access to a private account","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"202":{"description":"Private-account follow request is pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingFollowResponse"}}}},"204":{"description":"Public account followed or already following"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"unfollowUser","tags":["Users"],"summary":"Unfollow a user","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Unfollowed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/follow-requests":{"get":{"operationId":"listFollowRequests","tags":["Users"],"summary":"List incoming pending follow requests","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Pending follow requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowRequestListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/follow-requests/{id}/accept":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"acceptFollowRequest","tags":["Users"],"summary":"Accept an incoming follow request","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Follow request accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/follow-requests/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"delete":{"operationId":"declineFollowRequest","tags":["Users"],"summary":"Decline an incoming follow request","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Follow request declined"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/users/{id}/controls":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"createUserControl","tags":["Users"],"summary":"Mute or block a user","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserControlRequest"}}}},"responses":{"204":{"description":"Control applied"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteUserControl","tags":["Users"],"summary":"Remove a mute or block","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/ControlKindQuery"}],"responses":{"204":{"description":"Control removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/controls":{"get":{"operationId":"listUserControls","tags":["Users"],"summary":"List muted and blocked users","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/OptionalControlKindQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Current user controls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserControlsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/timeline":{"get":{"operationId":"getTimeline","tags":["Logs"],"summary":"Get a visibility-filtered timeline","description":"Recommended ranking is non-generative and explainable: the 1,000 most recent Logs form a fixed D1 candidate window, then freshness plus bounded aggregate interactions from authenticated, non-automated user accounts determine order. OAuth binds an identity but is not proof that a provider verified the operator is a person. Older Logs remain available from chronological feeds and search. LoG never authors a returned Log or injects dummy reactions.","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/TimelineKindQuery"},{"$ref":"#/components/parameters/ServerIdQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Timeline page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelineResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/drafts":{"get":{"operationId":"listDrafts","tags":["Logs"],"summary":"List the signed-in user's drafts","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Draft Logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/bookmarks":{"get":{"operationId":"listBookmarks","tags":["Logs"],"summary":"List bookmarked Logs","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Cursor-paginated bookmarked Logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCursorPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/posts":{"post":{"operationId":"createPost","tags":["Logs"],"summary":"Create a Log or draft","description":"The server ignores client authorship fields and fixes author_id to the authenticated human session. Automated and LoG AI principals are rejected. New image and video attachments are temporarily rejected with 409; the media fields remain in the contract for existing content and future clients.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostRequest"}}}},"responses":{"201":{"description":"Created Log","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/StorageUnavailable"}}}},"/posts/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getPostThread","tags":["Logs"],"summary":"Get a Log and its visible reply thread","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Log thread","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostThreadResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"operationId":"updatePost","tags":["Logs"],"summary":"Edit an owned Log or draft","description":"Existing image and video attachments can be retained or removed. Adding a new image or video attachment is temporarily rejected with 409.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostRequest"}}}},"responses":{"200":{"description":"Updated Log","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/StorageUnavailable"}}},"delete":{"operationId":"deletePost","tags":["Logs"],"summary":"Delete an owned Log or draft","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/posts/{id}/publish":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"publishDraft","tags":["Logs"],"summary":"Publish an owned draft","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Published Log","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/posts/{id}/reactions":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"addPostReaction","tags":["Logs"],"summary":"React to a Log","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionRequest"}}}},"responses":{"204":{"description":"Reaction stored"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deletePostReaction","tags":["Logs"],"summary":"Remove a reaction","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/ReactionKindQuery"}],"responses":{"204":{"description":"Reaction removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/posts/{id}/repost":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"repostPost","tags":["Logs"],"summary":"Repost a Log","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Reposted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteRepost","tags":["Logs"],"summary":"Remove a repost","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Repost removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/posts/{id}/bookmark":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"bookmarkPost","tags":["Logs"],"summary":"Bookmark a Log","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Bookmarked"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteBookmark","tags":["Logs"],"summary":"Remove a bookmark","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Bookmark removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/search":{"get":{"operationId":"search","tags":["Search"],"summary":"Search users, Logs, Live, active Open Calls, Servers, and hashtags","description":"Open Call results are returned only when the viewer has an active, non-automated product profile whose auth_user_id equals its Better Auth user id. Muted creators and either-direction blocks are excluded. Results come from fixed recent state-indexed candidate windows and require the real creator to be actively connected; LoG never injects AI or dummy participants.","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/SearchQuery"},{"$ref":"#/components/parameters/SearchTypeQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Cross-product search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/discovery":{"get":{"operationId":"getDiscovery","tags":["Search"],"summary":"Get suggested people, active Live rooms, and trending hashtags","description":"Uses aggregate human relationship and activity signals over fixed windows: up to 1,000 recent accounts plus authors of the 1,000 most recent public Logs, and 200 recent public Live rooms. This bounds D1 reads while keeping established people with current public activity discoverable. Older inactive candidates remain available through search/following. It does not contain AI-authored Logs or automated accounts.","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Human-signal-ranked discovery modules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/notifications":{"get":{"operationId":"listNotifications","tags":["Notifications"],"summary":"List notifications","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/NotificationKindQuery"},{"$ref":"#/components/parameters/UnreadOnlyQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Notification page and unread count","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/notifications/read":{"post":{"operationId":"markNotificationsRead","tags":["Notifications"],"summary":"Mark notifications as read","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadNotificationsRequest"}}}},"responses":{"204":{"description":"Read state updated"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/reports":{"post":{"operationId":"createReport","tags":["Moderation"],"summary":"Report content or an account","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}}},"responses":{"201":{"description":"Report accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/moderation/reports":{"get":{"operationId":"listModerationReports","tags":["Moderation"],"summary":"List the platform report queue","description":"Platform moderator/admin only. Public users and Server-scoped moderators receive 403. Target excerpts are available only in this queue; platform_role remains private to /me.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/ModerationStateQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Bounded report queue page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationReportQueue"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/moderation/reports/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"patch":{"operationId":"transitionModerationReport","tags":["Moderation"],"summary":"Review or resolve a platform report","description":"Optimistic reviewVersion transition with an immutable audit event. resolved requires a target-specific action or explicit record_only. Enforcement and the report transition commit in one D1 batch. A moderator cannot review their own report or a target they own.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationTransitionRequest"}}}},"responses":{"200":{"description":"Persisted moderation transition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationTransitionResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/moderation/ad-reports":{"get":{"operationId":"listAdModerationReports","tags":["Moderation"],"summary":"List the advertising report queue","description":"Platform moderator/admin only. Advertisers continue to receive aggregate report analytics, not reporter identities.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/ModerationStateQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Bounded ad report queue page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdModerationReportQueue"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/moderation/ad-reports/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"patch":{"operationId":"transitionAdModerationReport","tags":["Moderation"],"summary":"Review or resolve an advertising report","description":"resolved uses pause_campaign and permanently blocks this campaign. Dismissing the final blocking report restores deterministic rule approval only when the current public human-authored creative remains safe; the advertiser must still resume delivery explicitly.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationTransitionRequest"}}}},"responses":{"200":{"description":"Persisted ad moderation transition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationTransitionResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/media/inline":{"post":{"operationId":"uploadInlineMedia","tags":["Media"],"summary":"Upload size-capped free-mode media","description":"Stores up to 1,500,000 decoded bytes in D1 after MIME magic-byte validation.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InlineMediaUploadRequest"}}}},"responses":{"201":{"description":"Stored D1 media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InlineMediaResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/StorageUnavailable"}}}},"/media/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getMedia","tags":["Media"],"summary":"Get authorized media bytes","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Media bytes. The actual Content-Type is the validated stored MIME type.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/StorageUnavailable"}}},"delete":{"operationId":"deleteMedia","tags":["Media"],"summary":"Delete an owned unattached media upload","description":"Returns 409 while the media is attached to a Log, message, profile, or Server.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Media deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers":{"get":{"operationId":"listServers","tags":["Servers"],"summary":"List joined and discoverable Servers","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/ServerDiscoverQuery"},{"$ref":"#/components/parameters/ServerSearchQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Servers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createServer","tags":["Servers"],"summary":"Create a Server","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServerRequest"}}}},"responses":{"201":{"description":"Created Server with general channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServerResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getServer","tags":["Servers"],"summary":"Get Server details","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Server, channels, and members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Server"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"operationId":"updateServer","tags":["Servers"],"summary":"Update a Server","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServerRequest"}}}},"responses":{"200":{"description":"Updated Server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServerResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteServer","tags":["Servers"],"summary":"Delete an owned Server","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Server deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/transfer":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"transferServer","tags":["Servers"],"summary":"Transfer Server ownership to an existing member","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferServerRequest"}}}},"responses":{"200":{"description":"Ownership transferred; the former owner is now an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferServerResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/join":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"joinServer","tags":["Servers"],"summary":"Join a public Server","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Joined"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"leaveServer","tags":["Servers"],"summary":"Leave a Server","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Left"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/invites":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"listServerInvites","tags":["Servers"],"summary":"List Server invites","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Server invites and current lifecycle state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerInviteListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createServerInvite","tags":["Servers"],"summary":"Create a Server invite","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteRequest"}}}},"responses":{"201":{"description":"Invite created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/invites/{inviteId}":{"parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/InviteIdPath"}],"delete":{"operationId":"revokeServerInvite","tags":["Servers"],"summary":"Revoke an active Server invite","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Invite revoked"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/invites/{code}/join":{"parameters":[{"$ref":"#/components/parameters/InviteCodePath"}],"post":{"operationId":"joinServerInvite","tags":["Servers"],"summary":"Join using a Server invite","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Joined Server id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinInviteResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/members/{userId}":{"parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/UserIdPath"}],"patch":{"operationId":"updateServerMemberRole","tags":["Servers"],"summary":"Change a Server member's role","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleRequest"}}}},"responses":{"200":{"description":"Member role updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"removeServerMember","tags":["Servers"],"summary":"Remove a Server member","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Member removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/members":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"listServerMembers","tags":["Servers"],"summary":"List visible Server members","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/ServerMemberSearchQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Cursor-paginated Server members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerMemberListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/bans":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"listServerBans","tags":["Servers"],"summary":"List users banned from a Server","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Server bans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerBanListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/bans/{userId}":{"parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/UserIdPath"}],"post":{"operationId":"banServerMember","tags":["Servers"],"summary":"Ban a user from a Server","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BanMemberRequest"}}}},"responses":{"204":{"description":"User banned and membership removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"unbanServerMember","tags":["Servers"],"summary":"Remove a Server ban","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Ban removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/servers/{id}/channels":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"createServerChannel","tags":["Servers"],"summary":"Create a Server channel","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChannelRequest"}}}},"responses":{"201":{"description":"Channel created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChannelResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/channels/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getServerChannel","tags":["Servers"],"summary":"Get a Server channel and viewer read state","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Channel details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"operationId":"updateServerChannel","tags":["Servers"],"summary":"Update a Server channel","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChannelRequest"}}}},"responses":{"200":{"description":"Updated channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteServerChannel","tags":["Servers"],"summary":"Delete a Server channel","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Channel deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/channels/{id}/read":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"markChannelRead","tags":["Messages"],"summary":"Advance the viewer's channel read timestamp","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Read timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelReadResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/channels/{id}/messages":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"listChannelMessages","tags":["Messages"],"summary":"List channel messages","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/BeforeQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Message page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createChannelMessage","tags":["Messages"],"summary":"Create a channel message","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageRequest"}}}},"responses":{"201":{"description":"Message stored and broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/channels/{id}/connect":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"connectChannel","tags":["Realtime"],"summary":"Connect to channel chat or voice","description":"Cookie-authenticated HTTP Upgrade to a hibernation-capable WebSocket. Browser clients must send an Origin matching APP_ORIGIN or AUTH_BASE_URL; missing and cross-site origins are rejected to prevent WebSocket hijacking. Future native clients require an explicit allowed Origin until token-based WebSocket authentication is introduced. Send WebSocketClientEvent JSON text frames and receive WebSocketServerEvent JSON text frames. Binary frames are rejected.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/WebSocketUpgradeHeader"},{"$ref":"#/components/parameters/WebSocketConnectionHeader"},{"$ref":"#/components/parameters/WebSocketOriginHeader"}],"responses":{"101":{"description":"Switching Protocols. The first server frame is room.ready.","headers":{"Upgrade":{"schema":{"type":"string","const":"websocket"}},"Connection":{"schema":{"type":"string"}}},"x-log-client-event-schema":{"$ref":"#/components/schemas/WebSocketClientEvent"},"x-log-server-event-schema":{"$ref":"#/components/schemas/WebSocketServerEvent"}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"426":{"$ref":"#/components/responses/UpgradeRequired"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/conversations":{"get":{"operationId":"listConversations","tags":["Messages"],"summary":"List DM conversations","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Conversations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createConversation","tags":["Messages"],"summary":"Create or reuse a DM conversation","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationRequest"}}}},"responses":{"200":{"description":"Existing conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"201":{"description":"Created conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/conversations/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getConversation","tags":["Messages"],"summary":"Get a DM conversation and member read states","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Conversation details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetailResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/conversations/{id}/read":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"markConversationRead","tags":["Messages"],"summary":"Advance the viewer's conversation read timestamp","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Read timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationReadResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/conversations/{id}/messages":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"listConversationMessages","tags":["Messages"],"summary":"List DM messages","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/BeforeQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Message page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createConversationMessage","tags":["Messages"],"summary":"Create a DM message","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageRequest"}}}},"responses":{"201":{"description":"Message stored, notified, and broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedMessage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/conversations/{id}/connect":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"connectConversation","tags":["Realtime"],"summary":"Connect to realtime DM chat","description":"Cookie-authenticated HTTP Upgrade to a hibernation-capable WebSocket. Browser clients must send an Origin matching APP_ORIGIN or AUTH_BASE_URL; missing and cross-site origins are rejected to prevent WebSocket hijacking. Future native clients require an explicit allowed Origin until token-based WebSocket authentication is introduced. Send WebSocketClientEvent JSON text frames and receive WebSocketServerEvent JSON text frames. Binary frames are rejected.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/WebSocketUpgradeHeader"},{"$ref":"#/components/parameters/WebSocketConnectionHeader"},{"$ref":"#/components/parameters/WebSocketOriginHeader"}],"responses":{"101":{"description":"Switching Protocols. The first server frame is room.ready.","headers":{"Upgrade":{"schema":{"type":"string","const":"websocket"}},"Connection":{"schema":{"type":"string"}}},"x-log-client-event-schema":{"$ref":"#/components/schemas/WebSocketClientEvent"},"x-log-server-event-schema":{"$ref":"#/components/schemas/WebSocketServerEvent"}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"426":{"$ref":"#/components/responses/UpgradeRequired"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/messages/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"patch":{"operationId":"updateMessage","tags":["Messages"],"summary":"Edit an owned message","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageRequest"}}}},"responses":{"200":{"description":"Message edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatedMessageResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteMessage","tags":["Messages"],"summary":"Delete an owned message","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Message deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/messages/{id}/reactions":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"addMessageReaction","tags":["Messages"],"summary":"React to a message","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionRequest"}}}},"responses":{"204":{"description":"Reaction stored"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/messages/{id}/reactions/{kind}":{"parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/ReactionKindPath"}],"delete":{"operationId":"deleteMessageReaction","tags":["Messages"],"summary":"Remove a message reaction","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Reaction removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live":{"get":{"operationId":"listLiveRooms","tags":["Live"],"summary":"List public scheduled and active Live rooms","description":"Uses a fixed recent candidate window per room state before applying viewer visibility and ordering; the response reports the exact candidate limit.","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/LiveStateQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Discoverable Live rooms","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createLive","tags":["Live"],"summary":"Create or schedule a Live","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLiveRequest"}}}},"responses":{"201":{"description":"Scheduled Live","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLiveResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getLive","tags":["Live"],"summary":"Get an accessible Live","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Live details and participants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveDetail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"operationId":"updateLive","tags":["Live"],"summary":"Update a scheduled Live","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLiveRequest"}}}},"responses":{"200":{"description":"Live updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"cancelLive","tags":["Live"],"summary":"Cancel a scheduled Live","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Live cancelled"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live/{id}/start":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"startLive","tags":["Live"],"summary":"Start a scheduled Live","description":"Changes the room lifecycle to live. It does not notify reminder recipients yet. live_started notifications are emitted once only after the first host, cohost, or speaker WebSocket upgrade succeeds.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Live started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveStateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live/{id}/end":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"endLive","tags":["Live"],"summary":"End an active Live","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Live ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveStateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live/{id}/reminder":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"createLiveReminder","tags":["Live"],"summary":"Set a Live reminder","description":"At most 100 accounts can register for one Live so notification fan-out remains bounded on the free plan.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Reminder set"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteLiveReminder","tags":["Live"],"summary":"Remove a Live reminder","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Reminder removed"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live/{id}/speaker-request":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"createLiveSpeakerRequest","tags":["Live"],"summary":"Raise a hand to speak","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Speaker request created"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteLiveSpeakerRequest","tags":["Live"],"summary":"Cancel a speaker request","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Speaker request cancelled"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live/{id}/role":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"patch":{"operationId":"updateLiveRole","tags":["Live"],"summary":"Change a participant role","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveRoleRequest"}}}},"responses":{"200":{"description":"Role updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveRoleResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/live/{id}/connect":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"connectLive","tags":["Realtime"],"summary":"Connect to Live audio signaling","description":"Cookie-authenticated HTTP Upgrade to a hibernation-capable WebSocket. Browser clients must send an Origin matching APP_ORIGIN or AUTH_BASE_URL; missing and cross-site origins are rejected to prevent WebSocket hijacking. Future native clients require an explicit allowed Origin until token-based WebSocket authentication is introduced. Send WebSocketClientEvent JSON text frames and receive WebSocketServerEvent JSON text frames. Binary frames are rejected.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/WebSocketUpgradeHeader"},{"$ref":"#/components/parameters/WebSocketConnectionHeader"},{"$ref":"#/components/parameters/WebSocketOriginHeader"}],"responses":{"101":{"description":"Switching Protocols. The first server frame is room.ready.","headers":{"Upgrade":{"schema":{"type":"string","const":"websocket"}},"Connection":{"schema":{"type":"string"}}},"x-log-client-event-schema":{"$ref":"#/components/schemas/WebSocketClientEvent"},"x-log-server-event-schema":{"$ref":"#/components/schemas/WebSocketServerEvent"}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"426":{"$ref":"#/components/responses/UpgradeRequired"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls":{"get":{"operationId":"listCalls","tags":["Calls"],"summary":"List accessible Calls","description":"Uses a fixed recent candidate window per Call state before applying access checks and ordering; the response reports the exact candidate limit.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/CallKindQuery"},{"$ref":"#/components/parameters/CallStateQuery"},{"$ref":"#/components/parameters/CursorQuery"},{"$ref":"#/components/parameters/LimitQuery"}],"responses":{"200":{"description":"Calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createCall","tags":["Calls"],"summary":"Create an Open, direct, or Server Call","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallRequest"}}}},"responses":{"201":{"description":"Call created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCallResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getCall","tags":["Calls"],"summary":"Get an accessible Call","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Call and participants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"operationId":"updateCall","tags":["Calls"],"summary":"Update an owned Call","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCallRequest"}}}},"responses":{"200":{"description":"Call updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteCall","tags":["Calls"],"summary":"End an owned Call","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Call ended"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls/{id}/join":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"joinCall","tags":["Calls"],"summary":"Join an accessible Call","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Joined"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls/{id}/decline":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"declineCallInvite","tags":["Calls"],"summary":"Decline a pending direct Call invitation","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Invitation declined"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls/{id}/leave":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"leaveCall","tags":["Calls"],"summary":"Leave an active Call as a participant","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Call left"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls/{id}/end":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"endCall","tags":["Calls"],"summary":"End an owned Call","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Call ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallEndResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/calls/{id}/connect":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"connectCall","tags":["Realtime"],"summary":"Connect to Call audio signaling","description":"Cookie-authenticated HTTP Upgrade to a hibernation-capable WebSocket. Browser clients must send an Origin matching APP_ORIGIN or AUTH_BASE_URL; missing and cross-site origins are rejected to prevent WebSocket hijacking. Future native clients require an explicit allowed Origin until token-based WebSocket authentication is introduced. Send WebSocketClientEvent JSON text frames and receive WebSocketServerEvent JSON text frames. Binary frames are rejected.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/WebSocketUpgradeHeader"},{"$ref":"#/components/parameters/WebSocketConnectionHeader"},{"$ref":"#/components/parameters/WebSocketOriginHeader"}],"responses":{"101":{"description":"Switching Protocols. The first server frame is room.ready.","headers":{"Upgrade":{"schema":{"type":"string","const":"websocket"}},"Connection":{"schema":{"type":"string"}}},"x-log-client-event-schema":{"$ref":"#/components/schemas/WebSocketClientEvent"},"x-log-server-event-schema":{"$ref":"#/components/schemas/WebSocketServerEvent"}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"426":{"$ref":"#/components/responses/UpgradeRequired"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads/billing":{"get":{"operationId":"getAdBilling","tags":["Billing"],"summary":"Get advertising credit, packages, and payment history","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Advertiser balance, fixed-price packages, recent orders, capacity, and runtime Checkout availability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdBillingResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads/billing/checkout":{"post":{"operationId":"createAdCheckout","tags":["Billing"],"summary":"Create a one-time advertising credit Checkout","description":"Requires a verified email and active advertiser account. Price, currency, and credit are selected exclusively from the server-side package catalog; the request cannot submit economic terms. The hosted Checkout URL is one-time payment only and does not create a subscription. A successful browser redirect is not proof of payment: credit is posted only after a verified Stripe webhook is reconciled to the D1 order.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/RequiredIdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdCheckoutRequest"}}}},"responses":{"201":{"description":"Pending order and hosted Stripe Checkout URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdCheckoutResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/BillingUnavailable"}}}},"/billing/stripe/webhook":{"post":{"operationId":"receiveStripeWebhook","tags":["Billing"],"summary":"Receive a signed Stripe payment event","description":"Public provider callback authenticated from the exact raw request bytes using Stripe-Signature. Event metadata never determines price or credit; processing reconciles the provider object to an existing immutable D1 order and is idempotent by Stripe event id.","parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/StripeSignatureHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeWebhookEventRequest"}}}},"responses":{"200":{"description":"Event accepted, reconciled, or already processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeWebhookResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/BillingUnavailable"}}}},"/ads/serve":{"get":{"operationId":"serveAd","tags":["Ads"],"summary":"Select an eligible sponsored Log","description":"An indexed global pacing ratio first selects the 250 most under-delivered active approved campaigns. Context targeting, frequency caps, and safety filters are then evaluated only in that fixed window. This bounds D1 reads without permanently starving an older active campaign; campaigns outside the window re-enter as their delivery ratio becomes comparatively lower.","security":[{"cookieAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/AdPlacementQuery"},{"$ref":"#/components/parameters/LanguageQuery"},{"$ref":"#/components/parameters/TagsQuery"}],"responses":{"200":{"description":"Sponsored Log or null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdServeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads":{"get":{"operationId":"listAds","tags":["Ads"],"summary":"List the advertiser account and campaigns","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Advertiser data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"operationId":"createAd","tags":["Ads"],"summary":"Create an advertising campaign","description":"Creative must be the advertiser's visible public Log from an authenticated, non-automated account. Credit is reserved atomically. Each account is limited to 20 creations per rolling day, 100 non-ended campaigns, and 3 active campaigns. LoG AI cannot create an ad creative.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"},{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdRequest"}}}},"responses":{"201":{"description":"Draft campaign with rule-based review","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads/{id}":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"patch":{"operationId":"updateAd","tags":["Ads"],"summary":"Edit an owned draft or paused campaign","description":"An active campaign must be paused before editing. Replacing the creative reruns rule-based review.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdRequest"}}}},"responses":{"200":{"description":"Updated campaign and review state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"operationId":"deleteAd","tags":["Ads"],"summary":"Delete an owned unspent draft or paused campaign","description":"Delivered or ended campaigns remain available for accounting and analytics and cannot be deleted.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"204":{"description":"Campaign deleted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads/{id}/events":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"recordAdEvent","tags":["Ads"],"summary":"Record a signed ad event","description":"The signed serve nonce is single-use per event. Clicks are accepted only after and linked to a recorded viewable impression for the same viewer and serve nonce.","parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdEventRequest"}}}},"responses":{"202":{"description":"Event accepted or already deduplicated"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads/{id}/state":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"patch":{"operationId":"updateAdState","tags":["Ads"],"summary":"Change an owned campaign state","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdStateRequest"}}}},"responses":{"200":{"description":"Campaign state updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdStateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads/{id}/analytics":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"get":{"operationId":"getAdAnalytics","tags":["Ads"],"summary":"Get owned campaign analytics","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"responses":{"200":{"description":"Campaign, daily metrics, and privacy-preserving report summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdAnalyticsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/ads/{id}/report":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"post":{"operationId":"reportAd","tags":["Ads"],"summary":"Report an ad campaign","description":"Requires a recent signed serve token proving campaign exposure. The reporter immediately stops receiving the campaign; global campaign action remains a moderation decision or requires corroborated distinct reports, preventing one account from disabling paid delivery. Advertisers see only aggregate report states and reasons.","security":[{"cookieAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestIdHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdReportRequest"}}}},"responses":{"201":{"description":"Ad report accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"components":{"securitySchemes":{"cookieAuth":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Better Auth session cookie. Secure deployments may use the __Secure- prefix."}},"parameters":{"RequestIdHeader":{"name":"X-Request-Id","in":"header","required":false,"description":"Optional caller request id; truncated to 128 characters and echoed in the response.","schema":{"type":"string","maxLength":128}},"IdempotencyKeyHeader":{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional authenticated POST retry key. Reusing the same user, method, path, key, query, and body replays the stored response; reusing a key with different content returns 409.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"}},"RequiredIdempotencyKeyHeader":{"name":"Idempotency-Key","in":"header","required":true,"description":"Required unique retry key for creating a financial order. Reusing the same key and request replays the original result; changing the request returns 409.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]{8,128}$"}},"StripeSignatureHeader":{"name":"Stripe-Signature","in":"header","required":true,"description":"Stripe webhook timestamp and v1 HMAC signatures. Verification uses the unmodified request bytes and a bounded timestamp tolerance.","schema":{"type":"string","minLength":1,"maxLength":4096}},"IdPath":{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":96}},"UserIdPath":{"name":"userId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":96}},"InviteIdPath":{"name":"inviteId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":96}},"RequesterIdPath":{"name":"requesterId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":96}},"HandlePath":{"name":"handle","in":"path","required":true,"schema":{"type":"string","pattern":"^@?[a-zA-Z0-9_]{1,24}$"}},"InviteCodePath":{"name":"code","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},"ReactionKindPath":{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["like","love","laugh","surprise","sad","boost"]}},"CursorQuery":{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":256}},"LimitQuery":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":30}},"TimelineKindQuery":{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["recommended","following","latest","media","live"],"default":"recommended"}},"ServerIdQuery":{"name":"serverId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":96}},"ControlKindQuery":{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["mute","block"]}},"OptionalControlKindQuery":{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["mute","block"]}},"ReactionKindQuery":{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["like","love","laugh","surprise","sad","boost"],"default":"like"}},"SearchQuery":{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},"SearchTypeQuery":{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["all","posts","users","live","calls","servers","tags"],"default":"all"}},"NotificationKindQuery":{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":64}},"ModerationStateQuery":{"name":"state","in":"query","required":false,"description":"Exact moderation queue state; defaults to open so every query uses the bounded state/cursor index.","schema":{"type":"string","enum":["open","reviewing","resolved","dismissed"],"default":"open"}},"UnreadOnlyQuery":{"name":"unreadOnly","in":"query","required":false,"schema":{"type":"boolean","default":false}},"ServerDiscoverQuery":{"name":"discover","in":"query","required":false,"description":"true returns public Servers the viewer has not joined; false returns joined Servers only.","schema":{"type":"boolean"}},"ServerSearchQuery":{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},"ServerMemberSearchQuery":{"name":"q","in":"query","required":false,"description":"Case-insensitive handle or display-name filter.","schema":{"type":"string","maxLength":100}},"LiveStateQuery":{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["scheduled","live"]}},"CallKindQuery":{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["open","direct","server"]}},"CallStateQuery":{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["open","active"]}},"BeforeQuery":{"name":"before","in":"query","required":false,"description":"Opaque continuation cursor returned by the previous message page.","schema":{"type":"string","maxLength":256}},"AdPlacementQuery":{"name":"placement","in":"query","required":false,"schema":{"type":"string","enum":["timeline","search","sidebar"],"default":"timeline"}},"LanguageQuery":{"name":"language","in":"query","required":false,"schema":{"type":"string","default":"ja"}},"TagsQuery":{"name":"tags","in":"query","required":false,"description":"Comma-separated lowercase context tags, up to 20.","schema":{"type":"string"}},"WebSocketUpgradeHeader":{"name":"Upgrade","in":"header","required":true,"schema":{"type":"string","const":"websocket"}},"WebSocketConnectionHeader":{"name":"Connection","in":"header","required":true,"schema":{"type":"string","pattern":".*[Uu][Pp][Gg][Rr][Aa][Dd][Ee].*"}},"WebSocketOriginHeader":{"name":"Origin","in":"header","required":true,"description":"Must exactly match the configured LoG application or authentication origin.","schema":{"type":"string","format":"uri"}}},"responses":{"BadRequest":{"description":"Malformed or semantically invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Unauthorized":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"PaymentRequired":{"description":"Available advertising credit is insufficient","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"BillingUnavailable":{"description":"Advertising Checkout is disabled, misconfigured, or temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Forbidden":{"description":"Authenticated but not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"NotFound":{"description":"Resource is absent or hidden by its visibility policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Conflict":{"description":"State conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"RateLimited":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"StorageUnavailable":{"description":"Configured storage is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"PayloadTooLarge":{"description":"Request payload exceeds the endpoint's size limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"UpgradeRequired":{"description":"WebSocket Upgrade header required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"InternalError":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"schemas":{"ErrorCode":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","RATE_LIMITED","CONFLICT","MODERATION_CONFLICT","MODERATION_REVIEWER_CONFLICT","MODERATION_TARGET_UNAVAILABLE","QUOTA_EXCEEDED","STORAGE_UNAVAILABLE","BILLING_UNAVAILABLE","PAYMENT_REQUIRED","INTERNAL_ERROR"]},"ApiError":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"},"requestId":{"type":"string"},"details":true},"required":["code","message"]},"HealthResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"service":{"type":"string","const":"log-api"},"auth":{"type":"object","properties":{"providers":{"type":"object","properties":{"emailPassword":{"type":"object","properties":{"enabled":{"type":"boolean","const":true,"description":"Existing credential accounts can sign in"},"signInEnabled":{"type":"boolean","const":true},"signUpEnabled":{"type":"boolean","description":"Runtime capability; false by default and in production without verified email delivery"}},"required":["enabled","signInEnabled","signUpEnabled"]},"google":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}},"required":["emailPassword","google"]}},"required":["providers"]},"storage":{"type":"object","properties":{"d1":{"type":"boolean"},"inlineMedia":{"type":"boolean"},"r2":{"type":"boolean"},"scheduledMaintenance":{"type":"object","properties":{"intervalMinutes":{"type":"integer","const":60},"maximumWritesPerDay":{"type":"integer","const":40080},"maximumAcceptedAdEventsPerDay":{"type":"integer","const":2000},"maximumWritesPerAcceptedAdEvent":{"type":"integer","const":12},"maximumAdEventWritesPerDay":{"type":"integer","const":24000},"paymentObligationIntervalMinutes":{"type":"integer","const":15},"paymentObligationRunsPerDay":{"type":"integer","const":96},"paymentObligationMaximumJobsPerRun":{"type":"integer","const":1},"paymentObligationMaximumWritesPerRun":{"type":"integer","const":32},"paymentObligationMaximumWritesPerDay":{"type":"integer","const":3072},"capacityPressureMaximumQueriesPerRun":{"type":"integer","const":13},"capacityPressureMaximumWritesPerRun":{"type":"integer","const":512},"capacityPressureMaximumWritesPerDay":{"type":"integer","const":12288},"reservedWritesPerDay":{"type":"integer","const":79440},"ordinaryTrafficWritesRemaining":{"type":"integer","const":20560},"maximumAuthenticatedMutationsPerRollingDay":{"type":"integer","const":1200},"maximumAuthenticatedMutationsPerUserPerRollingDay":{"type":"integer","const":120},"maximumSafetyMutationsPerRollingDay":{"type":"integer","const":300},"maximumSafetyMutationsPerUserPerRollingDay":{"type":"integer","const":30},"d1FreeWritesPerDay":{"type":"integer","const":100000},"capacityPressure":{"type":"object","properties":{"measurement":{"type":"string","const":"d1-meta-size-after"},"databaseLimitBytes":{"type":"integer","const":500000000},"startsAtBytes":{"type":"integer","const":425000000},"startsAtPercent":{"type":"integer","const":85},"targetBytes":{"type":"integer","const":375000000},"targetPercent":{"type":"integer","const":75},"minimumRetentionDays":{"type":"integer","const":90},"protectedRecentPosts":{"type":"integer","const":10000},"maximumPostsPerBatch":{"type":"integer","const":5},"maximumCleanupPostsPerSweep":{"type":"integer","const":5},"maximumChildRowsPerBatch":{"type":"integer","const":5},"maximumInlineMediaRowsPerBatch":{"type":"integer","const":1},"candidateWindow":{"type":"integer","const":200},"maximumPostsPerCycle":{"type":"integer","const":10000},"rearmGrowthBytes":{"type":"integer","const":5000000},"rearmCooldownHours":{"type":"integer","const":24},"leaseSeconds":{"type":"integer","const":300},"hardDeletePosts":{"type":"boolean","const":false},"draftsExcluded":{"type":"boolean","const":true},"advertisingCreativesExcluded":{"type":"boolean","const":true},"reportedPostsExcluded":{"type":"boolean","const":true},"moderationEvidenceExcluded":{"type":"boolean","const":true},"noRestoreGuarantee":{"type":"boolean","const":true}},"required":["measurement","databaseLimitBytes","startsAtBytes","startsAtPercent","targetBytes","targetPercent","minimumRetentionDays","protectedRecentPosts","maximumPostsPerBatch","maximumCleanupPostsPerSweep","maximumChildRowsPerBatch","maximumInlineMediaRowsPerBatch","candidateWindow","maximumPostsPerCycle","rearmGrowthBytes","rearmCooldownHours","leaseSeconds","hardDeletePosts","draftsExcluded","advertisingCreativesExcluded","reportedPostsExcluded","moderationEvidenceExcluded","noRestoreGuarantee"]}},"required":["intervalMinutes","maximumWritesPerDay","maximumAcceptedAdEventsPerDay","maximumWritesPerAcceptedAdEvent","maximumAdEventWritesPerDay","paymentObligationIntervalMinutes","paymentObligationRunsPerDay","paymentObligationMaximumJobsPerRun","paymentObligationMaximumWritesPerRun","paymentObligationMaximumWritesPerDay","capacityPressureMaximumQueriesPerRun","capacityPressureMaximumWritesPerRun","capacityPressureMaximumWritesPerDay","reservedWritesPerDay","ordinaryTrafficWritesRemaining","maximumAuthenticatedMutationsPerRollingDay","maximumAuthenticatedMutationsPerUserPerRollingDay","maximumSafetyMutationsPerRollingDay","maximumSafetyMutationsPerUserPerRollingDay","d1FreeWritesPerDay","capacityPressure"]}},"required":["d1","inlineMedia","r2","scheduledMaintenance"]},"realtime":{"type":"object","properties":{"signaling":{"type":"string"},"media":{"type":"string"},"paidSfuEnabled":{"type":"boolean"},"limits":{"type":"object","properties":{"liveConnections":{"type":"integer","const":16},"liveRemindersPerRoom":{"type":"integer","const":100,"description":"Maximum reminder recipients and live_started notification fan-out for one Live"},"callOrVoiceConnections":{"type":"integer","const":8},"textChatConnections":{"type":"integer","const":50},"connectionsPerUserPerRoom":{"type":"integer","const":1},"websocketConnectsPerIpPerMinute":{"type":"integer","const":30},"heavyReadsPerIpPerHour":{"type":"integer","const":120},"adServeReadsPerIpPerHour":{"type":"integer","const":300},"genericReadsPerIpPerHour":{"type":"integer","const":600},"mediaReadsPerIpPerHour":{"type":"integer","const":1200},"authCallbacksPerIpPerMinute":{"type":"integer","const":60},"textEnvelopesPer10Seconds":{"type":"integer","const":140},"signalingMessagesPer10Seconds":{"type":"integer","const":120},"controlMessagesPer10Seconds":{"type":"integer","const":20},"typingStateMinimumIntervalMs":{"type":"integer","const":2000},"senderIdentityRevalidationTtlSeconds":{"type":"integer","const":60},"hibernationWakeChecksSender":{"type":"boolean","const":true}},"required":["liveConnections","liveRemindersPerRoom","callOrVoiceConnections","textChatConnections","connectionsPerUserPerRoom","websocketConnectsPerIpPerMinute","heavyReadsPerIpPerHour","adServeReadsPerIpPerHour","genericReadsPerIpPerHour","mediaReadsPerIpPerHour","authCallbacksPerIpPerMinute","textEnvelopesPer10Seconds","signalingMessagesPer10Seconds","controlMessagesPer10Seconds","typingStateMinimumIntervalMs","senderIdentityRevalidationTtlSeconds","hibernationWakeChecksSender"]}},"required":["signaling","media","paidSfuEnabled","limits"]},"billing":{"type":"object","properties":{"mode":{"type":"string","const":"free_locked","description":"Cloudflare infrastructure billing remains owner-approved and separate from advertiser Checkout."},"automaticPaidUpgrade":{"type":"boolean","const":false},"advertisingPayments":{"$ref":"#/components/schemas/AdvertisingPaymentStatus"}},"required":["mode","automaticPaidUpgrade","advertisingPayments"]},"ai":{"type":"object","properties":{"autonomousPosting":{"type":"boolean","const":false,"description":"LoG AI cannot publish or act as a social account."},"externalModelEnabled":{"type":"boolean","const":false,"description":"No external LLM/model provider is enabled in the current runtime."},"policyAllowedUses":{"type":"array","description":"Policy allow-list, not a runtime capability list. Uses absent from enabledUses are future-permitted only and have no current API implementation.","items":{"type":"string","enum":["moderation-assist","search-assist","summary","translation","alt-text-draft"]}},"enabledUses":{"type":"array","description":"Currently implemented AI-adjacent capability. Only deterministic local rule-based moderation assistance is enabled.","items":{"type":"string","enum":["moderation-assist"]}}},"required":["autonomousPosting","externalModelEnabled","policyAllowedUses","enabledUses"]}},"required":["ok","service","auth","storage","realtime","billing","ai"]},"OpenApiDocumentResponse":{"type":"object","properties":{"openapi":{"type":"string","pattern":"^3\\.1\\."},"info":{"type":"object","properties":{"title":{"type":"string"},"version":{"type":"string"},"description":{"type":"string"}},"required":["title","version"]},"paths":{"type":"object","additionalProperties":true},"components":{"type":"object","additionalProperties":true}},"required":["openapi","info","paths","components"]},"SignUpEmailRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"handle":{"type":"string","pattern":"^[a-z0-9_]{3,24}$"},"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":10,"maxLength":128},"image":{"type":"string","format":"uri"},"callbackURL":{"type":"string","format":"uri"},"rememberMe":{"type":"boolean"}},"required":["name","handle","email","password"]},"SignInEmailRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":10,"maxLength":128},"callbackURL":{"type":"string","format":"uri"},"rememberMe":{"type":"boolean","default":true}},"required":["email","password"]},"SocialSignInRequest":{"type":"object","properties":{"provider":{"type":"string","const":"google"},"callbackURL":{"type":"string","format":"uri"},"errorCallbackURL":{"type":"string","format":"uri"},"disableRedirect":{"type":"boolean"}},"required":["provider"]},"AuthUser":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"email":{"type":"string","format":"email"},"emailVerified":{"type":"boolean"},"image":{"type":["string","null"]},"handle":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","email","emailVerified","handle","createdAt","updatedAt"]},"AuthSession":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"userId":{"type":"string","minLength":1,"maxLength":96},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"token":{"type":"string"},"ipAddress":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","userId","expiresAt","createdAt","updatedAt","token"]},"AuthResponse":{"type":"object","properties":{"token":{"type":["string","null"]},"user":{"$ref":"#/components/schemas/AuthUser"}},"required":["user"]},"SignInEmailResponse":{"type":"object","properties":{"redirect":{"type":"boolean"},"token":{"type":"string"},"url":{"type":["string","null"]},"user":{"$ref":"#/components/schemas/AuthUser"}},"required":["redirect","token","user"]},"SocialSignInResponse":{"type":"object","properties":{"redirect":{"type":"boolean"},"url":{"type":"string","format":"uri"}},"required":["redirect"]},"SessionResponse":{"oneOf":[{"type":"object","properties":{"session":{"$ref":"#/components/schemas/AuthSession"},"user":{"$ref":"#/components/schemas/AuthUser"}},"required":["session","user"]},{"type":"null"}]},"SignOutResponse":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"ChangePasswordRequest":{"type":"object","properties":{"currentPassword":{"type":"string","minLength":1},"newPassword":{"type":"string","minLength":10,"maxLength":128},"revokeOtherSessions":{"type":"boolean"}},"required":["currentPassword","newPassword"]},"RevokeSessionRequest":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"]},"DeleteUserRequest":{"type":"object","properties":{"callbackURL":{"type":"string","format":"uri"},"password":{"type":"string"},"token":{"type":"string"}}},"StatusResponse":{"type":"object","properties":{"status":{"type":"boolean"}},"required":["status"]},"SessionListResponse":{"type":"array","items":{"$ref":"#/components/schemas/AuthSession"}},"AuthAccount":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"accountId":{"type":"string"},"providerId":{"type":"string"},"userId":{"type":"string","minLength":1,"maxLength":96},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","providerId","userId","scopes","createdAt","updatedAt"]},"AuthAccountListResponse":{"type":"array","items":{"$ref":"#/components/schemas/AuthAccount"}},"DeleteUserResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]},"UpdateProfileRequest":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":80},"bio":{"type":"string","maxLength":500},"website":{"type":["string","null"],"format":"uri","pattern":"^https?://","maxLength":300},"location":{"type":["string","null"],"maxLength":100},"avatarMediaId":{"type":["string","null"],"format":"uuid"},"headerMediaId":{"type":["string","null"],"format":"uuid"}}},"CurrentProfile":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"header_key":{"type":["string","null"]},"bio":{"type":"string"},"website":{"type":["string","null"]},"location":{"type":["string","null"]},"is_verified":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"is_private":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"account_status":{"type":"string","enum":["active","limited","suspended","deleted"]},"platform_role":{"type":"string","enum":["user","moderator","admin"],"description":"Platform-wide role. Returned only by /me, never by public user endpoints."},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"updated_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"default_visibility":{"type":"string","enum":["public","followers","mutuals"]},"dm_policy":{"type":"string","enum":["everyone","following","mutuals","nobody"]},"sensitive_media":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"locale":{"type":"string"},"follower_count":{"type":"integer","minimum":0},"following_count":{"type":"integer","minimum":0},"post_count":{"type":"integer","minimum":0,"maximum":1000,"description":"Logs visible to the authenticated profile owner, saturated at 1,000."},"post_count_capped":{"type":"boolean","description":"True when the exact visible Log count is greater than 1,000."}},"required":["id","handle","display_name","bio","is_verified","is_private","account_status","platform_role","created_at","updated_at"]},"UpdatedProfile":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"header_key":{"type":["string","null"]},"bio":{"type":"string"},"website":{"type":["string","null"]},"location":{"type":["string","null"]},"is_verified":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"is_private":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"platform_role":{"type":"string","enum":["user","moderator","admin"]},"updated_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","handle","display_name","bio","is_verified","is_private","platform_role","updated_at"]},"UserRelation":{"type":"object","properties":{"following":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"follows_you":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"muted":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"follow_request":{"type":["string","null"],"enum":["pending","accepted","declined","cancelled",null]}},"required":["following","follows_you","muted"]},"PublicUser":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"header_key":{"type":["string","null"]},"bio":{"type":"string"},"website":{"type":["string","null"]},"location":{"type":["string","null"]},"is_verified":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"is_private":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"follower_count":{"type":"integer"},"following_count":{"type":"integer"},"post_count":{"type":"integer","minimum":0,"maximum":1000,"description":"Logs visible to the current viewer, saturated at 1,000; public Logs only for guests."},"post_count_capped":{"type":"boolean"},"relation":{"$ref":"#/components/schemas/UserRelation"}},"required":["id","handle","display_name"]},"UserControlRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["mute","block"]}},"required":["kind"]},"UserControl":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"target_id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","enum":["mute","block"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"bio":{"type":"string"},"is_verified":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"}},"required":["id","target_id","kind","created_at","handle","display_name"]},"UserControlsResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserControl"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"NotificationSettings":{"type":"object","properties":{"follows":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"reactions":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"replies":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"mentions":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"live":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"messages":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"}},"required":["follows","reactions","replies","mentions","live","messages"]},"UpdateNotificationSettings":{"type":"object","properties":{"follows":{"type":"boolean"},"reactions":{"type":"boolean"},"replies":{"type":"boolean"},"mentions":{"type":"boolean"},"live":{"type":"boolean"},"messages":{"type":"boolean"}}},"SettingsResponse":{"type":"object","properties":{"default_visibility":{"type":"string","enum":["public","followers","mutuals"]},"dm_policy":{"type":"string","enum":["everyone","following","mutuals","nobody"]},"sensitive_media":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"locale":{"type":"string"},"is_private":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"notifications":{"$ref":"#/components/schemas/NotificationSettings"}},"required":["default_visibility","dm_policy","sensitive_media","locale","is_private","notifications"]},"UpdateSettingsRequest":{"type":"object","properties":{"defaultVisibility":{"type":"string","enum":["public","followers","mutuals"]},"dmPolicy":{"type":"string","enum":["everyone","following","mutuals","nobody"]},"sensitiveMedia":{"type":"boolean"},"locale":{"type":"string","pattern":"^[a-z]{2}(?:-[A-Z]{2})?$"},"isPrivate":{"type":"boolean"},"notifications":{"$ref":"#/components/schemas/UpdateNotificationSettings"}}},"PendingFollowResponse":{"type":"object","properties":{"state":{"type":"string","const":"pending"}},"required":["state"]},"FollowRequest":{"type":"object","properties":{"requester_id":{"type":"string","minLength":1,"maxLength":96},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"bio":{"type":"string"}},"required":["requester_id","created_at","handle","display_name","bio"]},"FollowRequestListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FollowRequest"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"UserConnectionListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"MediaReference":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","enum":["image","video","audio"]},"url":{"type":"string","format":"uri"},"alt":{"type":"string","maxLength":1000},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1},"durationMs":{"type":"integer","minimum":1}},"required":["id","kind"]},"MediaItem":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"post_id":{"type":["string","null"]},"kind":{"type":"string","enum":["image","video","audio"]},"mime_type":{"type":"string"},"byte_size":{"type":"integer","minimum":0},"width":{"type":["integer","null"],"format":"int64"},"height":{"type":["integer","null"],"format":"int64"},"duration_ms":{"type":["integer","null"],"format":"int64"},"alt":{"type":["string","null"]},"processing_state":{"type":"string","enum":["pending","processing","ready","failed"]},"url":{"type":"string"}},"required":["id","kind","mime_type","byte_size","processing_state","url"]},"CreatePostRequest":{"type":"object","properties":{"body":{"type":"string","maxLength":5000,"description":"Log text. At most 20 unique hashtags and 20 unique @mentions are accepted; over-limit input is rejected rather than truncated."},"visibility":{"type":"string","enum":["public","followers","mutuals","server"],"default":"public"},"serverId":{"type":"string","minLength":1,"maxLength":96},"replyToId":{"type":"string","minLength":1,"maxLength":96},"quotePostId":{"type":"string","minLength":1,"maxLength":96},"media":{"type":"array","maxItems":4,"items":{"$ref":"#/components/schemas/MediaReference"},"default":[]},"draft":{"type":"boolean","default":false},"contentWarning":{"type":"string","maxLength":160}},"required":["body"]},"UpdatePostRequest":{"type":"object","properties":{"body":{"type":"string","maxLength":5000,"description":"Complete Log text. At most 20 unique hashtags and 20 unique @mentions are accepted; over-limit input is rejected rather than truncated."},"visibility":{"type":"string","enum":["public","followers","mutuals","server"]},"serverId":{"type":["string","null"],"maxLength":96},"contentWarning":{"type":["string","null"],"maxLength":160},"media":{"type":"array","maxItems":4,"items":{"$ref":"#/components/schemas/MediaReference"},"description":"Complete final attachment selection. Omit to retain all existing attachments."}},"required":["body"]},"ReactionRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["like","love","laugh","surprise","sad","boost"]}},"required":["kind"]},"PostViewerState":{"type":"object","properties":{"reactions":{"type":"array","items":{"type":"string"}},"reposted":{"type":"boolean"},"bookmarked":{"type":"boolean"}},"required":["reactions","reposted","bookmarked"]},"RepostContext":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["user_id","handle","display_name","created_at"]},"LiveContext":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"host_id":{"type":"string","minLength":1,"maxLength":96},"title":{"type":"string"},"state":{"type":"string","enum":["live","scheduled"]},"visibility":{"type":"string","enum":["public","followers","server"]},"scheduled_at":{"type":["integer","null"],"format":"int64"},"started_at":{"type":["integer","null"],"format":"int64"},"participant_count":{"type":"integer","minimum":0}},"required":["id","host_id","title","state","visibility","scheduled_at","started_at","participant_count"]},"Post":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"author_id":{"type":"string","minLength":1,"maxLength":96},"body":{"type":"string"},"visibility":{"type":"string","enum":["public","followers","mutuals","server"]},"server_id":{"type":["string","null"]},"reply_to_id":{"type":["string","null"]},"quote_post_id":{"type":["string","null"]},"draft":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"authorship":{"type":"string","const":"human","description":"LoG AI and service principals are forbidden from publishing."},"content_warning":{"type":["string","null"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"updated_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"published_at":{"type":["integer","null"],"format":"int64"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"is_verified":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"reply_count":{"type":"integer","minimum":0},"repost_count":{"type":"integer","minimum":0},"reaction_count":{"type":"integer","minimum":0},"bookmark_count":{"type":"integer","minimum":0},"view_count":{"type":"integer","minimum":0},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediaItem"}},"viewer_state":{"$ref":"#/components/schemas/PostViewerState"},"repost_context":{"oneOf":[{"$ref":"#/components/schemas/RepostContext"},{"type":"null"}]},"quote_post":{"oneOf":[{"$ref":"#/components/schemas/Post"},{"type":"null"}]},"live_context":{"$ref":"#/components/schemas/LiveContext"},"feed_rank":{"type":"number"}},"required":["id","author_id","body","visibility","draft","authorship","created_at","updated_at","handle","display_name","reply_count","repost_count","reaction_count","bookmark_count","view_count","media","viewer_state"]},"TimelineRanking":{"type":"object","properties":{"method":{"type":"string","enum":["recent-human-signals","chronological"]},"candidate_limit":{"type":["integer","null"],"minimum":1,"description":"Maximum recent candidates ranked in D1, or null when an ordered index supplies the chronological feed."}},"required":["method","candidate_limit"]},"TimelineResponse":{"type":"object","properties":{"kind":{"type":"string","enum":["recommended","following","latest","media","live"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"cursor":{"type":["string","null"]},"ranking":{"$ref":"#/components/schemas/TimelineRanking"}},"required":["kind","items","cursor","ranking"]},"PostCursorPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"DraftListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"PostThreadResponse":{"type":"object","properties":{"post":{"$ref":"#/components/schemas/Post"},"replies":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"cursor":{"type":["string","null"]}},"required":["post","replies","cursor"]},"SearchUserResult":{"$ref":"#/components/schemas/PublicUser"},"SearchLiveResult":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"title":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["scheduled","live"]},"scheduled_at":{"type":["integer","null"],"format":"int64"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]}},"required":["id","title","state","handle","display_name"]},"SearchCallResult":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"creator_id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","const":"open"},"server_id":{"type":["string","null"]},"state":{"type":"string","enum":["open","active"]},"title":{"type":["string","null"]},"max_participants":{"type":"integer","minimum":2,"maximum":8},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"ended_at":{"type":["integer","null"],"format":"int64"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"participant_count":{"type":"integer","minimum":1}},"required":["id","creator_id","kind","state","title","max_participants","created_at","handle","display_name","participant_count"]},"SearchServerResult":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon_key":{"type":["string","null"]}},"required":["id","slug","name","description"]},"HashtagResult":{"type":"object","properties":{"tag":{"type":"string"},"post_count":{"type":"integer","minimum":0}},"required":["tag","post_count"]},"SearchResponse":{"type":"object","properties":{"query":{"type":"string"},"users":{"type":"array","items":{"$ref":"#/components/schemas/SearchUserResult"}},"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"live":{"type":"array","items":{"$ref":"#/components/schemas/SearchLiveResult"}},"calls":{"type":"array","items":{"$ref":"#/components/schemas/SearchCallResult"}},"servers":{"type":"array","items":{"$ref":"#/components/schemas/SearchServerResult"}},"hashtags":{"type":"array","items":{"$ref":"#/components/schemas/HashtagResult"}}},"required":["query","users","posts","live","calls","servers","hashtags"]},"DiscoveryUser":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"bio":{"type":"string"},"is_verified":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"follower_count":{"type":"integer","minimum":0},"mutual_count":{"type":"integer","minimum":0}},"required":["id","handle","display_name","follower_count","mutual_count"]},"DiscoveryLive":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"title":{"type":"string"},"state":{"type":"string","enum":["scheduled","live"]},"scheduled_at":{"type":["integer","null"],"format":"int64"},"started_at":{"type":["integer","null"],"format":"int64"},"host_id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"participant_count":{"type":"integer","minimum":0}},"required":["id","title","state","host_id","handle","display_name","participant_count"]},"DiscoveryCandidateLimits":{"type":"object","properties":{"users":{"type":"integer","const":2000},"recent_accounts":{"type":"integer","const":1000},"recent_public_logs":{"type":"integer","const":1000},"live":{"type":"integer","const":200}},"required":["users","recent_accounts","recent_public_logs","live"]},"DiscoveryResponse":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveryUser"}},"live":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveryLive"}},"hashtags":{"type":"array","items":{"$ref":"#/components/schemas/HashtagResult"}},"ranking":{"type":"string","const":"human-signals","description":"Ranked only from aggregate activity by authenticated, non-automated user accounts. This describes LoG's anti-dummy boundary, not proof that OAuth verified a person's humanity; LoG does not inject AI-authored content or reactions."},"candidate_limits":{"$ref":"#/components/schemas/DiscoveryCandidateLimits"}},"required":["users","live","hashtags","ranking","candidate_limits"]},"Notification":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string"},"entity_id":{"type":["string","null"]},"read_at":{"type":["integer","null"],"format":"int64"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"actor_id":{"type":["string","null"]},"actor_handle":{"type":["string","null"]},"actor_display_name":{"type":["string","null"]},"actor_avatar_key":{"type":["string","null"]}},"required":["id","kind","created_at"]},"NotificationsResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"unread":{"type":"integer","minimum":0,"maximum":1000,"description":"Unread count saturated at 1,000."},"unread_capped":{"type":"boolean","description":"True when more than 1,000 unread notifications exist."},"cursor":{"type":["string","null"]}},"required":["items","unread","unread_capped","cursor"]},"ReadNotificationsRequest":{"type":"object","properties":{"ids":{"type":"array","maxItems":90,"items":{"type":"string","minLength":1,"maxLength":96},"default":[]},"all":{"type":"boolean","default":false}}},"ReportRequest":{"type":"object","properties":{"targetType":{"type":"string","enum":["user","post","live","message","server","ad"]},"targetId":{"type":"string","minLength":1,"maxLength":96},"reason":{"type":"string","enum":["spam","harassment","hate","violence","sexual","impersonation","copyright","misinformation","other"]},"details":{"type":"string","maxLength":2000}},"required":["targetType","targetId","reason"]},"AdReportRequest":{"type":"object","properties":{"targetType":{"type":"string","const":"ad"},"targetId":{"type":"string","minLength":1,"maxLength":96},"reason":{"type":"string","enum":["spam","harassment","hate","violence","sexual","impersonation","copyright","misinformation","other"]},"details":{"type":"string","maxLength":2000},"token":{"type":"string","minLength":20,"maxLength":2000,"description":"Recent signed ad serve token proving this reporter was eligible to receive the campaign."}},"required":["targetType","targetId","reason","token"]},"ReportResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","const":"open"}},"required":["id","state"]},"ModerationTransitionRequest":{"type":"object","properties":{"state":{"type":"string","enum":["reviewing","resolved","dismissed"]},"action":{"type":"string","enum":["none","record_only","remove_post","suspend_user","end_live","remove_message","remove_server","pause_campaign"],"description":"reviewing/dismissed require none. resolved requires the matching target action; record_only is an explicit no-enforcement decision for a generic report."},"note":{"type":["string","null"],"maxLength":1000},"reviewVersion":{"type":"integer","minimum":0,"description":"Optimistic concurrency version from the queue item."}},"required":["state","action","reviewVersion"]},"ModerationActor":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":["string","null"]},"display_name":{"type":["string","null"]},"avatar_key":{"type":["string","null"]}},"required":["id","handle","display_name"]},"ModerationTarget":{"type":"object","properties":{"type":{"type":"string","enum":["user","post","live","message","server"]},"id":{"type":"string","minLength":1,"maxLength":96},"exists":{"type":"boolean"},"deleted_at":{"type":["integer","null"],"format":"int64"},"title":{"type":["string","null"]},"excerpt":{"type":["string","null"]},"owner":{"oneOf":[{"$ref":"#/components/schemas/ModerationActor"},{"type":"null"}]}},"required":["type","id","exists","deleted_at","title","excerpt","owner"]},"ModerationReport":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"reason":{"type":"string","enum":["spam","harassment","hate","violence","sexual","impersonation","copyright","misinformation","other"]},"details":{"type":["string","null"]},"state":{"type":"string","enum":["open","reviewing","resolved","dismissed"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"resolved_at":{"type":["integer","null"],"format":"int64"},"reviewed_at":{"type":["integer","null"],"format":"int64"},"resolution_note":{"type":["string","null"]},"resolution_action":{"type":"string","enum":["none","record_only","remove_post","suspend_user","end_live","remove_message","remove_server"]},"review_version":{"type":"integer","minimum":0},"reporter":{"$ref":"#/components/schemas/ModerationActor"},"reviewer":{"oneOf":[{"$ref":"#/components/schemas/ModerationActor"},{"type":"null"}]},"target":{"$ref":"#/components/schemas/ModerationTarget"}},"required":["id","reason","details","state","created_at","resolved_at","reviewed_at","resolution_note","resolution_action","review_version","reporter","reviewer","target"]},"AdModerationReport":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"reason":{"type":"string","enum":["spam","harassment","hate","violence","sexual","impersonation","copyright","misinformation","other"]},"details":{"type":["string","null"]},"state":{"type":"string","enum":["open","reviewing","resolved","dismissed"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"resolved_at":{"type":["integer","null"],"format":"int64"},"reviewed_at":{"type":["integer","null"],"format":"int64"},"resolution_note":{"type":["string","null"]},"resolution_action":{"type":"string","enum":["none","pause_campaign"]},"review_version":{"type":"integer","minimum":0},"reporter":{"oneOf":[{"$ref":"#/components/schemas/ModerationActor"},{"type":"null"}]},"reviewer":{"oneOf":[{"$ref":"#/components/schemas/ModerationActor"},{"type":"null"}]},"ad":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"state":{"type":"string","enum":["draft","active","paused","ended"]},"approved_at":{"type":["integer","null"],"format":"int64"},"review_note":{"type":["string","null"]},"destination_url":{"type":"string","format":"uri"},"advertiser":{"$ref":"#/components/schemas/ModerationActor"},"creative":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"body":{"type":"string","maxLength":1000},"deleted_at":{"type":["integer","null"],"format":"int64"},"moderation_state":{"type":"string","enum":["visible","limited","removed"]}},"required":["id","body","deleted_at","moderation_state"]}},"required":["id","name","state","approved_at","review_note","destination_url","advertiser","creative"]}},"required":["id","reason","details","state","created_at","resolved_at","reviewed_at","resolution_note","resolution_action","review_version","reporter","reviewer","ad"]},"ModerationReportQueue":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ModerationReport"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"AdModerationReportQueue":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AdModerationReport"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"ModerationTransitionResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","enum":["reviewing","resolved","dismissed"]},"reviewed_by":{"type":"string","minLength":1,"maxLength":96},"reviewed_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"resolved_at":{"type":["integer","null"],"format":"int64"},"resolution_note":{"type":["string","null"]},"resolution_action":{"type":"string","enum":["none","record_only","remove_post","suspend_user","end_live","remove_message","remove_server","pause_campaign"]},"review_version":{"type":"integer","minimum":1}},"required":["id","state","reviewed_by","reviewed_at","resolved_at","resolution_note","resolution_action","review_version"]},"Channel":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"server_id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"kind":{"type":"string","enum":["text","voice","announcement"]},"position":{"type":"integer"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","name","kind"]},"ServerMember":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","moderator","member"]},"joined_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","handle","display_name","role"]},"Server":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"owner_id":{"type":"string","minLength":1,"maxLength":96},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon_key":{"type":["string","null"]},"visibility":{"type":"string","enum":["public","private"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"updated_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"viewer_role":{"type":["string","null"],"enum":["owner","admin","moderator","member",null]},"member_count":{"type":"integer","minimum":0},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"members":{"type":"array","items":{"$ref":"#/components/schemas/ServerMember"}},"members_cursor":{"type":["string","null"]}},"required":["id","owner_id","slug","name","description","visibility"]},"ServerListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Server"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"ServerMemberListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServerMember"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"CreateServerRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","pattern":"^[a-z0-9_-]{3,40}$"},"description":{"type":"string","maxLength":1000,"default":""},"visibility":{"type":"string","enum":["public","private"],"default":"public"}},"required":["name","slug"]},"UpdateServerRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000},"visibility":{"type":"string","enum":["public","private"]},"iconMediaId":{"type":["string","null"],"format":"uuid"}},"minProperties":1},"CreateServerResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string"},"viewer_role":{"type":"string","const":"owner"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}}},"required":["id","name","slug","description","visibility","viewer_role","channels"]},"UpdateServerResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"description":{"type":"string"},"icon_key":{"type":["string","null"]},"visibility":{"type":"string","enum":["public","private"]},"viewer_role":{"type":"string","enum":["owner","admin"]}},"required":["id","name","description","icon_key","visibility","viewer_role"]},"TransferServerRequest":{"type":"object","properties":{"targetUserId":{"type":"string","format":"uuid"}},"required":["targetUserId"]},"TransferServerResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"owner_id":{"type":"string","minLength":1,"maxLength":96},"viewer_role":{"type":"string","const":"admin"}},"required":["id","owner_id","viewer_role"]},"CreateInviteRequest":{"type":"object","properties":{"maxUses":{"type":"integer","minimum":1,"maximum":1000,"default":25},"expiresInHours":{"type":"integer","minimum":1,"maximum":720,"default":72}}},"InviteResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"code":{"type":"string"},"maxUses":{"type":"integer"},"expiresInHours":{"type":"integer"}},"required":["id","code","maxUses","expiresInHours"]},"ServerInvite":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"server_id":{"type":"string","minLength":1,"maxLength":96},"creator_id":{"type":"string","minLength":1,"maxLength":96},"code":{"type":"string"},"max_uses":{"type":"integer","minimum":1},"use_count":{"type":"integer","minimum":0},"expires_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"revoked_at":{"type":["integer","null"],"format":"int64"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"creator_handle":{"type":"string"},"creator_display_name":{"type":"string"},"active":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"expired":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"revoked":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"status":{"type":"string","enum":["active","revoked","expired","exhausted"]}},"required":["id","server_id","creator_id","code","max_uses","use_count","expires_at","revoked_at","created_at","creator_handle","creator_display_name","active","expired","revoked","status"]},"ServerInviteListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServerInvite"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"JoinInviteResponse":{"type":"object","properties":{"serverId":{"type":"string","minLength":1,"maxLength":96},"alreadyMember":{"type":"boolean"}},"required":["serverId"]},"CreateChannelRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["text","voice","announcement"],"default":"text"}},"required":["name"]},"CreateChannelResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"server_id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"kind":{"type":"string","enum":["text","voice","announcement"]},"position":{"type":"integer"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","server_id","name","kind","position","created_at"]},"UpdateChannelRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["text","voice","announcement"]},"position":{"type":"integer","minimum":0,"maximum":10000}}},"ChannelDetailResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"server_id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"kind":{"type":"string","enum":["text","voice","announcement"]},"position":{"type":"integer"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"viewer_role":{"type":"string","enum":["owner","admin","moderator","member"]},"last_read_at":{"type":["integer","null"],"format":"int64"}},"required":["id","server_id","name","kind","position","created_at","viewer_role","last_read_at"]},"UpdateMemberRoleRequest":{"type":"object","properties":{"role":{"type":"string","enum":["admin","moderator","member"]}},"required":["role"]},"UpdateMemberRoleResponse":{"type":"object","properties":{"serverId":{"type":"string","minLength":1,"maxLength":96},"userId":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string","enum":["admin","moderator","member"]}},"required":["serverId","userId","role"]},"BanMemberRequest":{"type":"object","properties":{"reason":{"type":["string","null"],"maxLength":500}}},"ServerBan":{"type":"object","properties":{"server_id":{"type":"string","minLength":1,"maxLength":96},"user_id":{"type":"string","minLength":1,"maxLength":96},"reason":{"type":["string","null"]},"moderator_id":{"type":"string","minLength":1,"maxLength":96},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"moderator_handle":{"type":"string"},"moderator_display_name":{"type":"string"}},"required":["server_id","user_id","reason","moderator_id","created_at","handle","display_name","avatar_key","moderator_handle","moderator_display_name"]},"ServerBanListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServerBan"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"ChannelReadResponse":{"type":"object","properties":{"channelId":{"type":"string","minLength":1,"maxLength":96},"lastReadAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["channelId","lastReadAt"]},"CreateMessageRequest":{"type":"object","properties":{"body":{"type":"string","maxLength":5000},"replyToId":{"type":"string","minLength":1,"maxLength":96},"mediaIds":{"type":"array","maxItems":4,"items":{"type":"string","minLength":1,"maxLength":96},"default":[]}},"required":["body"]},"UpdateMessageRequest":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000}},"required":["body"]},"CreatedMessage":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"authorId":{"type":"string","minLength":1,"maxLength":96},"body":{"type":"string"},"replyToId":{"type":["string","null"]},"mediaIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":96}},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediaItem"}},"reactions":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"viewer_reactions":{"type":"array","items":{"type":"string","enum":["like","love","laugh","surprise","sad"]}},"createdAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","authorId","body","replyToId","mediaIds","media","reactions","viewer_reactions","createdAt"]},"Message":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"author_id":{"type":"string","minLength":1,"maxLength":96},"conversation_id":{"type":["string","null"]},"channel_id":{"type":["string","null"]},"reply_to_id":{"type":["string","null"]},"body":{"type":"string"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"edited_at":{"type":["integer","null"],"format":"int64"},"deleted_at":{"type":["integer","null"],"format":"int64"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediaItem"}},"reactions":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"viewer_reactions":{"type":"array","items":{"type":"string","enum":["like","love","laugh","surprise","sad"]}}},"required":["id","author_id","body","created_at","handle","display_name","media","reactions","viewer_reactions"]},"MessageListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"UpdatedMessageResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"body":{"type":"string"},"edited":{"type":"boolean","const":true},"editedAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","body","edited","editedAt"]},"ConversationMember":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]}},"required":["id","handle","display_name","avatar_key"]},"Conversation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","enum":["direct","group"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"viewer_last_read_at":{"type":["integer","null"],"format":"int64"},"last_message":{"type":["string","null"]},"last_message_at":{"type":["integer","null"],"format":"int64"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMember"}}},"required":["id","kind","created_at","viewer_last_read_at","last_message","last_message_at","members"]},"ConversationListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"cursor":{"type":["string","null"]}},"required":["items","cursor"]},"ConversationDetailMember":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"joined_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"last_read_at":{"type":["integer","null"],"format":"int64"}},"required":["id","handle","display_name","joined_at"]},"ConversationDetailResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","enum":["direct","group"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"viewer_last_read_at":{"type":["integer","null"],"format":"int64"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ConversationDetailMember"}}},"required":["id","kind","created_at","members"]},"ConversationReadResponse":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1,"maxLength":96},"lastReadAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["conversationId","lastReadAt"]},"CreateConversationRequest":{"type":"object","properties":{"memberIds":{"type":"array","minItems":1,"maxItems":20,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":96}}},"required":["memberIds"]},"CreateConversationResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"existing":{"type":"boolean"},"kind":{"type":"string","enum":["direct","group"]},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":96}}},"required":["id"]},"CreateLiveRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000,"default":""},"visibility":{"type":"string","enum":["public","followers","server"],"default":"public"},"serverId":{"type":"string","minLength":1,"maxLength":96},"scheduledAt":{"type":["integer","null"],"format":"int64"},"maxSpeakers":{"type":"integer","minimum":1,"maximum":8,"default":6}},"required":["title"]},"UpdateLiveRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"visibility":{"type":"string","enum":["public","followers","server"]},"serverId":{"type":["string","null"]},"scheduledAt":{"type":["integer","null"],"format":"int64"},"maxSpeakers":{"type":"integer","minimum":1,"maximum":8},"allowSpeakerRequests":{"type":"boolean"}}},"LiveSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"host_id":{"type":"string","minLength":1,"maxLength":96},"server_id":{"type":["string","null"]},"title":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["scheduled","live","ended","cancelled"]},"visibility":{"type":"string","enum":["public","followers","server"]},"scheduled_at":{"type":["integer","null"],"format":"int64"},"started_at":{"type":["integer","null"],"format":"int64"},"max_speakers":{"type":"integer"},"allow_speaker_requests":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"transport":{"type":"string","enum":["mesh","sfu"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"participant_count":{"type":"integer","minimum":0}},"required":["id","host_id","title","state","visibility"]},"LiveParticipant":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string","enum":["host","cohost","speaker","listener"]},"joined_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]}},"required":["user_id","role","joined_at","handle","display_name"]},"LiveSpeakerRequest":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","const":"pending"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"updated_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]}},"required":["user_id","state","created_at","updated_at","handle","display_name"]},"LiveDetail":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"host_id":{"type":"string","minLength":1,"maxLength":96},"server_id":{"type":["string","null"]},"title":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["scheduled","live","ended","cancelled"]},"visibility":{"type":"string","enum":["public","followers","server"]},"scheduled_at":{"type":["integer","null"],"format":"int64"},"started_at":{"type":["integer","null"],"format":"int64"},"ended_at":{"type":["integer","null"],"format":"int64"},"max_speakers":{"type":"integer"},"allow_speaker_requests":{"type":"integer","enum":[0,1],"description":"SQLite boolean (0 or 1)"},"transport":{"type":"string","enum":["mesh","sfu"]},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/LiveParticipant"}},"viewer_role":{"type":["string","null"],"enum":["host","cohost","speaker","listener",null]},"viewer_has_reminder":{"type":"boolean"},"viewer_speaker_request":{"type":["string","null"],"enum":["pending","accepted","declined","cancelled",null]},"speaker_requests":{"type":"array","items":{"$ref":"#/components/schemas/LiveSpeakerRequest"}}},"required":["id","host_id","title","state","visibility","participants","viewer_role","viewer_has_reminder","viewer_speaker_request","speaker_requests"]},"RoomListRanking":{"type":"object","properties":{"method":{"type":"string","const":"state-recent"},"candidate_limit":{"type":"integer","minimum":1,"maximum":500,"description":"Fixed recent candidate window: 250 rows for a requested state, or 500 across both states."}},"required":["method","candidate_limit"]},"LiveListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LiveSummary"}},"cursor":{"type":["string","null"]},"ranking":{"$ref":"#/components/schemas/RoomListRanking"}},"required":["items","cursor","ranking"]},"CreateLiveResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","const":"scheduled"},"transport":{"type":"string","const":"mesh"},"title":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string"},"serverId":{"type":"string","minLength":1,"maxLength":96},"scheduledAt":{"type":["integer","null"],"format":"int64"},"maxSpeakers":{"type":"integer"}},"required":["id","state","transport","title","description","visibility","maxSpeakers"]},"LiveStateResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","enum":["live","ended"]},"startedAt":{"type":"integer","format":"int64","description":"Unix time in seconds"},"endedAt":{"type":"integer","format":"int64","description":"Unix time in seconds"},"transport":{"type":"string","const":"mesh"}},"required":["id","state"]},"LiveRoleRequest":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string","enum":["cohost","speaker","listener"]}},"required":["userId","role"]},"LiveRoleResponse":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string","enum":["cohost","speaker","listener"]}},"required":["userId","role"]},"OkResponse":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]},"CreateCallRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["open","direct","server"]},"title":{"type":"string","minLength":1,"maxLength":160},"serverId":{"type":"string","minLength":1,"maxLength":96},"inviteeIds":{"type":"array","maxItems":12,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":96},"default":[]}},"required":["kind","title"]},"UpdateCallRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"maxParticipants":{"type":"integer","minimum":2,"maximum":8}}},"CallSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"creator_id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","enum":["open","direct","server"]},"server_id":{"type":["string","null"]},"state":{"type":"string","enum":["open","active","ended"]},"title":{"type":["string","null"]},"max_participants":{"type":"integer"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"ended_at":{"type":["integer","null"],"format":"int64"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"participant_count":{"type":"integer","minimum":0}},"required":["id","creator_id","kind","state","created_at"]},"CallParticipant":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":96},"joined_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"left_at":{"type":["integer","null"],"format":"int64"},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]}},"required":["user_id","joined_at","handle","display_name"]},"CallDetail":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"creator_id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","enum":["open","direct","server"]},"server_id":{"type":["string","null"]},"state":{"type":"string","enum":["open","active","ended"]},"title":{"type":["string","null"]},"max_participants":{"type":"integer"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"ended_at":{"type":["integer","null"],"format":"int64"},"transport":{"type":"string","const":"mesh"},"viewer_joined":{"type":"boolean"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/CallParticipant"}}},"required":["id","creator_id","kind","state","transport","viewer_joined","participants"]},"CallListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CallSummary"}},"cursor":{"type":["string","null"]},"ranking":{"$ref":"#/components/schemas/RoomListRanking"}},"required":["items","cursor","ranking"]},"CreateCallResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","const":"open"},"transport":{"type":"string","const":"mesh"},"kind":{"type":"string"},"title":{"type":"string"},"serverId":{"type":"string","minLength":1,"maxLength":96},"inviteeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":96}}},"required":["id","state","transport","kind","title","inviteeIds"]},"CallEndResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","const":"ended"},"endedAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","state","endedAt"]},"InlineMediaUploadRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["image","audio","video"]},"mimeType":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif","audio/webm","audio/ogg","video/mp4","video/webm"]},"dataBase64":{"type":"string","format":"byte","maxLength":2000000,"description":"Base64-encoded bytes; decoded size is limited to 1,500,000 bytes."},"alt":{"type":"string","maxLength":1000}},"required":["kind","mimeType","dataBase64"]},"InlineMediaResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string"},"mimeType":{"type":"string"},"byteSize":{"type":"integer"},"alt":{"type":["string","null"]},"url":{"type":"string"}},"required":["id","kind","mimeType","byteSize","url"]},"AdTargeting":{"type":"object","properties":{"languages":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":16},"default":[]},"tags":{"type":"array","maxItems":30,"items":{"type":"string","maxLength":80},"default":[]}}},"CreateAdRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"creativePostId":{"type":"string","minLength":1,"maxLength":96},"destinationUrl":{"type":"string","format":"uri","maxLength":1000},"startsAt":{"type":["integer","null"],"format":"int64"},"endsAt":{"type":["integer","null"],"format":"int64"},"dailyBudgetMicros":{"type":"integer","minimum":100000,"maximum":1000000000},"totalBudgetMicros":{"type":"integer","minimum":100000,"maximum":10000000000},"targeting":{"$ref":"#/components/schemas/AdTargeting"}},"required":["name","creativePostId","destinationUrl","dailyBudgetMicros","totalBudgetMicros"]},"UpdateAdRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"creativePostId":{"type":"string","minLength":1,"maxLength":96},"destinationUrl":{"type":"string","format":"uri","maxLength":1000},"startsAt":{"type":["integer","null"],"format":"int64"},"endsAt":{"type":["integer","null"],"format":"int64"},"dailyBudgetMicros":{"type":"integer","minimum":100000,"maximum":1000000000},"totalBudgetMicros":{"type":"integer","minimum":100000,"maximum":10000000000},"targeting":{"$ref":"#/components/schemas/AdTargeting"}},"minProperties":1},"AdStateRequest":{"type":"object","properties":{"state":{"type":"string","enum":["draft","active","paused","ended"]}},"required":["state"]},"AdEventRequest":{"type":"object","properties":{"event":{"type":"string","enum":["impression","click","hide"]},"placement":{"type":"string","enum":["timeline","search","sidebar"],"default":"timeline"},"token":{"type":"string","minLength":20,"maxLength":2000}},"required":["event","token"]},"AdCreditPackageId":{"type":"string","enum":["starter","growth","scale"]},"CreateAdCheckoutRequest":{"type":"object","properties":{"packageId":{"$ref":"#/components/schemas/AdCreditPackageId"}},"required":["packageId"],"additionalProperties":false},"AdvertisingPaymentStatus":{"type":"object","properties":{"provider":{"type":"string","const":"stripe"},"checkoutEnabled":{"type":"boolean","description":"True only when a matching Stripe key, signed webhook secret, and explicit payment mode are configured."},"liveMode":{"type":"boolean"},"mode":{"type":"string","enum":["disabled","test","live"]},"currency":{"type":"string","const":"jpy"},"requiresVerifiedEmail":{"type":"boolean","const":true}},"required":["provider","checkoutEnabled","liveMode","mode","currency","requiresVerifiedEmail"]},"AdCreditPackage":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/AdCreditPackageId"},"name":{"type":"string","minLength":1,"maxLength":80},"amount_minor":{"type":"integer","minimum":1,"description":"One-time charge in whole JPY."},"currency":{"type":"string","const":"jpy"},"credit_micros":{"type":"integer","minimum":1,"description":"Purchased advertising credit in micros; launch packages use exactly one credit per JPY."}},"required":["id","name","amount_minor","currency","credit_micros"]},"AdPaymentOrder":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"package_id":{"$ref":"#/components/schemas/AdCreditPackageId"},"provider":{"type":"string","const":"stripe"},"livemode":{"type":"boolean"},"currency":{"type":"string","const":"jpy"},"amount_minor":{"type":"integer","minimum":1},"credit_micros":{"type":"integer","minimum":1},"status":{"type":"string","enum":["pending","paid","partially_refunded","refunded","disputed","failed","expired"]},"refunded_amount_minor":{"type":"integer","minimum":0},"dispute_amount_minor":{"type":"integer","minimum":0},"reversed_credit_micros":{"type":"integer","minimum":0},"paid_at":{"type":["integer","null"],"format":"int64"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"updated_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["id","package_id","provider","livemode","currency","amount_minor","credit_micros","status","refunded_amount_minor","dispute_amount_minor","reversed_credit_micros","paid_at","created_at","updated_at"]},"AdBillingCapacity":{"type":"object","properties":{"maximum_outstanding_paid_credit_micros":{"type":"integer","minimum":1},"outstanding_paid_credit_micros":{"type":"integer","minimum":0},"held_pending_credit_micros":{"type":"integer","minimum":0},"held_disputed_credit_micros":{"type":"integer","minimum":0},"available_credit_micros":{"type":"integer","minimum":0}},"required":["maximum_outstanding_paid_credit_micros","outstanding_paid_credit_micros","held_pending_credit_micros","held_disputed_credit_micros","available_credit_micros"]},"AdBillingResponse":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/AdAccount"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/AdCreditPackage"}},"orders":{"type":"array","items":{"$ref":"#/components/schemas/AdPaymentOrder"}},"capacity":{"$ref":"#/components/schemas/AdBillingCapacity"},"payments":{"$ref":"#/components/schemas/AdvertisingPaymentStatus"}},"required":["account","packages","orders","capacity","payments"]},"AdCheckoutResponse":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/AdPaymentOrder"},"checkout_url":{"type":"string","format":"uri","pattern":"^https://"},"expires_at":{"type":["integer","null"],"format":"int64"}},"required":["order","checkout_url","expires_at"]},"StripeWebhookEventRequest":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_"},"type":{"type":"string"},"created":{"type":"integer","format":"int64","description":"Unix time in seconds"},"livemode":{"type":"boolean"},"data":{"type":"object","properties":{"object":{"type":"object","additionalProperties":true}},"required":["object"]}},"required":["id","type","created","livemode","data"],"additionalProperties":true,"description":"Raw Stripe Event JSON. The exact request bytes are authenticated by the Stripe-Signature header before parsing."},"StripeWebhookResponse":{"type":"object","properties":{"received":{"type":"boolean","const":true}},"required":["received"]},"AdAccount":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":96},"status":{"type":"string","enum":["active","review","suspended"]},"promotional_credit_micros":{"type":"integer","minimum":0},"paid_credit_micros":{"type":"integer","description":"May be negative after purchased credit that was already delivered is refunded or disputed."},"reserved_credit_micros":{"type":"integer","minimum":0},"consumed_credit_micros":{"type":"integer","minimum":0},"available_credit_micros":{"type":"integer","minimum":0,"description":"Current usable credit after subtracting atomically reserved campaign budgets and delivered spend."},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"updated_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["user_id","status","promotional_credit_micros","paid_credit_micros","reserved_credit_micros","consumed_credit_micros","available_credit_micros","created_at","updated_at"]},"AdCampaign":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"advertiser_id":{"type":"string","minLength":1,"maxLength":96},"creative_post_id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","enum":["draft","active","paused","ended"]},"starts_at":{"type":["integer","null"],"format":"int64"},"ends_at":{"type":["integer","null"],"format":"int64"},"created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"name":{"type":"string"},"destination_url":{"type":"string","format":"uri"},"daily_budget_micros":{"type":"integer"},"total_budget_micros":{"type":"integer"},"spent_micros":{"type":"integer"},"approved_at":{"type":["integer","null"],"format":"int64"},"review_note":{"type":["string","null"]},"body":{"type":"string"},"impressions":{"type":"integer"},"clicks":{"type":"integer"}},"required":["id","advertiser_id","creative_post_id","state","name"]},"AdListResponse":{"type":"object","properties":{"account":{"oneOf":[{"$ref":"#/components/schemas/AdAccount"},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/AdCampaign"}}},"required":["items"]},"CreateAdResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","const":"draft"},"approved":{"type":"boolean"},"reviewNote":{"type":"string"},"name":{"type":"string"},"creativePostId":{"type":"string","minLength":1,"maxLength":96},"destinationUrl":{"type":"string","format":"uri"},"startsAt":{"type":["integer","null"],"format":"int64"},"endsAt":{"type":["integer","null"],"format":"int64"},"dailyBudgetMicros":{"type":"integer"},"totalBudgetMicros":{"type":"integer"},"targeting":{"$ref":"#/components/schemas/AdTargeting"}},"required":["id","state","approved","reviewNote","name","creativePostId","destinationUrl","dailyBudgetMicros","totalBudgetMicros","targeting"]},"UpdateAdResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","enum":["draft","paused"]},"approved":{"type":"boolean"},"reviewNote":{"type":"string"},"name":{"type":"string"},"creativePostId":{"type":"string","minLength":1,"maxLength":96},"destinationUrl":{"type":"string","format":"uri"},"startsAt":{"type":["integer","null"],"format":"int64"},"endsAt":{"type":["integer","null"],"format":"int64"},"dailyBudgetMicros":{"type":"integer"},"totalBudgetMicros":{"type":"integer"},"targeting":{"$ref":"#/components/schemas/AdTargeting"}},"required":["id","state","approved","reviewNote","name","creativePostId","destinationUrl","startsAt","endsAt","dailyBudgetMicros","totalBudgetMicros","targeting"]},"AdStateResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","enum":["draft","active","paused","ended"]}},"required":["id","state"]},"SponsoredAd":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"advertiser_id":{"type":"string","minLength":1,"maxLength":96},"creative_post_id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"state":{"type":"string","const":"active"},"destination_url":{"type":"string","format":"uri"},"starts_at":{"type":["integer","null"],"format":"int64"},"ends_at":{"type":["integer","null"],"format":"int64"},"daily_budget_micros":{"type":"integer"},"total_budget_micros":{"type":"integer"},"spent_micros":{"type":"integer"},"body":{"type":"string"},"content_warning":{"type":["string","null"]},"post_created_at":{"type":"integer","format":"int64","description":"Unix time in seconds"},"author_id":{"type":"string","minLength":1,"maxLength":96},"handle":{"type":"string"},"display_name":{"type":"string"},"avatar_key":{"type":["string","null"]},"reaction_count":{"type":"integer","minimum":0},"repost_count":{"type":"integer","minimum":0},"media":{"type":"array","items":{"$ref":"#/components/schemas/MediaItem"}},"sponsored":{"type":"boolean","const":true},"placement":{"type":"string","enum":["timeline","search","sidebar"]},"token":{"type":"string"}},"required":["id","advertiser_id","creative_post_id","name","state","destination_url","body","post_created_at","author_id","handle","display_name","media","sponsored","placement","token"]},"AdSelection":{"type":"object","properties":{"method":{"type":"string","const":"under-delivery-pacing"},"candidate_limit":{"type":"integer","const":250}},"required":["method","candidate_limit"]},"AdServeResponse":{"type":"object","properties":{"item":{"oneOf":[{"$ref":"#/components/schemas/SponsoredAd"},{"type":"null"}]},"selection":{"$ref":"#/components/schemas/AdSelection"}},"required":["item","selection"]},"AdDailyMetric":{"type":"object","properties":{"ad_id":{"type":"string","minLength":1,"maxLength":96},"day":{"type":"string","format":"date"},"impressions":{"type":"integer"},"clicks":{"type":"integer"},"hides":{"type":"integer"},"spend_micros":{"type":"integer"}},"required":["ad_id","day","impressions","clicks","hides","spend_micros"]},"AdReportSummary":{"type":"object","properties":{"state":{"type":"string","enum":["open","reviewing","resolved","dismissed"]},"reason":{"type":"string","enum":["spam","harassment","hate","violence","sexual","impersonation","copyright","misinformation","other"]},"count":{"type":"integer","minimum":1},"latest_at":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["state","reason","count","latest_at"]},"AdAnalyticsCampaign":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"state":{"type":"string","enum":["draft","active","paused","ended"]},"spent_micros":{"type":"integer"},"total_budget_micros":{"type":"integer"}},"required":["id","name","state","spent_micros","total_budget_micros"]},"AdAnalyticsResponse":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/AdAnalyticsCampaign"},"daily":{"type":"array","items":{"$ref":"#/components/schemas/AdDailyMetric"}},"reports":{"type":"array","items":{"$ref":"#/components/schemas/AdReportSummary"}}},"required":["campaign","daily","reports"]},"SessionDescription":{"type":"object","properties":{"type":{"type":"string","enum":["offer","answer","pranswer","rollback"]},"sdp":{"type":"string","maxLength":49152}},"required":["type"]},"IceCandidate":{"type":"object","properties":{"candidate":{"type":"string","maxLength":8192},"sdpMid":{"type":["string","null"]},"sdpMLineIndex":{"type":["integer","null"],"format":"int64"},"usernameFragment":{"type":["string","null"]}}},"RoomPeer":{"type":"object","properties":{"connectionId":{"type":"string"},"userId":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string"}},"required":["connectionId","userId","role"]},"WebRtcDescriptionEvent":{"type":"object","properties":{"type":{"type":"string","enum":["webrtc.offer","webrtc.answer"]},"to":{"type":"string"},"from":{"type":"string"},"sdp":{"$ref":"#/components/schemas/SessionDescription"}},"required":["type","to","sdp"]},"WebRtcIceEvent":{"type":"object","properties":{"type":{"type":"string","const":"webrtc.ice"},"to":{"type":"string"},"from":{"type":"string"},"candidate":{"$ref":"#/components/schemas/IceCandidate"}},"required":["type","to","candidate"]},"PresenceClientEvent":{"type":"object","properties":{"type":{"type":"string","const":"presence.update"},"state":{"type":"string","enum":["online","speaking","muted","away"]}},"required":["type","state"]},"ChatTypingClientEvent":{"type":"object","properties":{"type":{"type":"string","const":"chat.typing"},"typing":{"type":"boolean"}},"required":["type","typing"]},"RoomBroadcastClientEvent":{"type":"object","properties":{"type":{"type":"string","const":"room.broadcast"},"payload":{"type":"object","properties":{"type":{"type":"string","const":"room.notice"},"message":{"type":"string","maxLength":1000}},"required":["type","message"]}},"required":["type","payload"]},"WebSocketClientEvent":{"oneOf":[{"$ref":"#/components/schemas/WebRtcDescriptionEvent"},{"$ref":"#/components/schemas/WebRtcIceEvent"},{"$ref":"#/components/schemas/PresenceClientEvent"},{"$ref":"#/components/schemas/ChatTypingClientEvent"},{"$ref":"#/components/schemas/RoomBroadcastClientEvent"}],"discriminator":{"propertyName":"type"}},"RoomReadyEvent":{"type":"object","properties":{"type":{"type":"string","const":"room.ready"},"roomId":{"type":"string","minLength":1,"maxLength":96},"roomKind":{"type":"string","enum":["live","call","chat"]},"roomMode":{"type":"string"},"connectionId":{"type":"string"},"userId":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string"},"transport":{"type":"string","const":"mesh"},"iceServers":{"type":"array","items":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"}}},"required":["urls"]}},"peers":{"type":"array","items":{"$ref":"#/components/schemas/RoomPeer"}}},"required":["type","roomId","roomKind","roomMode","connectionId","userId","role","transport","iceServers","peers"]},"PeerEvent":{"type":"object","properties":{"type":{"type":"string","enum":["peer.joined","peer.left"]},"roomId":{"type":"string","minLength":1,"maxLength":96},"connectionId":{"type":"string"},"userId":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string"}},"required":["type","roomId","connectionId","userId","role"]},"PeerRoleEvent":{"type":"object","properties":{"type":{"type":"string","enum":["peer.role","room.role"]},"roomId":{"type":"string","minLength":1,"maxLength":96},"userId":{"type":"string","minLength":1,"maxLength":96},"role":{"type":"string"}},"required":["type","roomId","userId","role"]},"PresenceEvent":{"type":"object","properties":{"type":{"type":"string","const":"presence.update"},"roomId":{"type":"string","minLength":1,"maxLength":96},"userId":{"type":"string","minLength":1,"maxLength":96},"connectionId":{"type":"string"},"state":{"type":"string","enum":["online","speaking","muted","away"]}},"required":["type","roomId","userId","connectionId","state"]},"LiveHandEvent":{"type":"object","properties":{"type":{"type":"string","const":"live.hand"},"liveId":{"type":"string","minLength":1,"maxLength":96},"userId":{"type":"string","minLength":1,"maxLength":96},"raised":{"type":"boolean"}},"required":["type","liveId","userId","raised"]},"LiveStateEvent":{"type":"object","properties":{"type":{"type":"string","const":"live.state"},"liveId":{"type":"string","minLength":1,"maxLength":96},"state":{"type":"string","enum":["scheduled","live","ended"]},"listenerCount":{"type":"integer","minimum":0}},"required":["type","liveId","state"]},"ChatMessageEvent":{"type":"object","properties":{"type":{"type":"string","const":"chat.message"},"roomId":{"type":"string","minLength":1,"maxLength":96},"messageId":{"type":"string","minLength":1,"maxLength":96},"authorId":{"type":"string","minLength":1,"maxLength":96},"body":{"type":"string"},"sentAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["type","roomId","messageId","authorId","body","sentAt"]},"ChatMessageUpdatedEvent":{"type":"object","properties":{"type":{"type":"string","const":"chat.message.updated"},"roomId":{"type":"string","minLength":1,"maxLength":96},"messageId":{"type":"string","minLength":1,"maxLength":96},"authorId":{"type":"string","minLength":1,"maxLength":96},"body":{"type":"string"},"editedAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["type","roomId","messageId","authorId","body","editedAt"]},"ChatMessageDeletedEvent":{"type":"object","properties":{"type":{"type":"string","const":"chat.message.deleted"},"roomId":{"type":"string","minLength":1,"maxLength":96},"messageId":{"type":"string","minLength":1,"maxLength":96},"actorId":{"type":"string","minLength":1,"maxLength":96},"deletedAt":{"type":"integer","format":"int64","description":"Unix time in seconds"}},"required":["type","roomId","messageId","actorId","deletedAt"]},"ChatReactionEvent":{"type":"object","properties":{"type":{"type":"string","enum":["chat.reaction.added","chat.reaction.removed"]},"roomId":{"type":"string","minLength":1,"maxLength":96},"messageId":{"type":"string","minLength":1,"maxLength":96},"userId":{"type":"string","minLength":1,"maxLength":96},"kind":{"type":"string","enum":["like","love","laugh","surprise","sad"]}},"required":["type","roomId","messageId","userId","kind"]},"ChatChannelUpdatedEvent":{"type":"object","properties":{"type":{"type":"string","const":"chat.channel.updated"},"roomId":{"type":"string","minLength":1,"maxLength":96},"channel":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":96},"serverId":{"type":"string","minLength":1,"maxLength":96},"name":{"type":"string"},"kind":{"type":"string","enum":["text","voice","announcement"]},"position":{"type":"integer"}},"required":["id","serverId","name","kind","position"]}},"required":["type","roomId","channel"]},"ChatChannelDeletedEvent":{"type":"object","properties":{"type":{"type":"string","const":"chat.channel.deleted"},"roomId":{"type":"string","minLength":1,"maxLength":96},"serverId":{"type":"string","minLength":1,"maxLength":96}},"required":["type","roomId","serverId"]},"ChatTypingEvent":{"type":"object","properties":{"type":{"type":"string","const":"chat.typing"},"roomId":{"type":"string","minLength":1,"maxLength":96},"userId":{"type":"string","minLength":1,"maxLength":96},"typing":{"type":"boolean"}},"required":["type","roomId","userId","typing"]},"RoomNoticeEvent":{"type":"object","properties":{"type":{"type":"string","const":"room.notice"},"roomId":{"type":"string","minLength":1,"maxLength":96},"authorId":{"type":"string","minLength":1,"maxLength":96},"message":{"type":"string"}},"required":["type","roomId","authorId","message"]},"RoomEndedEvent":{"type":"object","properties":{"type":{"type":"string","const":"room.ended"},"roomId":{"type":"string","minLength":1,"maxLength":96},"roomKind":{"type":"string","enum":["live","call","chat"]}},"required":["type","roomId","roomKind"]},"NotificationCreatedEvent":{"type":"object","properties":{"type":{"type":"string","const":"notification.created"},"notificationId":{"type":"string","minLength":1,"maxLength":96}},"required":["type","notificationId"]},"RealtimeErrorEvent":{"type":"object","properties":{"type":{"type":"string","const":"error"},"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["type","code","message"]},"WebSocketServerEvent":{"oneOf":[{"$ref":"#/components/schemas/RoomReadyEvent"},{"$ref":"#/components/schemas/PeerEvent"},{"$ref":"#/components/schemas/PeerRoleEvent"},{"$ref":"#/components/schemas/WebRtcDescriptionEvent"},{"$ref":"#/components/schemas/WebRtcIceEvent"},{"$ref":"#/components/schemas/PresenceEvent"},{"$ref":"#/components/schemas/LiveHandEvent"},{"$ref":"#/components/schemas/LiveStateEvent"},{"$ref":"#/components/schemas/ChatMessageEvent"},{"$ref":"#/components/schemas/ChatMessageUpdatedEvent"},{"$ref":"#/components/schemas/ChatMessageDeletedEvent"},{"$ref":"#/components/schemas/ChatReactionEvent"},{"$ref":"#/components/schemas/ChatChannelUpdatedEvent"},{"$ref":"#/components/schemas/ChatChannelDeletedEvent"},{"$ref":"#/components/schemas/ChatTypingEvent"},{"$ref":"#/components/schemas/RoomNoticeEvent"},{"$ref":"#/components/schemas/RoomEndedEvent"},{"$ref":"#/components/schemas/NotificationCreatedEvent"},{"$ref":"#/components/schemas/RealtimeErrorEvent"}],"discriminator":{"propertyName":"type"}}}},"x-log-policy":{"aiAutonomousPosting":false,"aiAutonomousMessaging":false,"aiAutonomousRoomCreation":false,"aiRequiresHumanPublishAction":true,"aiExternalModelEnabled":false,"aiPolicyAllowedUses":["moderation-assist","search-assist","summary","translation","alt-text-draft"],"aiEnabledUses":["moderation-assist"],"paidCloudflareUpgradeAutomatic":false}}