댓글 작성

POST /boards/{boardId}/posts/{postId}/comments

댓글 작성시 작성자에게 알림이 발송됩니다.

Authorization

oauth2

OAuth 2.0 인증.
자세한 인증 방식은 인가·인증를 참고한다.

Scope

board

Request

HTTP Request

POST

https://www.worksapis.com/v1.0/boards/{boardId}/posts/{postId}/comments

Path Parameters

ParameterTypeDescription
boardId integer 

게시판 ID


required
example : 100
format : int64 
postId integer 

게시글 ID


required
example : 1
format : int64 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Request Body

OK

PropertyTypeDescription
content string 

내용


required
minLength : 1
maxLength : 5000 

Request Example

example

1{
2 "content": "Example content"
3}

Response

HTTP 201

OK

PropertyTypeDescription
boardId integer 

게시판 번호


required
format : int64
readOnly : true 
postId integer 

게시글 번호


required
format : int64
readOnly : true 
commentId integer 

댓글 번호


required
format : int64
readOnly : true 
content string 

내용


required 
createdTime string 

생성 시간

  • 날짜 및 시간, 분, 초 형식(YYYY-MM-DDThh:mm:ssTZD)

required
format : date-time
readOnly : true 
modifiedTime string 

수정 시간

  • 날짜 및 시간, 분, 초 형식(YYYY-MM-DDThh:mm:ssTZD)

format : date-time
readOnly : true 
userId string 

작성자 ID
탈퇴된 계정인 경우에는 빈값


readOnly : true
nullable : true 
userName string 

작성자 이름


required
readOnly : true 
hasReply boolean 

답글 존재 여부


default : false
readOnly : true 
hasAttachment boolean 

첨부파일 존재 여부


default : false
readOnly : true 
isDeleted boolean 

답글이 존재하면서 삭제된 경우
답글이 있는 경우, 댓글 삭제시 비표시 처리 됩니다


default : false
readOnly : true 

Response Example

example

1{
2 "boardId": 100,
3 "postId": 1,
4 "commentId": 1,
5 "content": "Example content",
6 "createdTime": "2022-10-28T17:26:35+09:00",
7 "modifiedTime": "2022-10-28T17:26:35+09:00",
8 "userId": "userf7da-f82c-4284-13e7-030f3b4c756x",
9 "userName": "Susan Nielsen",
10 "hasReply": false,
11 "hasAttachment": false,
12 "isDeleted": false
13}

HTTP 403

Forbidden