---
title: "Update Entity Type Field"
method: PUT
path: "/v2/entity-type-fields/{id}"
tags: ["Entity Type API"]
---

# Update Entity Type Field

`PUT /v2/entity-type-fields/{id}`

Update an entity type field: rename it (set name) and/or change its data type (set data_type, plus enum_options when the new type is ENUM/MULTI_SELECT). At most one attribute may change per request. This is an asynchronous schema migration: the response contains schema_migration_id, which you poll via Get Schema Migration to track completion.

## Path parameters

- `id` string, required — The ID of the entity type field to update.

## Request body

- object
  - `name` string, nullable — New display name. When provided and different from the current name, the field is renamed (key re-derived via slugify). Omit to leave unchanged.
  - `dataType` 'DATA_TYPE_UNSPECIFIED' | 'TEXT' | 'NUMBER' | 'BOOL' | 'TIMESTAMP' | 'ENUM' | 'ENTITY_REF' | 'USER_REF' | 'UNIQUE' | 'MULTI_SELECT' | 'FILE'
  - `enumOptions` SvstoreEnumOptionInput[] — Required when data_type is changing to ENUM or MULTI_SELECT: the option set for the converted field.
    - `value` string
    - `displayName` string
    - `displayOrder` integer

## Response `200`

Success

- SvstorePublicapiUpdateEntityTypeFieldResponse
  - `data` SvstorePublicapiSchemaMigrationRef — SchemaMigrationRef references the migration produced by a field mutation. Poll its state via GetSchemaMigration.
    - `schemaMigrationId` string — The ID of the schema migration. Empty when the request was a no-op (e.g. an Update that changed nothing).

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