POST
/
comments
/
reply
/
{comment_id}
Create a reply
curl --request POST \
  --url https://localhost:5000/comments/reply/{comment_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>"
}
'
{
  "success": true,
  "message": "Reply created",
  "data": {
    "text": "<string>",
    "author": "<string>",
    "post": "<string>",
    "_id": "<string>",
    "parentComment": "<string>",
    "replyTo": "<string>",
    "likes": [
      "<string>"
    ],
    "repliesCount": 0,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

comment_id
string
required

Parent comment ID to reply to

Body

application/json
text
string
required

Reply text

Response

Reply created successfully

success
boolean
Example:

true

message
string
Example:

"Reply created"

data
object