{ "openapi": "3.1.0", "info": { "title": "AIDREAM API", "version": "0.0.0", "description": "05_API_CONTRACT.md 의 REST 계약. 현재 T03 인증·프로필·시스템과 T05 멀티파트 업로드 범위를 포함한다. 모든 응답은 no-store 이며 X-Request-Id 헤더를 가진다." }, "servers": [ { "url": "/api" } ], "tags": [ { "name": "help", "description": "Public guide and catalog" }, { "name": "messages", "description": "1:1 메시지 (T18)" }, { "name": "auth", "description": "인증 · 계정 라이프사이클" }, { "name": "me", "description": "내 프로필" }, { "name": "uploads", "description": "멀티파트 업로드 · 재개" }, { "name": "system", "description": "라이브니스 · 레디니스" }, { "name": "series", "description": "시리즈 생성 · 조회 · 관리" }, { "name": "episodes", "description": "에피소드 생성 · 조회 · 상태 전이" }, { "name": "feed", "description": "피드 · 검색 · 태그" }, { "name": "social", "description": "팔로우 · 차단 · 좋아요 · 댓글 · 알림" }, { "name": "moderation", "description": "신고 접수 · 심사 · 사용자 제재" } ], "components": { "headers": { "XRequestId": { "description": "로그 상관관계 ID", "required": true, "schema": { "type": "string" } }, "RetryAfter": { "description": "재시도 가능 시각까지의 초", "required": true, "schema": { "type": "integer", "minimum": 0 } } }, "securitySchemes": { "sessionCookie": { "type": "apiKey", "in": "cookie", "name": "authjs.session-token", "description": "Auth.js DB 세션 쿠키 (httpOnly, secure, sameSite=lax)" } }, "schemas": { "DmPolicy": { "type": "string", "enum": ["EVERYONE", "FOLLOWERS", "NOBODY"] }, "PublicUser": { "type": "object", "required": [ "handle", "displayName", "avatarUrl", "tier", "isVerified" ], "properties": { "handle": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": ["string", "null"], "format": "uri" }, "tier": { "type": "string" }, "isVerified": { "type": "boolean" } } }, "DirectMessage": { "type": "object", "required": [ "id", "conversationId", "senderId", "body", "createdAt", "mine" ], "properties": { "id": { "type": "string" }, "conversationId": { "type": "string" }, "senderId": { "type": "string" }, "body": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "mine": { "type": "boolean" } } }, "ConversationSummary": { "type": "object", "required": [ "id", "other", "startedByMe", "lastMessageAt", "lastMessagePreview", "lastMessageMine", "unread" ], "properties": { "id": { "type": "string" }, "other": { "$ref": "#/components/schemas/PublicUser" }, "startedByMe": { "type": "boolean" }, "lastMessageAt": { "type": "string", "format": "date-time" }, "lastMessagePreview": { "type": "string", "maxLength": 120 }, "lastMessageMine": { "type": "boolean" }, "unread": { "type": "integer", "minimum": 0 } } }, "ConversationDetail": { "allOf": [ { "$ref": "#/components/schemas/ConversationSummary" }, { "type": "object", "required": ["otherId", "canSend", "denial"], "properties": { "otherId": { "type": "string" }, "canSend": { "type": "boolean" }, "denial": { "type": ["string", "null"], "enum": [ "E_USER_SELF_ACTION", "E_SOCIAL_BLOCKED", "E_DM_NOT_CREATOR", "E_DM_CLOSED", "E_DM_FOLLOWERS_ONLY", null ] } } } ] }, "MessageInput": { "type": "object", "required": ["body"], "properties": { "body": { "type": "string", "minLength": 1, "maxLength": 2000 } } }, "ErrorResponse": { "type": "object", "required": ["error"], "additionalProperties": false, "properties": { "error": { "type": "object", "required": ["code", "message", "fields", "requestId"], "additionalProperties": false, "properties": { "code": { "type": "string", "pattern": "^E_[A-Z0-9_]+$" }, "message": { "type": "string" }, "fields": { "oneOf": [ { "type": "null" }, { "type": "object", "additionalProperties": { "type": "string" } } ] }, "requestId": { "type": "string" } } } } }, "SignupRequest": { "type": "object", "required": ["email", "password", "handle", "displayName"], "additionalProperties": false, "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 10 }, "handle": { "type": "string", "pattern": "^[a-z0-9_]{3,20}$" }, "displayName": { "type": "string", "minLength": 1, "maxLength": 40 } } }, "SignupResponse": { "type": "object", "required": ["id", "handle", "email", "emailVerified"], "additionalProperties": false, "properties": { "id": { "type": "string" }, "handle": { "type": "string" }, "email": { "type": "string", "format": "email" }, "emailVerified": { "type": "null" } } }, "VerifyEmailRequest": { "type": "object", "required": ["token"], "additionalProperties": false, "properties": { "token": { "type": "string", "minLength": 1, "maxLength": 256 } } }, "VerifyEmailResponse": { "type": "object", "required": ["userId", "emailVerified"], "additionalProperties": false, "properties": { "userId": { "type": "string" }, "emailVerified": { "type": "string", "format": "date-time" } } }, "ForgotPasswordRequest": { "type": "object", "required": ["email"], "additionalProperties": false, "properties": { "email": { "type": "string", "format": "email" } } }, "ResetPasswordRequest": { "type": "object", "required": ["token", "password"], "additionalProperties": false, "properties": { "token": { "type": "string", "minLength": 1, "maxLength": 256 }, "password": { "type": "string", "minLength": 10 } } }, "UpdateProfileRequest": { "type": "object", "additionalProperties": false, "properties": { "displayName": { "type": "string", "minLength": 1, "maxLength": 40 }, "bio": { "oneOf": [ { "type": "null" }, { "type": "string", "maxLength": 500 } ] }, "avatarKey": { "oneOf": [ { "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 255 } ] } } }, "Me": { "type": "object", "required": [ "id", "handle", "email", "displayName", "bio", "avatarUrl", "role", "status", "emailVerified", "createdAt" ], "additionalProperties": false, "properties": { "id": { "type": "string" }, "handle": { "type": "string" }, "email": { "type": "string", "format": "email" }, "displayName": { "type": "string" }, "bio": { "oneOf": [ { "type": "null" }, { "type": "string" } ] }, "avatarUrl": { "oneOf": [ { "type": "null" }, { "type": "string", "format": "uri" } ] }, "role": { "type": "string", "enum": ["VIEWER", "CREATOR", "MODERATOR", "ADMIN"] }, "status": { "type": "string", "enum": ["ACTIVE", "SUSPENDED", "DELETED"] }, "emailVerified": { "oneOf": [ { "type": "null" }, { "type": "string", "format": "date-time" } ] }, "createdAt": { "type": "string", "format": "date-time" } } }, "CreateUploadRequest": { "type": "object", "required": ["fileName", "fileSize", "mimeType"], "additionalProperties": false, "properties": { "fileName": { "type": "string", "minLength": 1, "maxLength": 255 }, "fileSize": { "type": "integer", "minimum": 1 }, "mimeType": { "type": "string", "enum": [ "video/mp4", "video/quicktime", "video/x-matroska", "video/webm" ] }, "checksum": { "type": "string", "maxLength": 128 } } }, "SignedPart": { "type": "object", "required": ["partNumber", "url", "expiresAt"], "additionalProperties": false, "properties": { "partNumber": { "type": "integer", "minimum": 1, "maximum": 10000 }, "url": { "type": "string", "format": "uri" }, "expiresAt": { "type": "string", "format": "date-time" } } }, "CreateUploadResponse": { "type": "object", "required": [ "uploadId", "partSize", "totalParts", "parts", "expiresAt" ], "additionalProperties": false, "properties": { "uploadId": { "type": "string" }, "partSize": { "type": "integer", "minimum": 1 }, "totalParts": { "type": "integer", "minimum": 1, "maximum": 10000 }, "parts": { "type": "array", "items": { "$ref": "#/components/schemas/SignedPart" } }, "expiresAt": { "type": "string", "format": "date-time" } } }, "UploadSessionState": { "type": "object", "required": [ "uploadId", "status", "fileName", "fileSize", "partSize", "totalParts", "completedParts", "expiresAt" ], "additionalProperties": false, "properties": { "uploadId": { "type": "string" }, "status": { "type": "string", "enum": ["CREATED", "UPLOADING", "UPLOADED", "FAILED", "ABORTED"] }, "fileName": { "type": "string" }, "fileSize": { "type": "integer", "minimum": 1 }, "partSize": { "type": "integer", "minimum": 1 }, "totalParts": { "type": "integer", "minimum": 1, "maximum": 10000 }, "completedParts": { "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 10000 } }, "expiresAt": { "type": "string", "format": "date-time" } } }, "SignPartsRequest": { "type": "object", "required": ["partNumbers"], "additionalProperties": false, "properties": { "partNumbers": { "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 10000 } } } }, "CompleteUploadRequest": { "type": "object", "required": ["parts"], "additionalProperties": false, "properties": { "parts": { "type": "array", "description": "이번 브라우저 탭에서 새로 완료한 파트. 재개 전 파트는 서버가 병합한다.", "items": { "type": "object", "required": ["partNumber", "etag"], "additionalProperties": false, "properties": { "partNumber": { "type": "integer", "minimum": 1, "maximum": 10000 }, "etag": { "type": "string", "minLength": 1, "maxLength": 256 } } } } } }, "CompleteUploadResponse": { "type": "object", "required": ["assetId", "status"], "additionalProperties": false, "properties": { "assetId": { "type": "string" }, "status": { "type": "string", "enum": ["PENDING"] } } }, "AgeConfirmRequest": { "type": "object", "required": ["confirmed"], "additionalProperties": false, "properties": { "confirmed": { "type": "boolean", "const": true }, "birthYear": { "type": "integer", "minimum": 1900 } } }, "SaveProgressRequest": { "type": "object", "required": ["positionSec"], "additionalProperties": false, "properties": { "positionSec": { "type": "integer", "minimum": 0 }, "completed": { "type": "boolean" } } }, "PlaybackResponse": { "type": "object", "required": [ "episodeId", "masterUrl", "durationSec", "startAtSec", "renditions" ], "additionalProperties": false, "properties": { "episodeId": { "type": "string" }, "masterUrl": { "type": "string", "format": "uri" }, "posterUrl": { "type": "string", "format": "uri" }, "durationSec": { "type": "integer", "minimum": 1 }, "startAtSec": { "type": "integer", "minimum": 0 }, "renditions": { "type": "array", "items": { "type": "object", "required": ["name", "width", "height"], "additionalProperties": false, "properties": { "name": { "type": "string" }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 } } } } } }, "CreateSeriesRequest": { "type": "object", "required": ["title"], "additionalProperties": false, "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 120 }, "synopsis": { "type": "string", "maxLength": 2000 }, "posterKey": { "type": "string", "minLength": 1 }, "ageRating": { "$ref": "#/components/schemas/AgeRating" } } }, "UpdateSeriesRequest": { "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 120 }, "synopsis": { "type": ["string", "null"], "maxLength": 2000 }, "posterKey": { "type": ["string", "null"], "minLength": 1 }, "ageRating": { "$ref": "#/components/schemas/AgeRating" }, "isCompleted": { "type": "boolean" }, "commentsOff": { "type": "boolean" } } }, "AgeRating": { "type": "string", "enum": ["ALL", "A12", "A15", "A19"] }, "EpisodeStatus": { "type": "string", "enum": ["DRAFT", "SCHEDULED", "PUBLISHED", "HIDDEN", "REMOVED"] }, "Series": { "type": "object", "required": [ "id", "ownerId", "slug", "title", "synopsis", "ageRating", "isCompleted", "commentsOff", "episodeCount", "totalViews", "createdAt", "updatedAt" ], "properties": { "id": { "type": "string" }, "ownerId": { "type": "string" }, "slug": { "type": "string" }, "title": { "type": "string" }, "synopsis": { "type": ["string", "null"] }, "posterUrl": { "type": "string", "format": "uri" }, "ageRating": { "$ref": "#/components/schemas/AgeRating" }, "isCompleted": { "type": "boolean" }, "commentsOff": { "type": "boolean" }, "episodeCount": { "type": "integer", "minimum": 0 }, "totalViews": { "type": "string", "pattern": "^[0-9]+$" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "CreateEpisodeRequest": { "type": "object", "required": [ "seriesId", "number", "title", "assetId", "ageRating", "aiDisclosure" ], "additionalProperties": false, "properties": { "seriesId": { "type": "string", "minLength": 1 }, "seasonNumber": { "type": "integer", "minimum": 1 }, "number": { "type": "integer", "minimum": 1 }, "title": { "type": "string", "minLength": 1, "maxLength": 160 }, "description": { "type": "string", "maxLength": 2000 }, "assetId": { "type": "string", "minLength": 1 }, "ageRating": { "$ref": "#/components/schemas/AgeRating" }, "aiDisclosure": { "type": "string", "minLength": 1, "maxLength": 500 }, "tags": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 24 } } } }, "UpdateEpisodeRequest": { "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 160 }, "description": { "type": ["string", "null"], "maxLength": 2000 }, "thumbKey": { "type": ["string", "null"] }, "assetId": { "type": ["string", "null"] }, "ageRating": { "$ref": "#/components/schemas/AgeRating" }, "aiDisclosure": { "type": ["string", "null"], "maxLength": 500 }, "tags": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 24 } } } }, "PublishEpisodeRequest": { "type": "object", "required": ["action"], "additionalProperties": false, "properties": { "action": { "type": "string", "enum": ["PUBLISH", "SCHEDULE", "HIDE", "UNHIDE"] }, "publishAt": { "type": "string", "format": "date-time" } } }, "Episode": { "type": "object", "required": [ "id", "seriesId", "seasonId", "assetId", "number", "title", "description", "status", "ageRating", "aiDisclosure", "publishAt", "publishedAt", "viewCount", "likeCount", "commentCount", "createdAt", "updatedAt" ], "properties": { "id": { "type": "string" }, "seriesId": { "type": "string" }, "seasonId": { "type": ["string", "null"] }, "assetId": { "type": ["string", "null"] }, "number": { "type": "integer", "minimum": 1 }, "title": { "type": "string" }, "description": { "type": ["string", "null"] }, "thumbUrl": { "type": "string", "format": "uri" }, "status": { "$ref": "#/components/schemas/EpisodeStatus" }, "ageRating": { "$ref": "#/components/schemas/AgeRating" }, "aiDisclosure": { "type": ["string", "null"] }, "publishAt": { "type": ["string", "null"], "format": "date-time" }, "publishedAt": { "type": ["string", "null"], "format": "date-time" }, "viewCount": { "type": "string", "pattern": "^[0-9]+$" }, "likeCount": { "type": "integer", "minimum": 0 }, "commentCount": { "type": "integer", "minimum": 0 }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }, "FeedItem": { "type": "object", "required": [ "episodeId", "title", "thumbUrl", "durationSec", "ageRating", "viewCount", "likeCount", "publishedAt", "series", "creator", "isLiked" ], "properties": { "episodeId": { "type": "string" }, "title": { "type": "string" }, "thumbUrl": { "type": ["string", "null"], "format": "uri" }, "durationSec": { "type": ["integer", "null"], "minimum": 0 }, "ageRating": { "$ref": "#/components/schemas/AgeRating" }, "viewCount": { "type": "string", "pattern": "^[0-9]+$" }, "likeCount": { "type": "integer", "minimum": 0 }, "publishedAt": { "type": "string", "format": "date-time" }, "series": { "type": "object", "required": ["id", "title", "slug"], "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "slug": { "type": "string" } } }, "creator": { "type": "object", "required": ["handle", "displayName", "avatarUrl"], "properties": { "handle": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": ["string", "null"], "format": "uri" } } }, "isLiked": { "type": "boolean" } } }, "FeedPage": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/FeedItem" } }, "nextCursor": { "type": ["string", "null"] } } }, "SearchResult": { "oneOf": [ { "type": "object", "required": ["type", "id", "title", "slug", "posterUrl", "creator"], "properties": { "type": { "const": "series" }, "id": { "type": "string" }, "title": { "type": "string" }, "slug": { "type": "string" }, "posterUrl": { "type": ["string", "null"], "format": "uri" }, "creator": { "$ref": "#/components/schemas/FeedItem/properties/creator" } } }, { "type": "object", "required": ["type", "episode"], "properties": { "type": { "const": "episode" }, "episode": { "$ref": "#/components/schemas/FeedItem" } } }, { "type": "object", "required": [ "type", "handle", "displayName", "avatarUrl", "followerCount" ], "properties": { "type": { "const": "user" }, "handle": { "type": "string" }, "displayName": { "type": "string" }, "avatarUrl": { "type": ["string", "null"], "format": "uri" }, "followerCount": { "type": "integer", "minimum": 0 } } } ] }, "SocialCount": { "type": "object", "properties": { "followerCount": { "type": "integer", "minimum": 0 }, "likeCount": { "type": "integer", "minimum": 0 }, "liked": { "type": "boolean" }, "blocked": { "type": "boolean" } } }, "Comment": { "type": "object", "required": [ "id", "episodeId", "body", "parentId", "createdAt", "updatedAt", "deleted", "user" ], "properties": { "id": { "type": "string" }, "episodeId": { "type": "string" }, "body": { "type": "string", "maxLength": 1000 }, "parentId": { "type": ["string", "null"] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "deleted": { "type": "boolean" }, "user": { "$ref": "#/components/schemas/FeedItem/properties/creator" }, "replies": { "type": "array", "maxItems": 3, "items": { "$ref": "#/components/schemas/Comment" } } } }, "CommentInput": { "type": "object", "required": ["body"], "additionalProperties": false, "properties": { "body": { "type": "string", "minLength": 1, "maxLength": 1000 }, "parentId": { "type": "string" } } }, "Notification": { "type": "object", "required": ["id", "userId", "type", "payload", "readAt", "createdAt"], "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "type": { "type": "string" }, "payload": { "type": "object" }, "readAt": { "type": ["string", "null"], "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time" } } }, "Health": { "type": "object", "required": ["status"], "additionalProperties": false, "properties": { "status": { "type": "string", "const": "ok" } } }, "Ready": { "type": "object", "required": ["status", "checks"], "additionalProperties": false, "properties": { "status": { "type": "string", "enum": ["ok", "degraded"] }, "checks": { "type": "object", "required": ["db", "redis", "storage", "queue"], "additionalProperties": false, "properties": { "db": { "type": "string", "enum": ["ok", "fail"] }, "redis": { "type": "string", "enum": ["ok", "fail"] }, "storage": { "type": "string", "enum": ["ok", "fail"] }, "queue": { "type": "string", "enum": ["ok", "fail"] } } } } } } }, "paths": { "/help/chat": { "post": { "tags": ["help"], "summary": "Answer site questions using verified guide or public catalog", "description": "30 requests per IP per 600 seconds. Catalog excludes private/deleted/unpublished records and blocked creators. Personal applications and account/billing data are never queried. Optional model receives public guide text only.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["message"], "properties": { "message": { "type": "string", "minLength": 1, "maxLength": 500 }, "history": { "type": "array", "maxItems": 6, "items": { "type": "object", "required": ["role", "content"], "properties": { "role": { "type": "string", "enum": ["user", "assistant"] }, "content": { "type": "string", "minLength": 1, "maxLength": 800 } } } } } } } } }, "responses": { "200": { "description": "Answer with permitted navigation links", "content": { "application/json": { "schema": { "type": "object", "required": [ "answer", "href", "linkLabel", "source", "links" ], "properties": { "answer": { "type": "string" }, "href": { "type": "string", "nullable": true }, "linkLabel": { "type": "string", "nullable": true }, "source": { "type": "string", "enum": ["guide", "model", "catalog"] }, "links": { "type": "array", "maxItems": 6, "items": { "type": "object", "required": ["href", "label"], "properties": { "href": { "type": "string" }, "label": { "type": "string" } } } } } } } } }, "403": { "description": "Invalid request origin" }, "422": { "description": "Invalid message or history" }, "429": { "description": "Rate limit exceeded", "headers": { "Retry-After": { "$ref": "#/components/headers/RetryAfter" } } } } } }, "/conversations": { "get": { "tags": ["messages"], "summary": "내 대화 목록 (최근 메시지순)", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "대화 페이지", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ConversationSummary" } }, "nextCursor": { "type": ["string", "null"] } } } } } }, "401": { "description": "인증 필요", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": ["messages"], "summary": "작가에게 메시지 보내기. 두 사람의 대화가 있으면 이어 쓴다", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["handle", "body"], "properties": { "handle": { "type": "string" }, "body": { "type": "string", "minLength": 1, "maxLength": 2000 } } } } } }, "responses": { "201": { "description": "보냄", "content": { "application/json": { "schema": { "type": "object", "required": ["conversationId", "message"], "properties": { "conversationId": { "type": "string" }, "message": { "$ref": "#/components/schemas/DirectMessage" } } } } } }, "400": { "description": "E_USER_SELF_ACTION", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "E_DM_NOT_CREATOR · E_DM_CLOSED · E_DM_FOLLOWERS_ONLY · E_SOCIAL_BLOCKED · E_PERM_DENIED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "E_USER_NOT_FOUND", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "E_DM_TOO_LONG", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED (새 대화 20회/일)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/conversations/{id}": { "get": { "tags": ["messages"], "summary": "대화 머리 — 상대와 내 쪽 전송 가능 여부", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "대화", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationDetail" } } } }, "404": { "description": "E_DM_CONVERSATION_NOT_FOUND", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/conversations/{id}/messages": { "get": { "tags": ["messages"], "summary": "메시지 (오래된 순). cursor 는 과거 쪽, after 는 그 메시지 이후", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } }, { "name": "after", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "메시지 페이지", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/DirectMessage" } }, "nextCursor": { "type": ["string", "null"] } } } } } }, "404": { "description": "E_DM_CONVERSATION_NOT_FOUND", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": ["messages"], "summary": "답장·이어 보내기", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageInput" } } } }, "responses": { "201": { "description": "보냄", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectMessage" } } } }, "403": { "description": "E_DM_CLOSED · E_DM_FOLLOWERS_ONLY · E_SOCIAL_BLOCKED · E_PERM_DENIED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "E_DM_CONVERSATION_NOT_FOUND", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "E_DM_TOO_LONG", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED (20회/분)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/conversations/{id}/read": { "post": { "tags": ["messages"], "summary": "내 쪽 읽지 않은 수를 0 으로", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "읽음" }, "404": { "description": "E_DM_CONVERSATION_NOT_FOUND", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/messages/unread": { "get": { "tags": ["messages"], "summary": "읽지 않은 메시지 수 (배지)", "responses": { "200": { "description": "수", "content": { "application/json": { "schema": { "type": "object", "required": ["count"], "properties": { "count": { "type": "integer", "minimum": 0 } } } } } }, "401": { "description": "인증 필요", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/account/messaging": { "get": { "tags": ["messages"], "summary": "메시지 받는 범위", "responses": { "200": { "description": "설정", "content": { "application/json": { "schema": { "type": "object", "required": ["dmPolicy"], "properties": { "dmPolicy": { "$ref": "#/components/schemas/DmPolicy" } } } } } } } }, "patch": { "tags": ["messages"], "summary": "메시지 받는 범위 변경", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["dmPolicy"], "properties": { "dmPolicy": { "$ref": "#/components/schemas/DmPolicy" } } } } } }, "responses": { "200": { "description": "설정", "content": { "application/json": { "schema": { "type": "object", "required": ["dmPolicy"], "properties": { "dmPolicy": { "$ref": "#/components/schemas/DmPolicy" } } } } } }, "400": { "description": "E_VALIDATION", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/feed": { "get": { "tags": ["feed"], "summary": "인기·최신·팔로잉 피드", "parameters": [ { "name": "type", "in": "query", "schema": { "type": "string", "enum": ["popular", "latest", "following"], "default": "popular" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "피드 페이지", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedPage" } } } }, "400": { "description": "E_FEED_INVALID_CURSOR", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "E_AUTH_REQUIRED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "E_VALIDATION", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/search": { "get": { "tags": ["feed"], "summary": "시리즈·에피소드·사용자 검색", "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "type": "string", "minLength": 2, "maxLength": 50 } }, { "name": "type", "in": "query", "required": true, "schema": { "type": "string", "enum": ["series", "episode", "user"] } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "검색 결과", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/SearchResult" } }, "nextCursor": { "type": ["string", "null"] } } } } } }, "400": { "description": "E_FEED_INVALID_CURSOR", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "E_VALIDATION", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/tags/{tag}/episodes": { "get": { "tags": ["feed"], "summary": "태그 피드", "parameters": [ { "name": "tag", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "태그 피드 페이지", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedPage" } } } } } } }, "/tags/trending": { "get": { "tags": ["feed"], "summary": "인기 태그 20개", "responses": { "200": { "description": "인기 태그", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "maxItems": 20, "items": { "type": "object", "required": ["name", "useCount"], "properties": { "name": { "type": "string" }, "useCount": { "type": "integer", "minimum": 0 } } } } } } } } } } } }, "/auth/signup": { "post": { "tags": ["auth"], "summary": "이메일 회원가입 → 인증메일 발송", "description": "레이트리밋 10회 / 10분 (IP)", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignupRequest" } } } }, "responses": { "201": { "description": "가입 성공", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignupResponse" } } } }, "409": { "description": "E_USER_EMAIL_TAKEN / E_USER_HANDLE_TAKEN", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "E_VALIDATION", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/auth/verify": { "post": { "tags": ["auth"], "summary": "이메일 인증 토큰 확인", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyEmailRequest" } } } }, "responses": { "200": { "description": "인증 완료", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyEmailResponse" } } } }, "422": { "description": "E_VALIDATION", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/auth/password/forgot": { "post": { "tags": ["auth"], "summary": "비밀번호 재설정 메일 요청", "description": "계정이 없어도 204 를 반환한다 (존재 여부 노출 금지).", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordRequest" } } } }, "responses": { "204": { "description": "요청 접수", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } } }, "422": { "description": "E_VALIDATION", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/auth/password/reset": { "post": { "tags": ["auth"], "summary": "토큰으로 비밀번호 변경", "description": "토큰 TTL 1시간, 1회용. 성공 시 기존 세션 전부 무효화.", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordRequest" } } } }, "responses": { "204": { "description": "변경 완료", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } } }, "422": { "description": "E_VALIDATION", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/auth/{nextauth}": { "parameters": [ { "name": "nextauth", "in": "path", "required": true, "description": "Auth.js 내부 경로 (signin, signout, callback, session, csrf …)", "schema": { "type": "string" } } ], "get": { "tags": ["auth"], "summary": "Auth.js 위임 (GET)", "security": [], "responses": { "200": { "description": "Auth.js 응답" } } }, "post": { "tags": ["auth"], "summary": "Auth.js 위임 (POST)", "security": [], "responses": { "200": { "description": "Auth.js 응답" } } } }, "/me": { "get": { "tags": ["me"], "summary": "내 프로필 + 역할", "responses": { "200": { "description": "현재 사용자", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Me" } } } }, "401": { "description": "E_AUTH_REQUIRED / E_AUTH_SESSION_EXPIRED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "E_AUTH_ACCOUNT_SUSPENDED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "patch": { "tags": ["me"], "summary": "표시이름 / 소개 / 아바타 수정", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProfileRequest" } } } }, "responses": { "200": { "description": "수정된 사용자", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Me" } } } }, "401": { "description": "E_AUTH_REQUIRED / E_AUTH_SESSION_EXPIRED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "E_PERM_DENIED / E_AUTH_ACCOUNT_SUSPENDED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "E_VALIDATION", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/series": { "get": { "tags": ["series"], "summary": "공개 시리즈 커서 목록", "security": [], "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "공개 시리즈 목록", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Series" } }, "nextCursor": { "type": ["string", "null"] } } } } } } } }, "post": { "tags": ["series"], "summary": "시리즈 생성", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSeriesRequest" } } } }, "responses": { "201": { "description": "생성된 시리즈", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Series" } } } }, "401": { "description": "인증 필요", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "시리즈 한도 초과", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "입력 검증 실패", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/series/{id}": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "get": { "tags": ["series"], "summary": "시리즈 상세와 공개 에피소드 목록", "security": [], "responses": { "200": { "description": "시리즈 상세", "content": { "application/json": { "schema": { "type": "object", "required": ["series", "episodes"], "properties": { "series": { "$ref": "#/components/schemas/Series" }, "episodes": { "type": "array", "items": { "$ref": "#/components/schemas/Episode" } } } } } } }, "404": { "description": "시리즈 없음", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "patch": { "tags": ["series"], "summary": "소유 시리즈 수정", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSeriesRequest" } } } }, "responses": { "200": { "description": "수정된 시리즈", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Series" } } } }, "403": { "description": "소유자 아님", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "시리즈 없음", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": ["series"], "summary": "시리즈와 하위 에피소드 소프트 삭제", "responses": { "204": { "description": "삭제 및 미디어 삭제 작업 등록" }, "403": { "description": "소유자 아님", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "시리즈 없음", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/episodes": { "post": { "tags": ["episodes"], "summary": "영상 자산을 연결해 에피소드 생성", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEpisodeRequest" } } } }, "responses": { "201": { "description": "초안 에피소드", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Episode" } } } }, "403": { "description": "권한 또는 소유권 없음", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "시리즈 또는 자산 없음", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "회차 중복, 자산 재사용 또는 한도 초과", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "입력 검증 실패", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/episodes/{id}": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "get": { "tags": ["episodes"], "summary": "공개 또는 소유 에피소드 상세", "security": [{ "sessionCookie": [] }, {}], "responses": { "200": { "description": "에피소드 상세", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Episode" } } } }, "404": { "description": "에피소드 없음 또는 비공개", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "patch": { "tags": ["episodes"], "summary": "에피소드 상태 무관 필드 수정", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateEpisodeRequest" } } } }, "responses": { "200": { "description": "수정된 에피소드", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Episode" } } } }, "403": { "description": "소유자 아님", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "에피소드 없음", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": ["episodes"], "summary": "상태기계를 통한 REMOVED 전이", "responses": { "204": { "description": "삭제 및 미디어 삭제 작업 등록" }, "403": { "description": "소유자 아님", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "허용되지 않은 상태 전이", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/episodes/{id}/publish": { "post": { "tags": ["episodes"], "summary": "에피소드 공개 · 예약 · 숨김 · 재공개", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishEpisodeRequest" } } } }, "responses": { "200": { "description": "변경된 공개 상태", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Episode" } } } }, "403": { "description": "권한 또는 소유권 없음", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "자산 미준비 또는 금지된 전이", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "AI 표기 누락 또는 과거 예약", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/uploads": { "post": { "tags": ["uploads"], "summary": "업로드 세션 생성과 첫 파트 URL 발급", "description": "티어별 시간당 한도를 userId 기준으로 적용한다.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUploadRequest" } } } }, "responses": { "201": { "description": "세션 생성", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUploadResponse" } } } }, "401": { "description": "E_AUTH_REQUIRED / E_AUTH_SESSION_EXPIRED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "E_PERM_DENIED / E_AUTH_EMAIL_NOT_VERIFIED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "413": { "description": "E_UPLOAD_TOO_LARGE / E_UPLOAD_QUOTA_EXCEEDED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "E_VALIDATION / E_UPLOAD_UNSUPPORTED_TYPE", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "E_RATE_LIMITED", "headers": { "Retry-After": { "$ref": "#/components/headers/RetryAfter" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "E_STORAGE_UNAVAILABLE / E_DB_UNAVAILABLE", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/uploads/{id}": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "get": { "tags": ["uploads"], "summary": "재개용 업로드 상태 조회", "responses": { "200": { "description": "Object Storage와 동기화된 완료 파트 번호", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadSessionState" } } } }, "404": { "description": "E_UPLOAD_SESSION_NOT_FOUND", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/uploads/{id}/parts": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "post": { "tags": ["uploads"], "summary": "파트 URL 추가·재발급", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignPartsRequest" } } } }, "responses": { "200": { "description": "서명 URL 목록", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SignedPart" } } } } }, "409": { "description": "E_UPLOAD_INVALID_PART", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "410": { "description": "E_UPLOAD_SESSION_EXPIRED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/uploads/{id}/complete": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "post": { "tags": ["uploads"], "summary": "멀티파트 완료와 트랜스코드 발행", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteUploadRequest" } } } }, "responses": { "200": { "description": "멱등 재요청 — 기존 자산", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteUploadResponse" } } } }, "202": { "description": "완료 접수", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteUploadResponse" } } } }, "409": { "description": "E_UPLOAD_PART_MISSING / E_UPLOAD_ABORTED / E_UPLOAD_ALREADY_COMPLETED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "410": { "description": "E_UPLOAD_SESSION_EXPIRED", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/uploads/{id}/abort": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "post": { "tags": ["uploads"], "summary": "멀티파트 업로드 중단과 정리", "responses": { "204": { "description": "중단 완료 또는 이미 종료됨" }, "404": { "description": "E_UPLOAD_SESSION_NOT_FOUND", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/health": { "get": { "tags": ["system"], "summary": "라이브니스 — 항상 200", "security": [], "responses": { "200": { "description": "프로세스 정상", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Health" } } } } } } }, "/episodes/{id}/playback": { "get": { "tags": ["episodes"], "summary": "Issue playback information", "security": [{ "sessionCookie": [] }, {}], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Playback information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlaybackResponse" } } } }, "403": { "description": "Age restricted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Episode unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Asset not ready", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/episodes/{id}/age-confirm": { "post": { "tags": ["episodes"], "summary": "Confirm the episode age gate", "security": [{ "sessionCookie": [] }, {}], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgeConfirmRequest" } } } }, "responses": { "204": { "description": "Signed HttpOnly age cookie issued", "headers": { "Set-Cookie": { "schema": { "type": "string" } } } }, "400": { "description": "Invalid confirmation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "Age requirement not met", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Episode not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Rate limited", "headers": { "Retry-After": { "$ref": "#/components/headers/RetryAfter" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/episodes/{id}/progress": { "post": { "tags": ["episodes"], "summary": "Save watch progress", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveProgressRequest" } } } }, "responses": { "204": { "description": "Progress saved" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Episode not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Update interval too short", "headers": { "Retry-After": { "$ref": "#/components/headers/RetryAfter" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/episodes/{id}/views": { "post": { "tags": ["episodes"], "summary": "Count one cumulative 30-second view", "security": [{ "sessionCookie": [] }, {}], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "View accepted or deduplicated" }, "404": { "description": "Episode not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Rate limited", "headers": { "Retry-After": { "$ref": "#/components/headers/RetryAfter" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/users/{handle}/follow": { "parameters": [ { "name": "handle", "in": "path", "required": true, "schema": { "type": "string" } } ], "put": { "tags": ["social"], "summary": "팔로우 (멱등)", "responses": { "200": { "description": "팔로우 수", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialCount" } } } }, "401": { "description": "인증 필요" }, "403": { "description": "차단 관계" }, "404": { "description": "사용자 없음" }, "429": { "description": "요청 한도 초과" } } }, "delete": { "tags": ["social"], "summary": "언팔로우 (멱등)", "responses": { "200": { "description": "팔로우 수", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialCount" } } } }, "401": { "description": "인증 필요" }, "404": { "description": "사용자 없음" }, "429": { "description": "요청 한도 초과" } } } }, "/users/{handle}/block": { "parameters": [ { "name": "handle", "in": "path", "required": true, "schema": { "type": "string" } } ], "put": { "tags": ["social"], "summary": "사용자 차단", "responses": { "200": { "description": "차단됨", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialCount" } } } }, "401": { "description": "인증 필요" }, "404": { "description": "사용자 없음" } } }, "delete": { "tags": ["social"], "summary": "사용자 차단 해제", "responses": { "200": { "description": "차단 해제됨", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialCount" } } } }, "401": { "description": "인증 필요" }, "404": { "description": "사용자 없음" } } } }, "/episodes/{id}/likes": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "put": { "tags": ["social"], "summary": "좋아요 (멱등)", "responses": { "200": { "description": "좋아요 상태", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialCount" } } } }, "401": { "description": "인증 필요" }, "403": { "description": "차단 관계" }, "404": { "description": "에피소드 없음" } } }, "delete": { "tags": ["social"], "summary": "좋아요 취소 (멱등)", "responses": { "200": { "description": "좋아요 상태", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SocialCount" } } } }, "401": { "description": "인증 필요" }, "404": { "description": "에피소드 없음" } } } }, "/episodes/{id}/comments": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } } ], "get": { "parameters": [ { "name": "parentId", "in": "query", "description": "부모 댓글 ID. 생략하면 최신순 스레드, 지정하면 해당 부모의 답글을 작성순 커서 페이지로 조회합니다.", "schema": { "type": "string", "minLength": 1 } } ], "tags": ["social"], "summary": "댓글 목록", "security": [], "responses": { "200": { "description": "댓글 페이지", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Comment" } }, "nextCursor": { "type": ["string", "null"] } } } } } }, "404": { "description": "에피소드 없음" } } }, "post": { "tags": ["social"], "summary": "댓글 작성", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentInput" } } } }, "responses": { "201": { "description": "작성됨", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "401": { "description": "인증 필요" }, "403": { "description": "댓글 비활성 또는 차단" }, "404": { "description": "에피소드 없음" }, "422": { "description": "길이 또는 깊이 초과" }, "429": { "description": "요청 한도 초과" } } } }, "/comments/{id}": { "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "patch": { "tags": ["social"], "summary": "15분 내 댓글 수정", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentInput" } } } }, "responses": { "200": { "description": "수정됨", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Comment" } } } }, "401": { "description": "인증 필요" }, "403": { "description": "권한 또는 수정 시간 초과" }, "404": { "description": "댓글 없음" } } }, "delete": { "tags": ["social"], "summary": "댓글 소프트 삭제", "responses": { "204": { "description": "삭제됨" }, "401": { "description": "인증 필요" }, "403": { "description": "권한 없음" }, "404": { "description": "댓글 없음" } } } }, "/notifications": { "get": { "tags": ["social"], "summary": "내 알림 목록", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 20 } }, { "name": "cursor", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "알림 페이지", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Notification" } }, "nextCursor": { "type": ["string", "null"] } } } } } }, "401": { "description": "인증 필요" } } } }, "/notifications/read": { "post": { "tags": ["social"], "summary": "알림 읽음 처리", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["ids"], "properties": { "ids": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "읽음 처리 수", "content": { "application/json": { "schema": { "type": "object", "properties": { "updated": { "type": "integer", "minimum": 0 } } } } } }, "401": { "description": "인증 필요" } } } }, "/reports": { "post": { "tags": ["moderation"], "summary": "신고 접수", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["target", "targetId", "reason"], "properties": { "target": { "enum": ["EPISODE", "SERIES", "COMMENT", "USER"] }, "targetId": { "type": "string" }, "reason": { "enum": [ "SEXUAL", "VIOLENCE", "HATE", "SPAM", "COPYRIGHT", "MINOR_SAFETY", "OTHER" ] }, "detail": { "type": "string", "maxLength": 1000 } } } } } }, "responses": { "201": { "description": "접수 완료" }, "409": { "description": "중복 신고" }, "429": { "description": "일일 한도 초과" } } } }, "/admin/reports": { "get": { "tags": ["moderation"], "summary": "신고 심사큐", "responses": { "200": { "description": "커서 기반 심사큐" }, "403": { "description": "권한 부족" } } } }, "/admin/reports/{id}/action": { "post": { "tags": ["moderation"], "summary": "신고 조치", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["action"], "properties": { "action": { "enum": [ "HIDE_CONTENT", "REMOVE_CONTENT", "SUSPEND_USER", "REJECT" ] }, "note": { "type": "string", "maxLength": 1000 } } } } } }, "responses": { "200": { "description": "조치 완료" }, "409": { "description": "이미 처리됨" } } } }, "/admin/users": { "get": { "tags": ["moderation"], "summary": "관리자 사용자 검색", "responses": { "200": { "description": "사용자 목록" }, "403": { "description": "ADMIN 필요" } } } }, "/admin/users/{id}/status": { "post": { "tags": ["moderation"], "summary": "사용자 정지 또는 해제", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["status", "reason"], "properties": { "status": { "enum": ["ACTIVE", "SUSPENDED"] }, "reason": { "type": "string", "maxLength": 1000 } } } } } }, "responses": { "200": { "description": "상태 변경 완료" }, "403": { "description": "ADMIN 필요" } } } }, "/admin/users/{id}/role": { "post": { "tags": ["moderation"], "summary": "사용자 서비스 역할 변경", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["role", "reason"], "properties": { "role": { "enum": [ "VIEWER", "CREATOR", "PARTNER", "MODERATOR", "ADMIN" ] }, "reason": { "type": "string", "minLength": 2, "maxLength": 500 } } } } } }, "responses": { "200": { "description": "역할 변경 완료" }, "403": { "description": "ADMIN 필요 또는 자기 역할 변경 거부" } } } }, "/admin/creator-applications/{id}/status": { "post": { "tags": ["moderation"], "summary": "크리에이터 지원서 심사 상태 변경", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["status"], "properties": { "status": { "enum": [ "SUBMITTED", "REVIEWING", "SHORTLISTED", "ACCEPTED", "REJECTED" ] } } } } } }, "responses": { "200": { "description": "심사 상태 변경 완료" }, "403": { "description": "ADMIN 필요" }, "404": { "description": "지원서를 찾을 수 없음" } } } }, "/admin/assets/{id}/retry": { "post": { "tags": ["moderation"], "summary": "실패한 영상 에셋 재처리", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "재처리 요청 접수" }, "403": { "description": "ADMIN 필요" }, "404": { "description": "에셋을 찾을 수 없음" }, "409": { "description": "재처리할 수 없는 상태" } } } }, "/metrics": { "get": { "tags": ["system"], "summary": "Prometheus 메트릭 (내부망 또는 토큰)", "security": [], "parameters": [ { "name": "X-Metrics-Token", "in": "header", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Prometheus text exposition", "content": { "text/plain": { "schema": { "type": "string" } } } }, "403": { "description": "외부 접근 거부", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/ready": { "get": { "tags": ["system"], "summary": "레디니스 — DB / Redis / S3", "security": [], "responses": { "200": { "description": "모든 의존 서비스 정상", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ready" } } } }, "503": { "description": "일부 의존 서비스 장애", "headers": { "X-Request-Id": { "$ref": "#/components/headers/XRequestId" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ready" } } } } } } } }, "security": [ { "sessionCookie": [] } ] }