Skip to main content
GET
/
:projectId
/
comments
Get Comments
curl --request GET \
  --url https://api.replyke.com/api/v6/:projectId/comments
{
  "id": "<string>",
  "entityId": "<string>",
  "userId": "<string>",
  "content": "<string>",
  "mentions": [
    {}
  ],
  "upvotes": [
    {}
  ],
  "downvotes": [
    {}
  ],
  "attachments": [
    {}
  ],
  "metadata": {},
  "createdAt": "<string>",
  "updatedAt": "<string>"
}
Fetches a paginated list of comments filtered by entity ID, user ID, or parent comment ID. Supports optional sorting by newest, oldest, top (most upvoted), or most controversial. Replies, direct comments, and user-authored comments can all be queried. Optionally includes associated entity data.

Query Parameters

entityId
string
ID of the entity to fetch comments for
userId
string
ID of the user to fetch their comments
parentId
string
ID of the parent comment to fetch its replies
sortBy
string
default:"new"
Sorting method: new (default), old, top, controversial
page
number
default:"1"
Page number for pagination
limit
number
default:"10"
Number of results per page (max: 100)
includeEntity
string
If true, includes related entity data in each comment
At least one of entityId, userId, or parentId must be provided.

Response

Returns an array of comment objects.
id
string
Unique comment identifier
entityId
string
ID of the entity this comment belongs to
userId
string
ID of the user who created the comment
content
string
Comment content
mentions
array
List of mentioned users
upvotes
array
Array of user IDs who upvoted
downvotes
array
Array of user IDs who downvoted
attachments
array
Attached files or resources
metadata
object
Custom metadata
createdAt
string
Creation timestamp in ISO 8601 format
updatedAt
string
Last update timestamp in ISO 8601 format

Error Responses

{
  "error": "Invalid request data",
  "code": "comment/invalid-request"
}
{
  "error": "Invalid request: limit must be a positive number.",
  "code": "comment/invalid-limit"
}
{
  "error": "Invalid request: page must be a whole number greater than 0.",
  "code": "comment/invalid-page"
}
{
  "error": "Internal server error.",
  "code": "comment/server-error",
  "details": "[error message]"
}

Notes

Filtering

  • One of entityId, userId, or parentId must be specified.
  • Querying does not require authentication.

Sorting Modes

  • new: Most recent comments first (default)
  • old: Oldest comments first
  • top: Highest upvote-to-downvote ratio
  • controversial: High activity with mixed votes

Additional Features

  • Results are paginated. Maximum of 100 per page.
  • If includeEntity=true, each comment includes basic data about its entity.
  • Votes are returned as arrays of user IDs.
I