List comments
GET/v2/comments
Returns comments for your organization.
Comments are threaded discussions. Each comment can have:
- Author information
- Voting (upvotes/downvotes)
- Privacy settings (public/private)
- Moderation status
- Parent comment reference for threading
Filtering
Optionally filter by:
postId- Get comments for a specific postchangelogId- Get comments for a specific changelog
If no filter is provided, returns all comments across the organization.
Pagination
This endpoint uses cursor-based pagination:
limit- Number of comments to return (1-100, default 10)cursor- Opaque cursor from a previous response’snextCursorfield
Example: To paginate through results:
- First request:
GET /v2/comments?postId={id}&limit=10 - If
nextCursoris not null, use it for the next page - Next request:
GET /v2/comments?postId={id}&limit=10&cursor={nextCursor}
Response Format
Returns a list object with:
object- Always “list”data- Array of comment objects (flat structure withparentCommentIdfor threading)nextCursor- Cursor for the next page (null if no more results)
Comment Structure
Each comment includes:
id- Unique comment identifierpostId/changelogId- Reference to the parent contentparentCommentId- Reference to parent comment (null for root comments)content- Comment content in HTML formatauthor- Author information (id, name, profilePicture, type)upvotes/downvotes/score- Voting metricsisPrivate- Whether comment is only visible to adminsinReview- Whether comment is pending moderationcreated/updated- Unix timestamps
Additional Filters
privacy- Filter by privacy: “public”, “private”, or “all”inReview- Filter by moderation status (true/false)
Sorting
Use sortBy to sort results:
best- Sort by confidence score (default, like Reddit)top- Sort by net score (upvotes - downvotes)new- Sort by creation date, newest firstold- Sort by creation date, oldest first
Query Parameters
List comments
curl https://do.featurebase.app/v2/comments \
-H "Authorization: Bearer $FEATUREBASE_API_KEY"{
"data": [
{
"id": "507f1f77bcf86cd799439011",
"author": {
"id": "507f1f77bcf86cd799439011",
"name": "John Doe",
"profilePicture": "https://cdn.example.com/avatars/john.png",
"type": "customer"
},
"changelogId": "507f1f77bcf86cd799439013",
"content": "<p>This is a great idea!</p>",
"createdAt": "2023-12-12T00:00:00.000Z",
"downvotes": 0,
"inReview": false,
"isDeleted": false,
"isPinned": false,
"isPrivate": false,
"isSpam": false,
"object": "comment",
"parentCommentId": "507f1f77bcf86cd799439014",
"postId": "507f1f77bcf86cd799439012",
"score": 5,
"updatedAt": "2023-12-13T00:00:00.000Z",
"upvotes": 5
}
],
"nextCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9",
"object": "list",
"pagination": {
"limit": 10,
"page": 1,
"total": 42,
"totalPages": 5
}
}Returns Examples
{
"data": [
{
"id": "507f1f77bcf86cd799439011",
"author": {
"id": "507f1f77bcf86cd799439011",
"name": "John Doe",
"profilePicture": "https://cdn.example.com/avatars/john.png",
"type": "customer"
},
"changelogId": "507f1f77bcf86cd799439013",
"content": "<p>This is a great idea!</p>",
"createdAt": "2023-12-12T00:00:00.000Z",
"downvotes": 0,
"inReview": false,
"isDeleted": false,
"isPinned": false,
"isPrivate": false,
"isSpam": false,
"object": "comment",
"parentCommentId": "507f1f77bcf86cd799439014",
"postId": "507f1f77bcf86cd799439012",
"score": 5,
"updatedAt": "2023-12-13T00:00:00.000Z",
"upvotes": 5
}
],
"nextCursor": "eyJpZCI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9",
"object": "list",
"pagination": {
"limit": 10,
"page": 1,
"total": 42,
"totalPages": 5
}
}