Skip to main content
PATCH
/
:projectId
/
comments
/
:commentId
/
upvote
Upvote Comment
curl --request PATCH \
  --url https://api.replyke.com/api/v6/:projectId/comments/:commentId/upvote
{
  "id": "<string>",
  "entityId": "<string>",
  "upvotes": [
    {}
  ],
  "downvotes": [
    {}
  ],
  "content": "<string>"
}
Upvotes a comment on behalf of the authenticated user. Adds the user’s ID to the comment’s upvotes array. Removes the user from downvotes if previously downvoted. Increases the reputation of the comment author and sends a notification.

Path Parameters

commentId
string
required
The ID of the comment to upvote

Response

Returns the updated comment with the new upvote.
id
string
Unique comment identifier
entityId
string
ID of the entity this comment belongs to
upvotes
array
Array of user IDs who upvoted (includes the current user)
downvotes
array
Array of user IDs who downvoted
content
string
Comment content

Error Responses

{
  "error": "Missing required data",
  "code": "comment/missing-data"
}
{
  "error": "Comment not found",
  "code": "comment/not-found"
}
{
  "error": "User has already upvoted this comment",
  "code": "comment/already-upvoted"
}
{
  "error": "Internal server error.",
  "code": "comment/server-error",
  "details": "[error message]"
}

Notes

  • If the user already upvoted the comment, a 409 Conflict error is returned.
  • Reputation is awarded to the comment’s author.
  • A notification is triggered to inform the comment’s author of the upvote.
  • The user’s ID is removed from downvotes if previously present.
I