Skip to main content
Comments

Create a new comment

Creates a new comment or reply to an existing comment.

POST
/v2/comments

You can create a comment for a post or changelog. Comments support:

  • HTML content (images are automatically uploaded to our storage)
  • Threading (replies via parentCommentId)
  • Privacy controls (private comments visible only to admins)
  • Author attribution (post on behalf of users)

Required Fields

  • content - Comment content in HTML format
  • postId OR changelogId - One is required to specify the target

Optional Fields

  • parentCommentId - Create a reply to an existing comment
  • isPrivate - Make comment visible only to admins (default: false)
  • sendNotification - Notify voters about the comment (default: true)
  • author - Post comment under a specific user (uses authenticated user if not provided)
  • createdAt - Backdate creation (useful for imports)

Author Object

The author field supports multiple identification methods:

  • id - Featurebase user ID (direct reference)
  • userId - External user ID from your system (via SSO)
  • email - Email address (finds existing or creates new user)
  • name - Display name (used with email for new users)
  • profilePicture - Profile picture URL

If no author is provided, the comment is posted under the authenticated user.

Content Format

Content should be formatted as HTML. For images:

  • External URLs in img src attributes are automatically pulled into our storage
  • Base64 encoded data URIs (data:image/...) are also supported and processed

Response

Returns the created comment object with all fields populated, including:

  • id - Unique comment identifier
  • author - Author information
  • Voting stats and timestamps

Errors

  • 400 - Invalid input (missing required fields, invalid IDs)
  • 403 - Commenting disabled or not authorized
  • 404 - Post/changelog not found or parent comment not found
Authorizationstringheaderrequired

API key as Bearer token. Use: Authorization: Bearer sk_...

Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Available options: 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Example: 2026-08-19.orbit

Body

application/json
authorobject

Author to attribute the post to. If not provided, uses the authenticated user — unless source is given, in which case a guest author is synthesised from source.label (or the channel name), because a relayed request belongs to the customer who said it. Supports multiple identification methods: id (Featurebase ID), userId (external SSO ID), or email.

changelogIdstring

Changelog ID to comment on (accepts ObjectId or slug)

Example: 507f1f77bcf86cd799439012
contentstringrequired

Comment content in HTML format

Minimum string length: 2
Example: <p>This is a great idea!</p>
createdAtstring | null

Set the date when the comment was created. Useful for importing comments from other platforms.

Example: 2025-01-15T10:30:00.000Z
downvotesinteger | null

Initial downvotes count. Useful for importing comments from other platforms. Score will be calculated as upvotes - downvotes.

Required range: 0 <= x
Example: 0
isPrivateboolean | nulldefault:false

Whether the comment is private (only visible to admins)

Example: false
parentCommentIdstring

Parent comment ID if this is a reply

Example: 507f1f77bcf86cd799439013
postIdstring

Post ID to comment on (accepts ObjectId or slug)

Example: 507f1f77bcf86cd799439011
sendNotificationboolean | nulldefault:true

Whether to notify voters of the submission about the comment

Example: true
upvotesinteger | null

Initial upvotes count. Useful for importing comments from other platforms. Score will be calculated as upvotes - downvotes.

Required range: 0 <= x
Example: 5

Response

application/json

Created

authorobject | nullrequired
changelogIdstring | nullrequired

Changelog ID this comment belongs to

Example: 507f1f77bcf86cd799439013
contentstringrequired

Comment content in HTML format

Example: <p>This is a great idea!</p>
createdAtstringrequired

ISO 8601 timestamp when created

Example: 2023-12-12T00:00:00.000Z
downvotesnumberrequired

Number of downvotes

Example: 0
idstringrequired

Unique identifier

Example: 507f1f77bcf86cd799439011
inReviewbooleanrequired

Whether the comment is in review

Example: false
isDeletedbooleanrequired

Whether the comment is deleted

Example: false
isPinnedbooleanrequired

Whether the comment is pinned

Example: false
isPrivatebooleanrequired

Whether the comment is private

Example: false
isSpambooleanrequired

Whether the comment is spam

Example: false
objectenum<string>required

Object type identifier

Available options: comment
Example: comment
parentCommentIdstring | nullrequired

Parent comment ID for replies, null for root comments

Example: 507f1f77bcf86cd799439014
postIdstring | nullrequired

Post ID this comment belongs to

Example: 507f1f77bcf86cd799439012
scorenumberrequired

Net score (upvotes - downvotes)

Example: 5
updatedAtstringrequired

ISO 8601 timestamp when updated

Example: 2023-12-13T00:00:00.000Z
upvotesnumberrequired

Number of upvotes

Example: 5