Update a comment
PATCH/v2/comments/{id}
Updates an existing comment by its unique identifier.
You can update:
- content - Comment text (HTML format)
- isPrivate - Privacy status (admin-only visibility)
- isPinned - Pinned status (displayed at top)
- inReview - Moderation status
Content Format
Content should be formatted as HTML. For images:
- External URLs in
img srcattributes are automatically pulled into our storage - Base64 encoded data URIs (
data:image/...) are also supported and processed
Permissions
- Comment authors can update their own comment content
- Admin permissions required for:
isPrivate- Requiresmanage_comments_privatepermissionisPinned- Requiresset_comment_pinnedpermissioninReview- Requiresmoderate_commentspermission- Updating other users’ comments - Requires
moderate_commentspermission
Response
Returns the updated comment object with all fields populated.
Errors
400- Invalid comment ID format or input403- Not authorized to update this comment404- Comment not found
Update a comment
curl https://do.featurebase.app/v2/comments/$ID \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $FEATUREBASE_API_KEY" \
-d '{
"content": "<p>This is my updated comment.</p>",
"createdAt": "2025-01-15T10:30:00.000Z",
"downvotes": 2,
"isPinned": true,
"upvotes": 10
}'{
"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
}Returns Examples
{
"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
}