Update Comment

Written By Team BugSmash

Last updated 10 days ago

METHOD: PATCH
URL: https://api.bugsmash.io/api/v2/comment/{commentId}

HEADERS:
  X-API-Key: YOUR_API_KEY
  Content-Type: multipart/form-data  (if uploading attachment) or application/json

PATH PARAMETERS:
  commentId  (uuid, required)  - The comment ID

REQUEST BODY (all optional, minimum one field required):
  text        (string)
  status      (string): Active or Resolved
  priority    (string): Unset, P1, P2, P3, P4
  isPrivate   (boolean): true or false
  attachment  (file): Image file (jpg, png, etc.)

CURL:
curl --location --request PATCH 'https://api.bugsmash.io/api/v2/comment/{commentId}' \
--header 'X-API-Key: YOUR_API_KEY' \
--form 'text="Updated comment text"' \
--form 'status="Resolved"'

RESPONSE:
{
  "status": true,
  "message": "Comment updated",
  "data": {
    "comment_id": "d4e5f6a7-b8c9-0123-defa-123456789013",
    "comment": "<p>Updated comment text.</p>",
    "comment_number": 7,
    "status": "Resolved",
    "created_at": "2026-04-06T14:04:05.000000Z",
    "updated_at": "2026-04-06T15:18:36.000000Z",
    "is_private": true,
    "comment_by_name": "John Doe",
    "comment_by_email": "user@example.com",
    "assigned_to_name": null,
    "assigned_to_email": null,
    "priority": "P1",
    "attachment_file_url": "https://cdn.bugsmash.io/files/{workspace-id}/image/attachment-example.png",
    "project_type": "pdf",
    "comment_screenshot_file_url": null
  }
}