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

Path Parameters

entityId
string
required
The ID of the entity to downvote

Response

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

Error Responses

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

Notes

  • This action is only available to authenticated users.
  • Reputation points are updated for the entity owner.
I