Ir al contenido principal
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
Authorizationstringheaderobligatorio

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.

Opciones disponibles: 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Ejemplo: 2026-08-19.orbit

Cuerpo

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)

Ejemplo: 507f1f77bcf86cd799439012
contentstringobligatorio

Comment content in HTML format

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

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

Ejemplo: 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.

Rango requerido: 0 <= x
Ejemplo: 0
isPrivateboolean | nulldefault:false

Whether the comment is private (only visible to admins)

Ejemplo: false
parentCommentIdstring

Parent comment ID if this is a reply

Ejemplo: 507f1f77bcf86cd799439013
postIdstring

Post ID to comment on (accepts ObjectId or slug)

Ejemplo: 507f1f77bcf86cd799439011
sendNotificationboolean | nulldefault:true

Whether to notify voters of the submission about the comment

Ejemplo: true
upvotesinteger | null

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

Rango requerido: 0 <= x
Ejemplo: 5

Respuesta

application/json

Created

authorobject | nullobligatorio
changelogIdstring | nullobligatorio

Changelog ID this comment belongs to

Ejemplo: 507f1f77bcf86cd799439013
contentstringobligatorio

Comment content in HTML format

Ejemplo: <p>This is a great idea!</p>
createdAtstringobligatorio

ISO 8601 timestamp when created

Ejemplo: 2023-12-12T00:00:00.000Z
downvotesnumberobligatorio

Number of downvotes

Ejemplo: 0
idstringobligatorio

Unique identifier

Ejemplo: 507f1f77bcf86cd799439011
inReviewbooleanobligatorio

Whether the comment is in review

Ejemplo: false
isDeletedbooleanobligatorio

Whether the comment is deleted

Ejemplo: false
isPinnedbooleanobligatorio

Whether the comment is pinned

Ejemplo: false
isPrivatebooleanobligatorio

Whether the comment is private

Ejemplo: false
isSpambooleanobligatorio

Whether the comment is spam

Ejemplo: false
objectenum<string>obligatorio

Object type identifier

Opciones disponibles: comment
Ejemplo: comment
parentCommentIdstring | nullobligatorio

Parent comment ID for replies, null for root comments

Ejemplo: 507f1f77bcf86cd799439014
postIdstring | nullobligatorio

Post ID this comment belongs to

Ejemplo: 507f1f77bcf86cd799439012
scorenumberobligatorio

Net score (upvotes - downvotes)

Ejemplo: 5
updatedAtstringobligatorio

ISO 8601 timestamp when updated

Ejemplo: 2023-12-13T00:00:00.000Z
upvotesnumberobligatorio

Number of upvotes

Ejemplo: 5