Update the content of an existing comment. Only the comment body and parent comment ID can be updated. File path, line number, and pull request ID cannot be changed after creation.
Authentication
This endpoint requires JWT authentication. Include the JWT token in the Authorization header:
Authorization: Bearer <token>
Path Parameters
The ID of the comment to update
Request Body
All fields are optional. Only include the fields you want to update.
The updated content of the comment
Update the parent comment ID to move this comment to a different thread
Response
The unique identifier for the comment
The updated content of the comment
The file path where the comment was made
The line number in the file
The ID of the pull request
The ID of the user who created the comment
The ID of the parent comment if this is a reply
Whether this comment thread has been resolved
ISO 8601 timestamp of when the comment was created
ISO 8601 timestamp of when the comment was last updated
Example
curl -X PATCH https://api.diffy.com/comments/1 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"body": "This function should be optimized by caching the result and using memoization"
}'
Response
{
"id": "1",
"body": "This function should be optimized by caching the result and using memoization",
"filePath": "src/utils/processor.ts",
"lineNumber": 42,
"pullRequestId": "123456789",
"userId": 5,
"parentCommentId": null,
"resolved": false,
"createdAt": "2026-03-01T10:30:00Z",
"updatedAt": "2026-03-01T14:20:00Z"
}