HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🤎
프론트엔드 데브코스 5기 교육생
/
🦊
고현주팀
/
🏔️
SNS 팀 프로젝트
/
📃
API 명세서
📃

API 명세서

 
ㅤ
Domain
Method
URL
Description
Request parameters
Request data
Response data
비고
최용재
User
POST
/login
로그인
Body
{ "email": String, "password": String }
{ "user": User, "token": String }
-
곽연경
ㅤ
POST
/signup
회원가입
Body
{ "email": String, "fullName": String, "password": String }
{ "user": User, "token": String }
-
ㅤ
ㅤ
POST
/logout
-
-
-
-
-
박종운
ㅤ
GET
/auth-user
사용자 인증 확인
Header
Authorization: bearer JWT토큰
User
-
박종운
ㅤ
GET
/users/get-users
사용자 목록 조회
Params
offset: Optional, limit: Optional
User[]
-
ㅤ
ㅤ
GET
/users/online-users
현재 접속 중인 사용자 목록 조회
-
-
User[]
-
박종운
ㅤ
GET
/users/{userId}
특정 사용자 정보 조회
-
-
User
-
박종운
ㅤ
POST
/users/upload-photo
나의 프로필 이미지를 변경
Header, Body
Authorization: bearer JWT토큰 FormData : isCover: false image: Binary
User
isCover를 반드시 false로 기입
박종운
ㅤ
POST
/users/upload-photo
나의 커버 이미지를 변경
Header, Body
Authorization: bearer JWT토큰 FormData: isCover: true image: Binary
User
isCover를 반드시 true로 기입
ㅤ
ㅤ
PUT
/settings/update-user
나의 정보를 변경
Header, Body
Authorization: bearer JWT토큰 Body { "fullName": String, "username": String }
User
-
ㅤ
ㅤ
PUT
/settings/update-password
내 계정 비밀번호를 변경
Header, Body
Authorization: bearer JWT토큰 Body { "password": String }
-
-
ㅤ
Channel
GET
/channels
채널 목록 조회
-
-
Channel[]
-
ㅤ
ㅤ
GET
/channel/{channelName}
특정 채널 정보 조회
-
-
Channel
채널 이름이 한글일 때, 인코딩 필요
ㅤ
Post
GET
/posts/channel/{channelId}
특정 채널의 포스트 목록 조회
Params
offset: Optional<Number> limit: Optional<Number>
Post[]
-
ㅤ
ㅤ
GET
/posts/author/{authorId}
특정 사용자의 포스트 목록 조회
Params
offset: Optional<Number> limit: Optional<Number>
Post[]
-
ㅤ
ㅤ
POST
/posts/create
특정 채널에 포스트를 작성
Header, Body
Authorization: bearer JWT토큰 Body title: String( { type: 'review' | 'common' | 'mogak' | 'spot', title: string, workingSpot: 'cafe' | 'home' | 'etc', body: { text?: string, spot?: ‘cafe’ | ‘home’ | ‘etc’, location?: string, time?: string, date?: string, maxCount?: number, form?: { plugs?: number; crowded?: { day: number, // 요일은 일 ~ 토 : 0 ~ 6 value: number, }, quiet?: number, comfortable?: number, bathroom?: number, } } } ), image: Binary | null, channelId: String
-
Post type별로 body 내부 속성이 바뀜 (Schema 바뀜) // 모각코 body: { location: string, text: string, time: string, date: string, maxCount: number, }, // 리뷰 body: { text: string, location: string, form: { plugs?: number; crowded?: { day: number, // 요일은 일 ~ 토 : 0 ~ 6 value: number, }, quiet?: number, comfortable?: number, bathroom?: number, } }, // 스팟 body: { spot: 'cafe' | 'home' | 'etc', } JSON.stringify()를 사용해서 객체를 string으로 변환해서 요청을 보내야 함
ㅤ
ㅤ
GET
/posts/{postId}
특정 포스트의 상세 정보 조회
-
-
Post
Post type별로 body 내부 속성이 바뀜 (Schema 바뀜) (/posts/create 참고)
ㅤ
ㅤ
PUT
/posts/update
내가 작성한 포스트를 수정
Header, Body
Authorization: bearer JWT토큰 postId: String title: String image: Binary | null imageToDeletePublicId: Optional channelId: String
-
이미지를 삭제하려면 imageToDeletePublicId에 imagePublicId를 기입 Post type별로 body 내부 속성이 바뀜 (Schema 바뀜) JSON.stringify()를 사용해서 객체를 string으로 변환해서 요청을 보내야 함 (/posts/create 참고)
ㅤ
ㅤ
DELETE
/posts/delete
내가 작성한 포스트를 삭제
Header, Body
Authorization: bearer JWT토큰 { "id": String }
-
-
최용재
ㅤ
POST
/likes/create
특정 포스트에 좋아요
Header, Body
Authorization: bearer JWT토큰 { "postId": String }
Like
-
최용재
ㅤ
DELETE
/likes/delete
특정 포스트에 좋아요한 것을 취소
Header, Body
Authorization: bearer JWT토큰 { "id": String }
Like
-
김나현
ㅤ
POST
/comments/create
특정 포스트에 댓글을 작성
Header, Body
Authorization: bearer JWT토큰 { "comment": String, "postId": String }
Comment
-
김나현
ㅤ
DELETE
/comments/delete
특정 포스트에 작성한 내 댓글을 삭제
Header, Body
Authorization: bearer JWT토큰 { "id": String }
Comment
-
김나현
Alarm
GET
/notifications
나의 알림 목록 조회
Header
Authorization: bearer JWT토큰
Notification[]
-
김나현
ㅤ
PUT
/notifications/seen
나에게 온 알림을 읽음처리
Header
Authorization: bearer JWT토큰
-
-
김나현
ㅤ
POST
/notifications/create
상대방에게 알림 보냄
Header, Body
Authorization: bearer JWT토큰 { "notificationType": "COMMENT" | "FOLLOW" | "LIKE" | "MESSAGE", "notificationTypeId": String, "userId": String, "postId": Nullable<String> }
Notification
notificationTypeId는 type에 해당하는 객체의 id를 넣어주세요.COMMENT일 경우엔 댓글 idFOLLOW일 경우엔 팔로우 idLIKE일 경우엔 좋아요 idMESSAGE일 경우엔 메시지 idpostId는 type이 FOLLOW일 경우엔 null로 보내주세요.
박종운
Follow
POST
/follow/create
특정 유저를 팔로우
Header, Body
Authorization: bearer JWT토큰 { "userId": String }
Follow
-
박종운
ㅤ
DELETE
/follow/delete
특정 유저를 언팔
Header, Body
Authorization: bearer JWT토큰 { "id": String }
Follow
-
ㅤ
Message
GET
/messages/conversations
나와 메시지함 조회
Header
Authorization: bearer JWT토큰
Conversation[]
-
ㅤ
ㅤ
GET
/messages
특정 사용자와 소통한 메시지 목록 조회
Header, Params
Authorization: bearer JWT토큰 Params userId: String
Message[]
-
ㅤ
ㅤ
PUT
/messages/update-seen
특정 사용자와 나눈 메시지를 읽음처리
Header, Body
Authorization: bearer JWT토큰 { "sender": String // 사용자 id }
-
-
ㅤ
ㅤ
POST
/messages/create
특정 사용자에게 메시지를 전송
Header, Body
Authorization: bearer JWT토큰 { "message": String, "receiver": String // 사용자 id }
Message
-
김나현, 최용재
Search
GET
/search/users/{query}
사용자를 검색
-
-
User[]
-
김나현, 최용재
ㅤ
GET
/search/all/{query}
포스트와 사용자를 검색
-
-
(User | Post)[]
-