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

# Create Entity Ingestion Config

> Create an entity ingestion config that links a workflow to an entity type for periodic data synchronization.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/entity-ingestion-configs
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-ingestion-configs:
    post:
      tags:
        - Entity Ingestion Config API
      summary: Create Entity Ingestion Config
      description: >-
        Create an entity ingestion config that links a workflow to an entity
        type for periodic data synchronization.
      operationId: svrelay.publicv2.PublicAPIServiceV2.CreateEntityIngestionConfig
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/svstore.publicapi.CreateEntityIngestionConfigRequest
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svstore.publicapi.CreateEntityIngestionConfigResponse
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
      security:
        - BearerAuth: []
components:
  schemas:
    svstore.publicapi.CreateEntityIngestionConfigRequest:
      type: object
      properties:
        teamId:
          type: string
          title: team_id
          description: The ID of the team.
          x-stainless-terraform-configurability: optional
        appInstanceId:
          type: string
          title: app_instance_id
          description: The ID of the app instance (e.g., a ServiceNow connection).
          x-stainless-terraform-configurability: optional
        workflowId:
          type: string
          title: workflow_id
          description: The ID of the workflow that performs the entity sync.
          x-stainless-terraform-configurability: optional
        enabled:
          type: boolean
          title: enabled
          description: Whether the ingestion config is enabled. Defaults to true.
          nullable: true
          x-stainless-terraform-configurability: computed_optional
        syncDeletions:
          type: boolean
          title: sync_deletions
          description: Whether to sync deletions. Defaults to false.
          nullable: true
          x-stainless-terraform-configurability: computed_optional
        internalEntityTypeId:
          type: string
          title: internal_entity_type_id
          description: The entity type ID that this ingestion populates.
          x-stainless-terraform-configurability: optional
        initialFieldMappings:
          type: array
          items:
            $ref: '#/components/schemas/svstore.publicapi.InitialFieldMapping'
          title: initial_field_mappings
          description: >-
            Optional initial field mappings to create alongside the ingestion
            config.
             When provided, field mappings are created automatically so data flows
             from external fields into entity type fields without requiring separate
             inference or manual configuration.
          x-stainless-terraform-configurability: optional
        syncIntervalSeconds:
          type:
            - integer
            - string
          title: sync_interval_seconds
          format: int64
          description: >-
            Minimum interval between scheduled syncs, in seconds. Unset means
            "auto"
             (platform default cadence).
          nullable: true
          x-stainless-terraform-configurability: optional
      title: CreateEntityIngestionConfigRequest
      additionalProperties: false
    svstore.publicapi.CreateEntityIngestionConfigResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svstore.IngestionConfig'
          title: data
          description: The created ingestion config.
          x-stainless-terraform-configurability: optional
      title: CreateEntityIngestionConfigResponse
      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.publicapi.InitialFieldMapping:
      type: object
      properties:
        internalFieldId:
          type: string
          title: internal_field_id
          description: The ID of the internal entity type field to map to.
          x-stainless-terraform-configurability: optional
        externalFieldPath:
          type: string
          title: external_field_path
          description: >-
            The path in the external data to extract the value from (e.g.,
            "active", "type").
          x-stainless-terraform-configurability: optional
      title: InitialFieldMapping
      additionalProperties: false
    svstore.IngestionConfig:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        appInstanceId:
          type: string
          title: app_instance_id
          x-stainless-terraform-configurability: optional
        workflowId:
          type: string
          title: workflow_id
          x-stainless-terraform-configurability: optional
        enabled:
          type: boolean
          title: enabled
          x-stainless-terraform-configurability: computed_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
        teamId:
          type: string
          title: team_id
          x-stainless-terraform-configurability: optional
        serviceName:
          type: string
          title: service_name
          nullable: true
          x-stainless-terraform-configurability: optional
        workflowName:
          type: string
          title: workflow_name
          nullable: true
          x-stainless-terraform-configurability: optional
        isWorkflowPublished:
          type: boolean
          title: is_workflow_published
          description: Whether the linked workflow has been published/deployed.
          x-stainless-terraform-configurability: computed_optional
        hasIngestionContext:
          type: boolean
          title: has_ingestion_context
          description: Whether the linked workflow references context.CurrentIngestion.
          x-stainless-terraform-configurability: computed_optional
        syncDeletions:
          type: boolean
          title: sync_deletions
          x-stainless-terraform-configurability: computed_optional
        internalEntityTypeId:
          type: string
          title: internal_entity_type_id
          x-stainless-terraform-configurability: optional
        syncIntervalSeconds:
          type:
            - integer
            - string
          title: sync_interval_seconds
          format: int64
          description: >-
            Customer-configured minimum interval between scheduled syncs, in
            seconds.
             Unset means "auto": the platform default cadence and full/delta
             heuristics apply.
          nullable: true
          x-stainless-terraform-configurability: optional
      title: IngestionConfig
      additionalProperties: false
      description: Entity ingestion configuration for ETL extraction workflows
    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").
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````