본문으로 건너뛰기
버전: 0.65.0

계정 관리 API

개요

계정 관리 API는 사용자 계정의 등록, 삭제, 프로필 조회, 비밀번호 관리 기능을 제공합니다.

주요기능

  • 계정 등록: 새로운 사용자 계정 생성
  • 계정 삭제: 사용자 계정 삭제
  • 프로필 조회: 사용자 프로필 정보 조회
  • 비밀번호 재설정: 비밀번호 재설정
  • 비밀번호 변경: 비밀번호 변경
  • 계정 검증: 계정 비밀번호 검증
[POST] /auth/accounts/register - 계정 등록

계정 등록

새로운 사용자 계정을 등록합니다.

  • HTTP Method: POST
  • 인증: 불필요

Headers

HeaderTypeDescriptionRequired
Content-Typeapplication/json요청 본문 타입

Request Body

필드타입설명Required
emailstring사용자 이메일 주소
passwordstring사용자 비밀번호 (강력한 비밀번호 필요)
namestring사용자 이름
Request Body Example
{
"email": "user@example.com",
"password": "StrongPassword123!",
"name": "John Doe"
}

Responses

Http Status Code설명Error Code(s)
201 Created계정 등록 성공-
400 Bad Request잘못된 요청-
201 Created - 성공
{
"id": 1,
"email": "user@example.com",
"name": "John Doe"
}
필드타입설명
idnumber사용자 ID
emailstring사용자 이메일
namestring사용자 이름
400 Bad Request - 잘못된 요청

예시: 이미 존재하는 이메일

{
"status": 400,
"code": 40000,
"message": "Email already exists",
"detail": ""
}
[DELETE] /auth/accounts - 계정 삭제

계정 삭제

사용자 계정을 삭제합니다.

  • HTTP Method: DELETE
  • 인증: 액세스 토큰 (accessToken) 필요

Headers

HeaderTypeDescriptionRequired
AuthorizationBearer {accessToken}사용자 인증을 통해 발급받은 액세스 토큰 입니다.
Content-Typeapplication/json요청 본문 타입

Request Body

필드타입설명Required
emailstring사용자 이메일 주소
passwordstring사용자 비밀번호
Request Body Example
{
"email": "user@example.com",
"password": "password"
}

Responses

Http Status Code설명Error Code(s)
200 OK계정 삭제 성공-
401 Unauthorized인증 실패-
200 OK - 성공
{
"success": true
}
필드타입설명
successboolean성공 여부
401 Unauthorized - 인증 실패

예시: 비밀번호가 잘못된 경우

{
"status": 401,
"code": 40100,
"message": "Invalid password",
"detail": ""
}
[GET] /auth/accounts/profile - 프로필 조회

프로필 조회

현재 로그인한 사용자의 프로필 정보를 조회합니다.

  • HTTP Method: GET
  • 인증: 액세스 토큰 (accessToken) 필요

Headers

HeaderTypeDescriptionRequired
AuthorizationBearer {accessToken}사용자 인증을 통해 발급받은 액세스 토큰 입니다.

Request Body

N/A

Responses

Http Status Code설명Error Code(s)
200 OK프로필 조회 성공-
401 Unauthorized인증 실패-
200 OK - 성공
{
"id": 1,
"email": "example@weltcorp.com",
"name": "John Doe"
}
필드타입설명
idnumber사용자 ID
emailstring사용자 이메일
namestring사용자 이름
401 Unauthorized - 인증 실패

예시: 토큰이 유효하지 않은 경우

{
"status": 401,
"code": 40100,
"message": "Unauthorized",
"detail": ""
}
[POST] /auth/accounts/reset - 비밀번호 재설정

비밀번호 재설정

비밀번호 재설정 토큰을 사용하여 비밀번호를 재설정합니다.

  • HTTP Method: POST
  • 인증: 불필요

Headers

HeaderTypeDescriptionRequired
Content-Typeapplication/json요청 본문 타입

Request Body

필드타입설명Required
emailstring사용자 이메일 주소
newPasswordstring새로운 비밀번호
tokenstring비밀번호 재설정 토큰
Request Body Example
{
"email": "user@example.com",
"newPassword": "NewStrongPassword123!",
"token": "password_reset_token"
}

Responses

Http Status Code설명Error Code(s)
200 OK비밀번호 재설정 성공-
400 Bad Request유효하지 않은 토큰-
200 OK - 성공
{
"success": true
}
필드타입설명
successboolean성공 여부
400 Bad Request - 잘못된 요청

예시: 유효하지 않은 토큰

{
"status": 400,
"code": 40000,
"message": "Invalid token",
"detail": ""
}
[PATCH] /auth/accounts/password - 비밀번호 변경

비밀번호 변경

현재 비밀번호를 사용하여 새로운 비밀번호로 변경합니다.

  • HTTP Method: PATCH
  • 인증: 액세스 토큰 (accessToken) 필요

Headers

HeaderTypeDescriptionRequired
AuthorizationBearer {accessToken}사용자 인증을 통해 발급받은 액세스 토큰 입니다.
Content-Typeapplication/json요청 본문 타입

Request Body

필드타입설명Required
emailstring사용자 이메일 주소
passwordstring현재 비밀번호
newPasswordstring새로운 비밀번호
Request Body Example
{
"email": "user@example.com",
"password": "CurrentPassword123!",
"newPassword": "NewPassword456!"
}

Responses

Http Status Code설명Error Code(s)
200 OK비밀번호 변경 성공-
400 Bad Request잘못된 요청-
200 OK - 성공
{
"success": true
}
필드타입설명
successboolean성공 여부
400 Bad Request - 잘못된 요청

예시: 현재 비밀번호가 잘못된 경우

{
"status": 400,
"code": 40000,
"message": "Invalid current password",
"detail": ""
}
[POST] /auth/accounts/password/verify - 계정 검증

계정 검증

사용자의 이메일과 비밀번호로 계정을 검증합니다.

  • HTTP Method: POST
  • 인증: 액세스 토큰 (accessToken) 필요

Headers

HeaderTypeDescriptionRequired
AuthorizationBearer {accessToken}사용자 인증을 통해 발급받은 액세스 토큰 입니다.
Content-Typeapplication/json요청 본문 타입

Request Body

필드타입설명Required
emailstring사용자 이메일 주소
passwordstring사용자 비밀번호
Request Body Example
{
"email": "user@example.com",
"password": "password"
}

Responses

Http Status Code설명Error Code(s)
200 OK계정 검증 성공-
400 Bad Request잘못된 요청-
200 OK - 성공
{
"success": true
}
필드타입설명
successboolean성공 여부
400 Bad Request - 잘못된 요청

예시: 비밀번호가 잘못된 경우

{
"status": 400,
"code": 40000,
"message": "Invalid password",
"detail": ""
}