API EndpointsCommentsUpdate Comment

Update Comment

Endpoint

URL: /:projectId/comments/:commentId

Method: PATCH

Authentication Required: Yes


Description

Updates the content of an existing comment. Only the original author or a master client may perform this operation.


Request

Path Parameters

ParameterTypeRequiredDescription
commentIdstringYesThe ID of the comment to update.

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authenticated users.

Body Parameters

FieldTypeRequiredDescription
contentstringYesThe updated comment content.

Example Request

{
  "content": "Updated comment content."
}

Response

Success Response (200 OK)

Returns the updated comment:

{
  "id": "comment-123",
  "entityId": "entity-456",
  "content": "Updated comment content.",
  ...
}

Error Responses

Missing Data (400 Bad Request)

{
  "error": "Missing required data",
  "code": "comment/invalid-request"
}

Not Found (404 Not Found)

{
  "error": "Comment not found",
  "code": "comment/not-found"
}

Forbidden (403 Forbidden)

{
  "error": "You do not have permission to update this comment.",
  "code": "comment/forbidden"
}

Server Error (500 Internal Server Error)

{
  "error": "Internal server error.",
  "code": "comment/server-error",
  "details": "[error message]"
}

Notes

  • Only the author of the comment or a master client can update a comment.
  • If the comment doesn’t exist or the user isn’t authorized, appropriate error responses are returned.