---
title: "Search Entity Types"
method: POST
path: "/v2/entity-types/search"
tags: ["Entity Type API"]
---

# Search Entity Types

`POST /v2/entity-types/search`

Search for entity types by key or other filters.

## Request body

- SvstorePublicapiSearchEntityTypesRequest
  - `teamId` string — The ID of the team.
  - `key` string, nullable — Optional filter by entity type key.
  - `pageSize` integer, nullable — Maximum number of results to return. Default is 5000, maximum is 10000.
  - `pageToken` string, nullable — Token for pagination. Leave empty for the first request.

## Response `200`

Success

- SvstorePublicapiSearchEntityTypesResponse
  - `data` SvstoreEntityTypeWithFields[] — The list of matching entity types.
    - `id` string
    - `teamId` string
    - `key` string
    - `name` string
    - `parentEntityTypeId` string, nullable
    - `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").
    - `createdByUserId` string
    - `updatedByUserId` string
    - `fields` SvstoreEntityTypeField[]
      - `id` string
      - `entityTypeId` string
      - `key` string
      - `name` string
      - `dataType` 'DATA_TYPE_UNSPECIFIED' | 'TEXT' | 'NUMBER' | 'BOOL' | 'TIMESTAMP' | 'ENUM' | 'ENTITY_REF' | 'USER_REF' | 'UNIQUE' | 'MULTI_SELECT' | 'FILE'
      - `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").
      - `createdByUserId` string
      - `updatedByUserId` string
      - `enumOptions` SvstoreEnumOption[]
        - `id` string
        - `value` string
        - `displayName` string
        - `displayOrder` integer
      - `isKeyField` boolean — Whether this field's value drives the entity's key (dedup identifier). Must be a UNIQUE data type field. At most one per entity type.
      - `isNameField` boolean — Whether this field's value drives the entity's display name.
      - `refEntityTypeId` string, nullable — For ENTITY_REF fields: the entity type ID that this field references.
      - `description` string, nullable
      - `sourceEntityTypeId` string, nullable — If set, this field is inherited from the specified entity type. Empty means the field is defined directly on this entity type.
      - `sectionId` string, nullable — Visual grouping for the entity detail UI. Unset means the field renders in the implicit "Overview" tab.
    - `color` string, nullable
    - `iconSlug` string
    - `entitySchemaId` string
    - `helpAgentVisibility` 'HELP_AGENT_ENTITY_VISIBILITY_UNSPECIFIED' | 'HELP_AGENT_ENTITY_VISIBILITY_NONE' | 'HELP_AGENT_ENTITY_VISIBILITY_REQUESTER_ASSOCIATED' | 'HELP_AGENT_ENTITY_VISIBILITY_ALWAYS'
    - `sections` SvstoreEntityFieldSection[] — Visual groupings (tabs) for this type's field bindings. Each binding's section_id references one of these. Bindings whose section_id is unset render in the implicit "Overview" tab. Includes both own sections and mirrored sections inherited from ancestors.
      - `id` string
      - `entityTypeId` string
      - `name` string
      - `sourceEntityTypeId` string, nullable — If set, this section is mirrored from the specified ancestor type. Empty means the section is defined directly on this entity type.
      - `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").
      - `createdByUserId` string
      - `updatedByUserId` string
    - `isEdgeType` boolean — When true, this type's instances represent a relationship/edge between two other entities (mirrors EntityType.is_edge_type).
    - `description` string, nullable — What records of this type represent (mirrors EntityType.description).
  - `nextPageToken` string, nullable — Token for retrieving the next page of results. Empty if no more results.

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