Skip to main content
GET
/
:projectId
/
api
/
v7
/
entities
/
:entityId
/
top-comment
Fetch Top Comment
curl --request GET \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/entities/:entityId/top-comment
Returns the single comment with the most upvotes for the given entity. Useful for previewing the best comment alongside an entity in a feed. When multiple comments are tied, the oldest is returned. Returns null if the entity has no comments.

Path Parameters

entityId
string
required
The UUID of the entity.

Response

Returns a Comment object, or null if there are no comments.
null
or
{
  "id": "uuid",
  "content": "Great post!",
  "upvotes": ["userId1", "userId2"],
  ...
}