Ir al contenido principal
Comments

Update a comment

Updates an existing comment by its unique identifier.

PATCH
/v2/comments/{id}

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 src attributes 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 - Requires manage_comments_private permission
    • isPinned - Requires set_comment_pinned permission
    • inReview - Requires moderate_comments permission
    • Updating other users' comments - Requires moderate_comments permission

Response

Returns the updated comment object with all fields populated.

Errors

  • 400 - Invalid comment ID format or input
  • 403 - Not authorized to update this comment
  • 404 - Comment not found
Authorizationstringheaderobligatorio

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

idstringobligatorio

Comment unique identifier

Ejemplo: 507f1f77bcf86cd799439011
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
contentstring

Comment content in HTML format

Minimum string length: 2
Ejemplo: <p>This is my updated comment.</p>
createdAtstring | null

Update the creation date (useful for imports)

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

Set the downvotes count directly. Score will be recalculated as upvotes - downvotes.

Rango requerido: 0 <= x
Ejemplo: 2
inReviewboolean | null

Whether the comment is pending moderation review

Ejemplo: false
isPinnedboolean | null

Whether the comment is pinned at the top

Ejemplo: true
isPrivateboolean | null

Whether the comment is private (only visible to admins)

Ejemplo: false
upvotesinteger | null

Set the upvotes count directly. Score will be recalculated as upvotes - downvotes.

Rango requerido: 0 <= x
Ejemplo: 10

Respuesta

application/json

Success

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