Skip to main content
PATCH
/
:projectId
/
entities
/
:entityId
/
upvote
Upvote Entity
curl --request PATCH \
  --url https://api.replyke.com/api/v6/:projectId/entities/:entityId/upvote
{
  "id": "<string>",
  "userId": "<string>",
  "title": "<string>",
  "upvotes": [
    {}
  ],
  "downvotes": [
    {}
  ]
}
Upvotes an entity on behalf of the authenticated user. If the user has previously downvoted the entity, the downvote is removed.

Path Parameters

entityId
string
required
The ID of the entity to upvote

Response

Returns the updated entity object with the new upvote.
id
string
Unique entity identifier
userId
string
ID of the entity creator
title
string
Entity title
upvotes
array
Array of user IDs who upvoted (includes the current user)
downvotes
array
Array of user IDs who downvoted

Error Responses

{
  "error": "Missing entityId in request.",
  "code": "entity/invalid-id"
}
{
  "error": "Entity not found.",
  "code": "entity/not-found"
}
{
  "error": "User already upvoted entity.",
  "code": "entity/already-upvoted"
}
{
  "error": "Internal server error.",
  "code": "entity/server-error",
  "details": "<Error message>"
}

Notes

  • This action is only available to authenticated users.
  • A notification will be sent to the entity owner upon upvote.
  • Reputation points are updated for the entity owner.
I