openapi: 3.1.0 info: title: Api version: 1.0.0 description: VYBEHQ - Short-form video platform API servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: auth description: Authentication - name: users description: User profiles and social - name: videos description: Video content - name: feed description: Content feeds - name: social description: Likes and comments - name: report description: Content reporting - name: moderation description: Moderation queue - name: admin description: Admin user management - name: owner description: Owner settings and bot control - name: upload description: File upload - name: system description: Platform system info paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /auth/register: post: operationId: register tags: [auth] summary: Register a new user requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RegisterInput" responses: "201": description: Registered content: application/json: schema: $ref: "#/components/schemas/TokenPair" "400": $ref: "#/components/responses/Error" /auth/login: post: operationId: login tags: [auth] summary: Login requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LoginInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/TokenPair" "401": $ref: "#/components/responses/Error" /auth/refresh: post: operationId: refreshToken tags: [auth] summary: Refresh access token requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RefreshInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/TokenPair" "401": $ref: "#/components/responses/Error" /auth/logout: post: operationId: logout tags: [auth] summary: Logout and revoke refresh token requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RefreshInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /users: get: operationId: listUsers tags: [users] summary: List or search users security: - bearerAuth: [] parameters: - name: search in: query schema: type: string - name: limit in: query schema: type: integer default: 20 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/UserProfile" /users/me: get: operationId: getMe tags: [users] summary: Get current user profile security: - bearerAuth: [] responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserProfile" patch: operationId: updateMe tags: [users] summary: Update current user profile security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateProfileInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserProfile" /users/{id}: get: operationId: getUserById tags: [users] summary: Get user by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserProfile" "404": $ref: "#/components/responses/Error" /users/{id}/follow: post: operationId: followUser tags: [users] summary: Follow a user security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: unfollowUser tags: [users] summary: Unfollow a user security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /users/{id}/block: post: operationId: blockUser tags: [users] summary: Block a user security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: unblockUser tags: [users] summary: Unblock a user security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /users/{id}/report: post: operationId: reportUser tags: [users] summary: Report a user security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReportInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Report" /videos: post: operationId: createVideo tags: [videos] summary: Create a video (requires age verification) security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateVideoInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Video" "400": $ref: "#/components/responses/Error" "403": $ref: "#/components/responses/Error" /videos/{id}: get: operationId: getVideo tags: [videos] summary: Get a video by ID security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Video" "404": $ref: "#/components/responses/Error" patch: operationId: updateVideo tags: [videos] summary: Update a video security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateVideoInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Video" delete: operationId: deleteVideo tags: [videos] summary: Delete a video security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /videos/{id}/report: post: operationId: reportVideo tags: [videos] summary: Report a video security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReportInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Report" /feed/for-you: get: operationId: getForYouFeed tags: [feed] summary: Algorithmic For You feed security: - bearerAuth: [] parameters: - name: limit in: query schema: type: integer default: 20 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/FeedVideo" /feed/following: get: operationId: getFollowingFeed tags: [feed] summary: Following feed security: - bearerAuth: [] parameters: - name: limit in: query schema: type: integer default: 20 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/FeedVideo" /feed/trending: get: operationId: getTrendingFeed tags: [feed] summary: Trending feed security: - bearerAuth: [] parameters: - name: limit in: query schema: type: integer default: 20 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/FeedVideo" /like/{videoId}: post: operationId: likeVideo tags: [social] summary: Like a video security: - bearerAuth: [] parameters: - name: videoId in: path required: true schema: type: string format: uuid responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" delete: operationId: unlikeVideo tags: [social] summary: Unlike a video security: - bearerAuth: [] parameters: - name: videoId in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /comment/{videoId}: get: operationId: getComments tags: [social] summary: Get comments for a video security: - bearerAuth: [] parameters: - name: videoId in: path required: true schema: type: string format: uuid - name: limit in: query schema: type: integer default: 20 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Comment" post: operationId: createComment tags: [social] summary: Create a comment security: - bearerAuth: [] parameters: - name: videoId in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateCommentInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Comment" /comment/{commentId}: patch: operationId: updateComment tags: [social] summary: Update a comment (author only) security: - bearerAuth: [] parameters: - name: commentId in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateCommentInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Comment" delete: operationId: deleteComment tags: [social] summary: Delete a comment security: - bearerAuth: [] parameters: - name: commentId in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /upload/video: post: operationId: uploadVideo tags: [upload] summary: Upload a video file security: - bearerAuth: [] requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary required: [file] responses: "201": description: Uploaded content: application/json: schema: $ref: "#/components/schemas/UploadResult" /upload/image: post: operationId: uploadImage tags: [upload] summary: Upload an image file security: - bearerAuth: [] requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary required: [file] responses: "201": description: Uploaded content: application/json: schema: $ref: "#/components/schemas/UploadResult" /follow/{userId}/followers: get: operationId: getFollowers tags: [social] summary: Get followers of a user security: - bearerAuth: [] parameters: - name: userId in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/UserSummary" /follow/{userId}/following: get: operationId: getFollowing tags: [social] summary: Get users that a user is following security: - bearerAuth: [] parameters: - name: userId in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/UserSummary" /report: post: operationId: createReport tags: [report] summary: Submit a report security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateReportInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Report" get: operationId: listReports tags: [report] summary: List reports (MODERATOR+) security: - bearerAuth: [] responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/Report" /moderation/queue: get: operationId: getModerationQueue tags: [moderation] summary: Get moderation queue (MODERATOR+) security: - bearerAuth: [] parameters: - name: status in: query schema: type: string enum: [PENDING, REVIEWED, ESCALATED] - name: limit in: query schema: type: integer default: 50 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ModerationQueueItem" /moderation/queue/{id}/assign: post: operationId: assignQueueItem tags: [moderation] summary: Assign queue item to self (MODERATOR+) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ModerationQueueItem" /moderation/queue/{id}/status: patch: operationId: updateQueueStatus tags: [moderation] summary: Update queue item status (MODERATOR+) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateStatusInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ModerationQueueItem" /moderation/queue/{id}/action: post: operationId: takeModerationAction tags: [moderation] summary: Take a moderation action (MODERATOR+) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ModerationActionInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /moderation/log: get: operationId: getModerationLog tags: [moderation] summary: Get immutable moderation action log (ADMIN+) security: - bearerAuth: [] parameters: - name: limit in: query schema: type: integer default: 100 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ModerationActionLog" /admin/users: get: operationId: adminListUsers tags: [admin] summary: Admin list users (ADMIN+) security: - bearerAuth: [] parameters: - name: search in: query schema: type: string - name: limit in: query schema: type: integer default: 50 - name: offset in: query schema: type: integer default: 0 responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/UserProfile" /admin/users/{id}: get: operationId: adminGetUser tags: [admin] summary: Admin get user (ADMIN+) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserProfile" patch: operationId: adminUpdateUser tags: [admin] summary: Admin update user role or suspension (ADMIN+) security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminUpdateUserInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserProfile" /owner/settings: get: operationId: getOwnerSettings tags: [owner] summary: Get platform settings (OWNER only) security: - bearerAuth: [] responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PlatformConfig" patch: operationId: updateOwnerSettings tags: [owner] summary: Update platform settings (OWNER only) security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdatePlatformConfigInput" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/PlatformConfig" /owner/bots: get: operationId: listBotUsers tags: [owner] summary: List bot users (OWNER only) security: - bearerAuth: [] responses: "200": description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/BotUser" post: operationId: createBotUser tags: [owner] summary: Create a bot user (OWNER only) security: - bearerAuth: [] responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/UserProfile" /owner/bots/seed: post: operationId: seedBotContent tags: [owner] summary: Seed content from a bot user (OWNER only) security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SeedBotInput" responses: "201": description: Created content: application/json: schema: type: array items: $ref: "#/components/schemas/Video" /owner/bots/purge: post: operationId: purgeBotContent tags: [owner] summary: Purge all bot-generated content (OWNER only) security: - bearerAuth: [] responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SuccessResponse" /system/status: get: operationId: getSystemStatus tags: [system] summary: Get system status responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/SystemStatus" /system/features: get: operationId: getFeatureFlags tags: [system] summary: Get platform feature flags responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/FeatureFlags" components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT responses: Error: description: Error content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" schemas: HealthStatus: type: object properties: status: type: string required: [status] ErrorResponse: type: object properties: error: type: string required: [error] SuccessResponse: type: object properties: success: type: boolean required: [success] TokenPair: type: object properties: accessToken: type: string refreshToken: type: string required: [accessToken, refreshToken] RegisterInput: type: object properties: username: type: string minLength: 3 maxLength: 30 email: type: string format: email password: type: string minLength: 8 dateOfBirth: type: string format: date-time displayName: type: string maxLength: 50 required: [username, email, password, dateOfBirth] LoginInput: type: object properties: email: type: string format: email password: type: string required: [email, password] RefreshInput: type: object properties: refreshToken: type: string required: [refreshToken] UserProfile: type: object properties: id: type: string format: uuid username: type: string displayName: type: string nullable: true bio: type: string nullable: true profilePhotoUrl: type: string nullable: true bannerUrl: type: string nullable: true links: type: array items: type: string followerCount: type: integer followingCount: type: integer isFollowing: type: boolean description: Whether the requesting user is following this profile profileVisibility: type: string enum: [PUBLIC, FOLLOWERS, PRIVATE] role: type: string enum: [USER, MODERATOR, ADMIN, OWNER] isBot: type: boolean isSuspended: type: boolean reputationScore: type: integer verified: type: boolean standing: type: string enum: [GOOD, FAIR, POOR, BAD, CRITICAL] nullable: true createdAt: type: string format: date-time required: [id, username, followerCount, followingCount, role, isBot, isSuspended, reputationScore, createdAt] UserSummary: type: object properties: id: type: string format: uuid username: type: string displayName: type: string nullable: true profilePhotoUrl: type: string nullable: true required: [id, username] UpdateProfileInput: type: object properties: displayName: type: string maxLength: 50 bio: type: string maxLength: 300 profilePhotoUrl: type: string format: uri bannerUrl: type: string format: uri links: type: array items: type: string maxItems: 5 profileVisibility: type: string enum: [PUBLIC, FOLLOWERS, PRIVATE] commentPermission: type: string enum: [EVERYONE, FOLLOWERS, NONE] messagePermissionEnabled: type: boolean Video: type: object properties: id: type: string format: uuid creatorId: type: string format: uuid title: type: string description: type: string nullable: true videoUrl: type: string thumbnailUrl: type: string nullable: true duration: type: integer status: type: string enum: [ACTIVE, LIMITED, REMOVED, UNDER_REVIEW] visibility: type: string enum: [PUBLIC, FOLLOWERS_ONLY, PRIVATE] viewCount: type: integer likeCount: type: integer commentCount: type: integer isBotContent: type: boolean shadowLimited: type: boolean tags: type: array items: type: string createdAt: type: string format: date-time required: [id, creatorId, title, videoUrl, duration, status, visibility, viewCount, likeCount, commentCount, isBotContent, shadowLimited, createdAt] FeedVideo: allOf: - $ref: "#/components/schemas/Video" - type: object properties: creator: $ref: "#/components/schemas/UserSummary" whySeeing: type: string required: [creator, whySeeing] CreateVideoInput: type: object properties: title: type: string maxLength: 150 description: type: string maxLength: 1000 videoUrl: type: string format: uri thumbnailUrl: type: string format: uri duration: type: integer minimum: 0 visibility: type: string enum: [PUBLIC, FOLLOWERS_ONLY, PRIVATE] tags: type: array items: type: string minItems: 1 maxItems: 20 required: [title, videoUrl, tags] UpdateVideoInput: type: object properties: title: type: string maxLength: 150 description: type: string maxLength: 1000 thumbnailUrl: type: string format: uri visibility: type: string enum: [PUBLIC, FOLLOWERS_ONLY, PRIVATE] tags: type: array items: type: string minItems: 1 maxItems: 20 Comment: type: object properties: id: type: string format: uuid videoId: type: string format: uuid authorId: type: string format: uuid authorUsername: type: string content: type: string likeCount: type: integer createdAt: type: string format: date-time required: [id, videoId, authorId, content, likeCount, createdAt] CreateCommentInput: type: object properties: content: type: string maxLength: 500 required: [content] UpdateCommentInput: type: object properties: content: type: string minLength: 1 maxLength: 500 required: [content] UploadResult: type: object properties: url: type: string format: uri key: type: string required: [url, key] ReportInput: type: object properties: type: type: string enum: [VIOLENCE, HARASSMENT, NSFW, SPAM, MISINFORMATION, OTHER] notes: type: string maxLength: 500 required: [type] CreateReportInput: type: object properties: targetType: type: string enum: [VIDEO, USER, COMMENT] targetId: type: string format: uuid type: type: string enum: [VIOLENCE, HARASSMENT, NSFW, SPAM, MISINFORMATION, OTHER] notes: type: string maxLength: 500 required: [targetType, targetId, type] Report: type: object properties: id: type: string format: uuid reporterId: type: string format: uuid targetType: type: string enum: [VIDEO, USER, COMMENT] targetId: type: string format: uuid type: type: string enum: [VIOLENCE, HARASSMENT, NSFW, SPAM, MISINFORMATION, OTHER] notes: type: string nullable: true createdAt: type: string format: date-time required: [id, reporterId, targetType, targetId, type, createdAt] ModerationQueueItem: type: object properties: id: type: string format: uuid targetType: type: string enum: [VIDEO, USER, COMMENT] targetId: type: string format: uuid reportId: type: string format: uuid nullable: true status: type: string enum: [PENDING, REVIEWED, ESCALATED] assignedTo: type: string format: uuid nullable: true reason: type: string nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time required: [id, targetType, targetId, status, createdAt, updatedAt] UpdateStatusInput: type: object properties: status: type: string enum: [REVIEWED, ESCALATED] required: [status] ModerationActionInput: type: object properties: action: type: string enum: [REMOVE, LIMIT_VISIBILITY, SHADOW_LIMIT, ISSUE_WARNING, RESTORE] reason: type: string maxLength: 500 required: [action] ModerationActionLog: type: object properties: id: type: string format: uuid actorId: type: string format: uuid targetType: type: string enum: [VIDEO, USER, COMMENT] targetId: type: string format: uuid actionType: type: string reason: type: string nullable: true queueItemId: type: string format: uuid nullable: true createdAt: type: string format: date-time required: [id, actorId, targetType, targetId, actionType, createdAt] AdminUpdateUserInput: type: object properties: role: type: string enum: [USER, MODERATOR, ADMIN, OWNER] isSuspended: type: boolean suspendedReason: type: string maxLength: 500 PlatformConfig: type: object properties: id: type: string format: uuid botSystemEnabled: type: boolean aiContentEnabled: type: boolean commentAgeGateEnabled: type: boolean liveFeatureEnabled: type: boolean keywordFilterList: type: array items: type: string spamWindowSeconds: type: integer spamThreshold: type: integer uploadCooldownSeconds: type: integer uploadVelocityLimit: type: integer feedScoreWatchTimeWeight: type: integer feedScoreEngagementWeight: type: integer feedScoreRecencyWeight: type: integer feedScoreTagWeight: type: integer feedScoreReputationWeight: type: integer updatedAt: type: string format: date-time required: [id, botSystemEnabled, aiContentEnabled, commentAgeGateEnabled, liveFeatureEnabled, updatedAt] UpdatePlatformConfigInput: type: object properties: botSystemEnabled: type: boolean aiContentEnabled: type: boolean commentAgeGateEnabled: type: boolean liveFeatureEnabled: type: boolean keywordFilterList: type: array items: type: string spamWindowSeconds: type: integer minimum: 60 spamThreshold: type: integer minimum: 1 uploadCooldownSeconds: type: integer minimum: 60 uploadVelocityLimit: type: integer minimum: 1 feedScoreWatchTimeWeight: type: integer minimum: 0 maximum: 100 feedScoreEngagementWeight: type: integer minimum: 0 maximum: 100 feedScoreRecencyWeight: type: integer minimum: 0 maximum: 100 feedScoreTagWeight: type: integer minimum: 0 maximum: 100 feedScoreReputationWeight: type: integer minimum: 0 maximum: 100 BotUser: type: object properties: id: type: string format: uuid username: type: string purpose: type: string createdAt: type: string format: date-time required: [id, username, purpose, createdAt] SeedBotInput: type: object properties: botUserId: type: string format: uuid count: type: integer minimum: 1 maximum: 50 required: [botUserId] SystemStatus: type: object properties: status: type: string timestamp: type: string format: date-time version: type: string required: [status, timestamp, version] FeatureFlags: type: object properties: botSystemEnabled: type: boolean aiContentEnabled: type: boolean commentAgeGateEnabled: type: boolean liveFeatureEnabled: type: boolean required: [botSystemEnabled, aiContentEnabled, commentAgeGateEnabled, liveFeatureEnabled]