Comments

Update a comment

Update an existing comment

patch/posts/{postId}/comments/{commentId}

Request body

usernamestring required

Username of the comment author (for validation)

contentstring required

Updated content of the comment

Example request

{
  "username": "jane_smith",
  "content": "Great post! I love their outdoor equipment too. Where did you buy it?"
}

Response

Comment updated successfully

idstring uuid required

Unique identifier for the comment

postIdstring uuid required

ID of the post this comment belongs to

usernamestring required

Username of the comment author

contentstring required

Content of the comment

createdAtstring date-time required

Timestamp when the comment was created

updatedAtstring date-time required

Timestamp when the comment was last updated

Example response

{
  "id": "456e7890-e89b-12d3-a456-426614174001",
  "postId": "123e4567-e89b-12d3-a456-426614174000",
  "username": "jane_smith",
  "content": "Great post! I love their outdoor equipment too.",
  "createdAt": "2025-05-30T11:15:00Z",
  "updatedAt": "2025-05-30T11:15:00Z"
}

Changes