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

# Search Entity Types

> Search for entity types by key or other filters.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/entity-types/search
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Request API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: Report API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/entity-types/search:
    post:
      tags:
        - Entity Type API
      summary: Search Entity Types
      description: Search for entity types by key or other filters.
      operationId: svrelay.publicv2.PublicAPIServiceV2.SearchEntityTypes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/svstore.publicapi.SearchEntityTypesRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svstore.publicapi.SearchEntityTypesResponse
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
      security:
        - BearerAuth: []
components:
  schemas:
    svstore.publicapi.SearchEntityTypesRequest:
      type: object
      properties:
        teamId:
          type: string
          title: team_id
          description: The ID of the team.
          x-stainless-terraform-configurability: optional
        key:
          type: string
          title: key
          description: Optional filter by entity type key.
          nullable: true
          x-stainless-terraform-configurability: optional
        pageSize:
          type: integer
          title: page_size
          format: int32
          description: >-
            Maximum number of results to return. Default is 5000, maximum is
            10000.
          nullable: true
          x-stainless-terraform-configurability: computed_optional
        pageToken:
          type: string
          title: page_token
          description: Token for pagination. Leave empty for the first request.
          nullable: true
          x-stainless-terraform-configurability: optional
      title: SearchEntityTypesRequest
      additionalProperties: false
    svstore.publicapi.SearchEntityTypesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/svstore.EntityTypeWithFields'
          title: data
          description: The list of matching entity types.
          x-stainless-terraform-configurability: optional
        nextPageToken:
          type: string
          title: next_page_token
          description: >-
            Token for retrieving the next page of results. Empty if no more
            results.
          nullable: true
          x-stainless-terraform-configurability: optional
      title: SearchEntityTypesResponse
      additionalProperties: false
    connect.error:
      type: object
      properties:
        code:
          type: string
          examples:
            - not_found
          enum:
            - canceled
            - unknown
            - invalid_argument
            - deadline_exceeded
            - not_found
            - already_exists
            - permission_denied
            - resource_exhausted
            - failed_precondition
            - aborted
            - out_of_range
            - unimplemented
            - internal
            - unavailable
            - data_loss
            - unauthenticated
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          x-stainless-terraform-configurability: optional
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
          x-stainless-terraform-configurability: optional
        detail:
          $ref: '#/components/schemas/google.protobuf.Any'
          x-stainless-terraform-configurability: optional
      title: Connect Error
      additionalProperties: true
      description: >-
        Error type returned by Connect:
        https://connectrpc.com/docs/go/errors/#http-representation
    svstore.EntityTypeWithFields:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        teamId:
          type: string
          title: team_id
          x-stainless-terraform-configurability: optional
        key:
          type: string
          title: key
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          x-stainless-terraform-configurability: optional
        parentEntityTypeId:
          type: string
          title: parent_entity_type_id
          nullable: true
          x-stainless-terraform-configurability: optional
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          x-stainless-terraform-configurability: optional
        updatedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          x-stainless-terraform-configurability: optional
        createdByUserId:
          type: string
          title: created_by_user_id
          x-stainless-terraform-configurability: optional
        updatedByUserId:
          type: string
          title: updated_by_user_id
          x-stainless-terraform-configurability: optional
        fields:
          type: array
          items:
            $ref: '#/components/schemas/svstore.EntityTypeField'
          title: fields
          x-stainless-terraform-configurability: optional
        color:
          type: string
          title: color
          nullable: true
          x-stainless-terraform-configurability: optional
        iconSlug:
          type: string
          title: icon_slug
          x-stainless-terraform-configurability: optional
        entitySchemaId:
          type: string
          title: entity_schema_id
          x-stainless-terraform-configurability: optional
        helpAgentVisibility:
          $ref: '#/components/schemas/svstore.HelpAgentEntityVisibility'
          title: help_agent_visibility
          x-stainless-terraform-configurability: optional
        sections:
          type: array
          items:
            $ref: '#/components/schemas/svstore.EntityFieldSection'
          title: sections
          description: >-
            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.
          x-stainless-terraform-configurability: optional
        isEdgeType:
          type: boolean
          title: is_edge_type
          description: >-
            When true, this type's instances represent a relationship/edge
            between two
             other entities (mirrors EntityType.is_edge_type).
          x-stainless-terraform-configurability: computed_optional
        description:
          type: string
          title: description
          description: >-
            What records of this type represent (mirrors
            EntityType.description).
          nullable: true
          x-stainless-terraform-configurability: optional
      title: EntityTypeWithFields
      additionalProperties: false
    google.protobuf.Any:
      type: object
      properties:
        type:
          type: string
          x-stainless-terraform-configurability: optional
        value:
          type: string
          format: binary
          x-stainless-terraform-configurability: optional
        debug:
          type: object
          additionalProperties: true
          x-stainless-terraform-configurability: optional
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
    google.protobuf.Timestamp:
      type: string
      format: date-time
      description: A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    svstore.EntityTypeField:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        entityTypeId:
          type: string
          title: entity_type_id
          x-stainless-terraform-configurability: optional
        key:
          type: string
          title: key
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          x-stainless-terraform-configurability: optional
        dataType:
          $ref: '#/components/schemas/svstore.EntityTypeField.DataType'
          title: data_type
          x-stainless-terraform-configurability: optional
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          x-stainless-terraform-configurability: optional
        updatedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          x-stainless-terraform-configurability: optional
        createdByUserId:
          type: string
          title: created_by_user_id
          x-stainless-terraform-configurability: optional
        updatedByUserId:
          type: string
          title: updated_by_user_id
          x-stainless-terraform-configurability: optional
        enumOptions:
          type: array
          items:
            $ref: '#/components/schemas/svstore.EnumOption'
          title: enum_options
          x-stainless-terraform-configurability: optional
        isKeyField:
          type: boolean
          title: is_key_field
          description: >-
            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.
          x-stainless-terraform-configurability: computed_optional
        isNameField:
          type: boolean
          title: is_name_field
          description: Whether this field's value drives the entity's display name.
          x-stainless-terraform-configurability: computed_optional
        refEntityTypeId:
          type: string
          title: ref_entity_type_id
          description: >-
            For ENTITY_REF fields: the entity type ID that this field
            references.
          nullable: true
          x-stainless-terraform-configurability: optional
        description:
          type: string
          title: description
          nullable: true
          x-stainless-terraform-configurability: optional
        sourceEntityTypeId:
          type: string
          title: source_entity_type_id
          description: |-
            If set, this field is inherited from the specified entity type.
             Empty means the field is defined directly on this entity type.
          nullable: true
          x-stainless-terraform-configurability: optional
        sectionId:
          type: string
          title: section_id
          description: >-
            Visual grouping for the entity detail UI. Unset means the field
            renders
             in the implicit "Overview" tab.
          nullable: true
          x-stainless-terraform-configurability: optional
      title: EntityTypeField
      additionalProperties: false
    svstore.HelpAgentEntityVisibility:
      type: string
      title: HelpAgentEntityVisibility
      enum:
        - HELP_AGENT_ENTITY_VISIBILITY_UNSPECIFIED
        - HELP_AGENT_ENTITY_VISIBILITY_NONE
        - HELP_AGENT_ENTITY_VISIBILITY_REQUESTER_ASSOCIATED
        - HELP_AGENT_ENTITY_VISIBILITY_ALWAYS
    svstore.EntityFieldSection:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        entityTypeId:
          type: string
          title: entity_type_id
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          x-stainless-terraform-configurability: optional
        sourceEntityTypeId:
          type: string
          title: source_entity_type_id
          description: |-
            If set, this section is mirrored from the specified ancestor type.
             Empty means the section is defined directly on this entity type.
          nullable: true
          x-stainless-terraform-configurability: optional
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          x-stainless-terraform-configurability: optional
        updatedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          x-stainless-terraform-configurability: optional
        createdByUserId:
          type: string
          title: created_by_user_id
          x-stainless-terraform-configurability: optional
        updatedByUserId:
          type: string
          title: updated_by_user_id
          x-stainless-terraform-configurability: optional
      title: EntityFieldSection
      additionalProperties: false
      description: >-
        EntityFieldSection is a per-entity-type visual grouping for field
        bindings
         — rendered as tabs on the entity detail UI ("General", "Purchasing",
         "Compliance"). Bindings without a section_id render in an implicit
         "Overview" tab. Sections are materialized down the inheritance chain just
         like fields: when an ancestor defines a section it is mirrored onto every
         descendant with source_entity_type_id pointing back.
    svstore.EntityTypeField.DataType:
      type: string
      title: DataType
      enum:
        - DATA_TYPE_UNSPECIFIED
        - TEXT
        - NUMBER
        - BOOL
        - TIMESTAMP
        - ENUM
        - ENTITY_REF
        - USER_REF
        - UNIQUE
        - MULTI_SELECT
        - FILE
    svstore.EnumOption:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        value:
          type: string
          title: value
          x-stainless-terraform-configurability: optional
        displayName:
          type: string
          title: display_name
          x-stainless-terraform-configurability: optional
        displayOrder:
          type: integer
          title: display_order
          format: int32
          x-stainless-terraform-configurability: optional
      title: EnumOption
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````