> ## Documentation Index
> Fetch the complete documentation index at: https://replyke-feat-push-rich-payload-fields.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upvote Entity

> Upvote an entity on behalf of the authenticated user

Upvotes an entity on behalf of the authenticated user. If the user has previously downvoted the entity, the downvote is removed.

## Path Parameters

<ParamField path="entityId" type="string" required>
  The ID of the entity to upvote
</ParamField>

## Response

Returns the updated entity object with the new upvote.

<ResponseField name="id" type="string">
  Unique entity identifier
</ResponseField>

<ResponseField name="userId" type="string">
  ID of the entity creator
</ResponseField>

<ResponseField name="title" type="string">
  Entity title
</ResponseField>

<ResponseField name="upvotes" type="array">
  Array of user IDs who upvoted (includes the current user)
</ResponseField>

<ResponseField name="downvotes" type="array">
  Array of user IDs who downvoted
</ResponseField>

## Error Responses

<AccordionGroup>
  <Accordion title="Missing Entity ID - 400 Bad Request">
    ```json theme={null}
    {
      "error": "Missing entityId in request.",
      "code": "entity/invalid-id"
    }
    ```
  </Accordion>

  <Accordion title="Entity Not Found - 404 Not Found">
    ```json theme={null}
    {
      "error": "Entity not found.",
      "code": "entity/not-found"
    }
    ```
  </Accordion>

  <Accordion title="Already Upvoted - 409 Conflict">
    ```json theme={null}
    {
      "error": "User already upvoted entity.",
      "code": "entity/already-upvoted"
    }
    ```
  </Accordion>

  <Accordion title="Server Error - 500 Internal Server Error">
    ```json theme={null}
    {
      "error": "Internal server error.",
      "code": "entity/server-error",
      "details": "<Error message>"
    }
    ```
  </Accordion>
</AccordionGroup>

***

## 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.
