---
title: "Update Entity"
method: PUT
path: "/v2/entities/{id}"
tags: ["Entity API"]
---

# Update Entity

`PUT /v2/entities/{id}`

Update an existing entity.

## Path parameters

- `id` string, required — The ID of the entity.

## Request body

- object
  - `fieldValues` SvstoreEntityFieldValueInput[] — The field values to set. Only provided fields are updated; omitted fields are untouched.
    - `fieldId` string — Identify the field by ID or key. At least one is required.
    - `fieldKey` string
    - `value` union — `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value.
      - number
      - string
      - boolean
      - object
    - `pinned` boolean — Pin this value to prevent ingestion from overwriting it. Default false = ingestion can overwrite. True = sticky.
  - `name` string — Convenience field to update the entity's name. Sets the value of the entity type's name field (is_name_field). Ignored if field_values already contains a value for the name field.

## Response `200`

Success

- SvstorePublicapiUpdateEntityResponse
  - `data` SvstoreEntity
    - `id` string — Identity
    - `key` string
    - `name` string
    - `teamId` string
    - `entityTypeId` string
    - `entityTypeKey` string
    - `createdByUserId` string — Audit
    - `updatedByUserId` string
    - `createdAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    - `updatedAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    - `deletedAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    - `fieldValues` SvstoreEntityFieldValue[] — Data
      - `id` string — The EAV row id. NOT populated on entity read paths (Entity.field_values: search / list / get / create / update) since the v4 slim document_json dropped it — it has no consumer there. It IS populated on the listEntityFieldValueHistory RPC, which reads EAV rows directly.
      - `entityId` string
      - `fieldId` string
      - `fieldKey` string
      - `fieldName` string
      - `dataType` 'DATA_TYPE_UNSPECIFIED' | 'TEXT' | 'NUMBER' | 'BOOL' | 'TIMESTAMP' | 'ENUM' | 'ENTITY_REF' | 'USER_REF' | 'UNIQUE' | 'MULTI_SELECT' | 'FILE'
      - `value` union — `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value.
        - number
        - string
        - boolean
        - object
      - `setByUserId` string, nullable — Attribution: who/what set this field value. Stored in the slim document_json and populated on ALL entity read paths (search / list / get / create / update) as well as field-value history.
      - `setByAppInstanceId` string, nullable
      - `createdAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
      - `deletedAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
      - `pinned` boolean — When true, ingestion cannot overwrite this user-set value. Stored in the slim document_json and populated on ALL entity read paths.
    - `sourceAppInstanceIds` string[]
    - `sharedMetadata` SvstoreSharedEntityMetadata — Metadata for entities shared from another team's schema.
      - `sourceTeamId` string
      - `sourceTeamName` string

## Other responses

- `default` — Error

---

[API](https://skmtc.net/serval/apis/serval-public-api.md) · [All operations](https://skmtc.net/serval/apis/serval-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/serval/serval-public-api/versions/0549515e9384/schema)
