> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Increment Entity Views

> Add to an entity's view count

Increments an entity's `views` counter and returns the updated entity.

<Warning>
  This endpoint requires a **service or master key** and cannot be called with an end-user token. Count views from your own backend rather than from the client, so a browser cannot inflate the number.
</Warning>

## Path Parameters

<ParamField path="entityId" type="string" required>
  UUID of the entity.
</ParamField>

## Query Parameters

<ParamField query="count" type="number">
  How much to add to the counter. Defaults to `1`. Must be a positive integer — pass a batch total to record views your backend has buffered rather than calling the endpoint once per view.
</ParamField>

## Response

Returns the full updated [Entity](/v7/data-models/entity), with `views` reflecting the increment.

<ResponseField name="id" type="string">
  UUID of the entity.
</ResponseField>

<ResponseField name="views" type="number">
  The view count after the increment.
</ResponseField>

## Error Responses

<AccordionGroup>
  <Accordion title="Invalid Parameters — 400">
    ```json theme={null}
    { "error": "Invalid path parameters.", "code": "entity/invalid-params" }
    ```
  </Accordion>

  <Accordion title="Invalid Count — 400">
    Returned when `count` is not a positive integer.

    ```json theme={null}
    { "error": "Count must be a positive integer", "code": "entity/invalid-query" }
    ```
  </Accordion>

  <Accordion title="Elevated Auth Required — 403">
    ```json theme={null}
    {
      "error": "Service or master key required.",
      "code": "auth/elevated-auth-required"
    }
    ```
  </Accordion>

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

  <Accordion title="Server Error — 500">
    ```json theme={null}
    {
      "error": "An error occurred while updating entity views.",
      "code": "entity/server-error"
    }
    ```
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.