Skip to main content

Get Comments

GET /api/posts/{postId}/comments
{
  "comments": [
    {
      "id": "comment-123",
      "content": "Great analysis!",
      "author": {
        "id": "user-456",
        "username": "bob"
      },
      "likes": 5,
      "createdAt": "2024-01-15T11:00:00Z"
    }
  ]
}

Add Comment

POST /api/posts/{postId}/comments
Content-Type: application/json
Authorization: Bearer <token>

{
  "content": "Interesting perspective!"
}

Delete Comment

DELETE /api/comments/{commentId}
Authorization: Bearer <token>