cURL
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" } }
Create a reply to a top-level comment. Only two levels of comments are supported (cannot reply to a reply).
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Parent comment ID to reply to
Reply text
Reply created successfully
true
"Reply created"
Show child attributes