v1

latestOpenAPI 3.1.0Serval License2026-07-26202952779.1 KB
Entity Type API

Create Entity Type Field

Create a field on an entity type. Returns the schema_migration_id of the (already-completed) create migration; fetch it via Get Schema Migration to read the new field id from details.create_field.field_id.

post/v2/entity-type-fields

Request body

entityTypeIdstring

The entity type to create the field on (required).

keystring nullable

The unique key for the field. If omitted, derived from the name.

namestring

The display name of the field (required).

dataType'DATA_TYPE_UNSPECIFIED' | 'TEXT' | 'NUMBER' | 'BOOL' | 'TIMESTAMP' | 'ENUM' | 'ENTITY_REF' | 'USER_REF' | 'UNIQUE' | 'MULTI_SELECT' | 'FILE'
isKeyFieldboolean

Whether this field is the entity type's key (dedup identity) field.

isNameFieldboolean

Whether this field is the entity type's display-name field.

refEntityTypeIdstring nullable

For ENTITY_REF fields: the entity type this field references.

Response

Success