Skip to content

User API

JeongHyeon Kim edited this page Dec 6, 2025 · 3 revisions

📘 User API (Minimal Spec - v1)

사용자 관련 기능을 제공하는 API 모음입니다.
회원 조회, 회원 정보 수정, 프로필 이미지 변경 등 사용자 도메인 전반을 다룹니다.

1. 사용자 단건 조회

GET /api/v1/users/{userId}

사용자 정보를 조회합니다.


📥 Request

Path Variables

  • userId : 사용자 ID

Headers

  • Authorization : Bearer Token

📤 Response (200)

{
  "id": 1,
  "email": "[email protected]",
  "nickName": "홍길동",
  "profileImage": "https://cdn.myapp.com/user/profile/123.png",
  "notification_enabled": "1",
  "mbti": "ISTP",
  "phoneNumber": "010-1234_5678",
  "profileMessage": "안녕하세요~"
}

2. 프로필 편집

PATCH /api/v1/users

사용자 정보를 일부 수정합니다.


📥 Request

※ 본인 프로필만 수정 가능하기에 PathVariable 제거했습니다.

Headers

  • Authorization : Bearer Token

Body

클라이언트에서는 변경된 부분만 전송

{
  "nickName": "정현",
  "notification_enabled": "0",
  "mbti": "ISFJ",
  "phoneNumber": "010-1234_5678",
  "profileMessage": "변경된 상태메시지"

📤 Response (200)

해당 사용자의 변경된 전체 데이터를 응답

{
  "id": 1,
  "email": "[email protected]",
  "nickName": "정현",
  "profileImage": "https://cdn.myapp.com/user/profile/123.png",
  "notification_enabled": "0",
  "mbti": "ISFJ",
  "phoneNumber": "010-1234_5678",
  "profileMessage": "변경된 상태메시지"
}

3. 회원탈퇴

DELETE /api/v1/users

사용자 회원탈퇴


📥 Request

Headers

  • Authorization : Bearer Token

📤 Response (204 No Content)


3. 사용자 프로필 이미지 변경

S3Presigned URL 방식 or Multi-Part 방식 논의 이후 작성

Storage Service : S3 사용 확정


4. 사용자 팔로우

POST /api/v1/follows/{followId}

사용자 팔로우를 등록합니다.


📥 Request

Headers

  • Authorization : Bearer Token

📤 Response (204 No Content)


5. 사용자 언팔로우

DELETE /api/v1/follows/{followId}

대상 사용자를 언팔로우합니다.


📥 Request

Path Variables

  • followId : 언팔로우 대상 사용자 ID

Headers

  • Authorization : Bearer Token

📤 Response (204 No Content)

📚 참고 문서

Clone this wiki locally