> ## 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 Custom Field Option

> Create a custom field definition on a team's ticket type. Each ticket type has its own field schema, so a field created on REQUEST does not exist on JOURNEY. ENUM and MULTI_SELECT fields require enum_options; every other data type rejects them. Use this before setting values on tickets when the field does not exist yet.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/teams/{team_id}/custom-field-options
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: Forms 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 Group 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/teams/{team_id}/custom-field-options:
    post:
      tags:
        - Custom Field API
      summary: Create Custom Field Option
      description: >-
        Create a custom field definition on a team's ticket type. Each ticket
        type has its own field schema, so a field created on REQUEST does not
        exist on JOURNEY. ENUM and MULTI_SELECT fields require enum_options;
        every other data type rejects them. Use this before setting values on
        tickets when the field does not exist yet.
      operationId: svrelay.publicv2.PublicAPIServiceV2.CreateCustomFieldOption
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            title: team_id
            description: The ID of the team to create the custom field definition on.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ticketType:
                  $ref: '#/components/schemas/svhelp.models.TicketType'
                  title: ticket_type
                  description: >-
                    The ticket type the field belongs to. Each ticket type
                    carries its own
                     field schema — a field created on REQUEST does not exist on JOURNEY.
                ticketSubtype:
                  type:
                    - string
                    - 'null'
                  title: ticket_subtype
                  description: >-
                    Required for CHANGE tickets — each subtype (normal,
                    standard,
                     emergency, custom) has its own field schema. Omit for non-change types.
                fieldName:
                  type: string
                  title: field_name
                  description: >-
                    Display name of the field, e.g. "System". Must be unique
                    within the
                     ticket type's schema.
                dataType:
                  $ref: '#/components/schemas/svstore.EntityTypeField.DataType'
                  title: data_type
                enumOptions:
                  type: array
                  items:
                    $ref: '#/components/schemas/svstore.EnumOptionInput'
                  title: enum_options
                  description: >-
                    Required for ENUM and MULTI_SELECT, rejected for every other
                    data type.
                     Each option must set both value and display_name.
                sectionName:
                  type: string
                  title: section_name
                  description: >-
                    Group the field under a named section, creating the section
                    on first
                     reference. Omit to leave the field unsectioned (the Overview tab).
                hidden:
                  type: boolean
                  title: hidden
                  description: >-
                    Create the field default-hidden: excluded from ticket-view
                    field groups
                     and list-view columns/filters, but still readable and writable.
              title: CreateCustomFieldOptionRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svhelp.publicapi.CreateCustomFieldOptionResponse
      security:
        - BearerAuth: []
components:
  schemas:
    svhelp.models.TicketType:
      type: string
      title: TicketType
      enum:
        - TICKET_TYPE_UNSPECIFIED
        - TICKET_TYPE_REQUEST
        - TICKET_TYPE_TASK
        - TICKET_TYPE_MAJOR_INCIDENT
        - TICKET_TYPE_CONVERSATION
        - TICKET_TYPE_JOURNEY
        - TICKET_TYPE_INCIDENT
        - TICKET_TYPE_CHANGE
        - TICKET_TYPE_CUSTOM
        - TICKET_TYPE_PROBLEM
    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.EnumOptionInput:
      type: object
      properties:
        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: EnumOptionInput
      additionalProperties: false
      description: Input for creating an enum option.
    svhelp.publicapi.CreateCustomFieldOptionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svhelp.models.CustomFieldValue'
          title: data
          description: |-
            The created definition, shaped like the items ListCustomFieldOptions
             returns: `field` populated, `field_value` empty.
          x-stainless-terraform-configurability: optional
      title: CreateCustomFieldOptionResponse
      additionalProperties: false
    svhelp.models.CustomFieldValue:
      type: object
      properties:
        fieldValue:
          $ref: '#/components/schemas/svstore.EntityFieldValue'
          title: field_value
          x-stainless-terraform-configurability: optional
        field:
          $ref: '#/components/schemas/svstore.EntityTypeField'
          title: field
          x-stainless-terraform-configurability: optional
        hidden:
          type: boolean
          title: hidden
          description: |-
            Default-hidden: the field is excluded from ticket-view field groups
             and list-view columns/filters, but remains fully readable/writable
             (settings surfaces and workflow run contexts still see it). Managed
             svhelp-side (hidden_custom_fields), like deprecation.
          x-stainless-terraform-configurability: computed_optional
      title: CustomFieldValue
      additionalProperties: false
    svstore.EntityFieldValue:
      type: object
      properties:
        id:
          type: string
          title: id
          description: >-
            The EAV row id. NOT populated on entity read paths
            (Entity.field_values:
             search / list / get / create / update) since the v4 slim document_json
             dropped it — it has no consumer there. It IS populated on the
             listEntityFieldValueHistory RPC, which reads EAV rows directly.
          x-stainless-terraform-configurability: optional
        entityId:
          type: string
          title: entity_id
          x-stainless-terraform-configurability: optional
        fieldId:
          type: string
          title: field_id
          x-stainless-terraform-configurability: optional
        fieldKey:
          type: string
          title: field_key
          x-stainless-terraform-configurability: optional
        fieldName:
          type: string
          title: field_name
          x-stainless-terraform-configurability: optional
        dataType:
          $ref: '#/components/schemas/svstore.EntityTypeField.DataType'
          title: data_type
          x-stainless-terraform-configurability: optional
        value:
          $ref: '#/components/schemas/google.protobuf.Value'
          title: value
          description: |-
            The field value as a JSON-compatible value. Type interpretation is
             determined by data_type:
               TEXT, UNIQUE, ENUM, ENTITY_REF, USER_REF → string
               NUMBER → number
               BOOL → bool
               TIMESTAMP → string (ISO 8601, e.g. "2024-03-15T10:30:00Z")
               MULTI_SELECT → list of strings (enum option IDs)
          x-stainless-terraform-configurability: optional
        setByUserId:
          type:
            - string
            - 'null'
          title: set_by_user_id
          description: |-
            Attribution: who/what set this field value. Stored in the slim
             document_json and populated on ALL entity read paths (search / list / get
             / create / update) as well as field-value history.
          x-stainless-terraform-configurability: optional
        setByAppInstanceId:
          type:
            - string
            - 'null'
          title: set_by_app_instance_id
          x-stainless-terraform-configurability: optional
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          description: >-
            Temporal context. NOT populated on entity read paths
            (Entity.field_values)
             since the v4 slim document_json dropped created_at — it has no consumer
             there. It IS populated on the listEntityFieldValueHistory RPC. The current
             value for a field has deleted_at unset.
          x-stainless-terraform-configurability: optional
        deletedAt:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
            - type: 'null'
          title: deleted_at
          x-stainless-terraform-configurability: optional
        pinned:
          type: boolean
          title: pinned
          description: >-
            When true, ingestion cannot overwrite this user-set value. Stored in
            the
             slim document_json and populated on ALL entity read paths.
          x-stainless-terraform-configurability: computed_optional
      title: EntityFieldValue
      additionalProperties: false
      description: |-
        EntityFieldValue represents a concrete field value on a specific entity.
         Used for both current values (on Entity.field_values) and historical values
         (in field value history responses).
    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
        fieldId:
          type: string
          title: field_id
          description: >-
            The field definition this binding references (entity_fields id). A
            field
             and its inherited copies across a type hierarchy share one definition;
             definition-scoped references (scan scope rules) use this id, not `id`.
          x-stainless-terraform-configurability: optional
        refEntityTypeId:
          type:
            - string
            - 'null'
          title: ref_entity_type_id
          description: >-
            For ENTITY_REF fields: the entity type ID that this field
            references.
          x-stainless-terraform-configurability: optional
        description:
          type:
            - string
            - 'null'
          title: description
          x-stainless-terraform-configurability: optional
        sourceEntityTypeId:
          type:
            - string
            - 'null'
          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.
          x-stainless-terraform-configurability: optional
        sectionId:
          type:
            - string
            - 'null'
          title: section_id
          description: >-
            Visual grouping for the entity detail UI. Unset means the field
            renders
             in the implicit "Overview" tab.
          x-stainless-terraform-configurability: optional
        displayOptions:
          oneOf:
            - $ref: '#/components/schemas/svstore.FieldDisplayOptions'
            - type: 'null'
          title: display_options
          description: How values render. Unset means the data type's default presentation.
          x-stainless-terraform-configurability: optional
      title: EntityTypeField
      additionalProperties: false
    google.protobuf.Value:
      oneOf:
        - type: 'null'
        - type: number
        - type: string
        - type: boolean
        - type: array
        - type: object
          additionalProperties: true
      description: |-
        `Value` represents a dynamically typed value which can be either
         null, a number, a string, a boolean, a recursive struct value, or a
         list of values. A producer of value is expected to set one of these
         variants. Absence of any variant indicates an error.

         The JSON representation for `Value` is JSON value.
    google.protobuf.Timestamp:
      type: string
      examples:
        - '2025-01-15T01:30:15.000Z'
        - '2025-06-01T00:00:00.000Z'
      format: date-time
      description: A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    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
    svstore.FieldDisplayOptions:
      type: object
      oneOf:
        - $ref: '#/components/schemas/svstore.FieldDisplayOptions.Boolean'
        - $ref: '#/components/schemas/svstore.FieldDisplayOptions.Number'
        - $ref: '#/components/schemas/svstore.FieldDisplayOptions.Text'
        - $ref: '#/components/schemas/svstore.FieldDisplayOptions.Timestamp'
      title: FieldDisplayOptions
      description: >-
        FieldDisplayOptions is presentation config: it changes how a stored
        value is
         rendered, never what is stored. The set variant must match the field's data
         type — a NUMBER field carrying `timestamp` options is rejected at write time
         rather than silently ignored.

         Like data_type and is_scannable, this belongs to the field CONCEPT, so it is
         held identical across a field group (a field plus its inherited copies).
    svstore.FieldDisplayOptions.Boolean:
      type: object
      title: Boolean
      properties:
        boolean:
          $ref: '#/components/schemas/svstore.BoolDisplayOptions'
          title: boolean
          x-stainless-terraform-configurability: optional
      required:
        - boolean
      additionalProperties: false
    svstore.FieldDisplayOptions.Number:
      type: object
      title: Number
      properties:
        number:
          $ref: '#/components/schemas/svstore.NumberDisplayOptions'
          title: number
          x-stainless-terraform-configurability: optional
      required:
        - number
      additionalProperties: false
    svstore.FieldDisplayOptions.Text:
      type: object
      title: Text
      properties:
        text:
          $ref: '#/components/schemas/svstore.TextDisplayOptions'
          title: text
          x-stainless-terraform-configurability: optional
      required:
        - text
      additionalProperties: false
    svstore.FieldDisplayOptions.Timestamp:
      type: object
      title: Timestamp
      properties:
        timestamp:
          $ref: '#/components/schemas/svstore.TimestampDisplayOptions'
          title: timestamp
          x-stainless-terraform-configurability: optional
      required:
        - timestamp
      additionalProperties: false
    svstore.BoolDisplayOptions:
      type: object
      properties:
        style:
          $ref: '#/components/schemas/svstore.BoolDisplayOptions.Style'
          title: style
          x-stainless-terraform-configurability: optional
      title: BoolDisplayOptions
      additionalProperties: false
    svstore.NumberDisplayOptions:
      type: object
      properties:
        style:
          $ref: '#/components/schemas/svstore.NumberDisplayOptions.Style'
          title: style
          x-stainless-terraform-configurability: optional
        currencyCode:
          type:
            - string
            - 'null'
          title: currency_code
          description: ISO 4217 code ("USD", "EUR"). Required when style is CURRENCY.
          x-stainless-terraform-configurability: optional
        decimalPlaces:
          type:
            - integer
            - 'null'
          title: decimal_places
          format: int32
          description: |-
            Fixed digits after the decimal point. Unset renders the value's own
             precision, except CURRENCY which falls back to the code's minor unit.
          x-stainless-terraform-configurability: optional
        thousandsSeparator:
          type:
            - boolean
            - 'null'
          title: thousands_separator
          description: >-
            Unset means the default, which is grouping ON. Explicit presence
            rather
             than a plain bool: a plain bool reads as false when omitted, so a config
             written without the flag would silently drop grouping.
          x-stainless-terraform-configurability: optional
        prefix:
          type:
            - string
            - 'null'
          title: prefix
          description: |-
            Wrap the formatted number, for units the number itself can't carry
             ("GB", "seats", "/mo").
          x-stainless-terraform-configurability: optional
        suffix:
          type:
            - string
            - 'null'
          title: suffix
          x-stainless-terraform-configurability: optional
      title: NumberDisplayOptions
      additionalProperties: false
    svstore.TextDisplayOptions:
      type: object
      properties:
        autolink:
          type: boolean
          title: autolink
          description: Render bare URLs and email addresses as links.
          x-stainless-terraform-configurability: computed_optional
        monospace:
          type: boolean
          title: monospace
          description: Render in the monospace face, for IDs / serials / hashes.
          x-stainless-terraform-configurability: computed_optional
      title: TextDisplayOptions
      additionalProperties: false
    svstore.TimestampDisplayOptions:
      type: object
      properties:
        dateStyle:
          $ref: '#/components/schemas/svstore.TimestampDisplayOptions.DateStyle'
          title: date_style
          x-stainless-terraform-configurability: optional
        timeStyle:
          $ref: '#/components/schemas/svstore.TimestampDisplayOptions.TimeStyle'
          title: time_style
          description: >-
            Ignored when date_style is RELATIVE, which has no separate time
            part.
          x-stainless-terraform-configurability: optional
        timeZone:
          type:
            - string
            - 'null'
          title: time_zone
          description: >-
            IANA zone ("America/New_York"). Unset renders in the viewer's own
            zone.
             Pin it for fields whose values are only meaningful in one place, such as
             a warehouse's receiving timestamps.
          x-stainless-terraform-configurability: optional
      title: TimestampDisplayOptions
      additionalProperties: false
    svstore.BoolDisplayOptions.Style:
      type: string
      title: Style
      enum:
        - STYLE_UNSPECIFIED
        - TRUE_FALSE
        - YES_NO
        - CHECKBOX
    svstore.NumberDisplayOptions.Style:
      type: string
      title: Style
      enum:
        - STYLE_UNSPECIFIED
        - PLAIN
        - CURRENCY
        - PERCENT
    svstore.TimestampDisplayOptions.DateStyle:
      type: string
      title: DateStyle
      enum:
        - DATE_STYLE_UNSPECIFIED
        - NUMERIC_YMD
        - NUMERIC_MDY
        - NUMERIC_DMY
        - LOCALE_MEDIUM
        - LOCALE_LONG
        - RELATIVE
      description: |-
        NUMERIC_* orders are deliberately locale-independent: an operator who
         picks D/M/Y wants D/M/Y regardless of who is looking. LOCALE_* defer to
         the viewer's locale instead.
    svstore.TimestampDisplayOptions.TimeStyle:
      type: string
      title: TimeStyle
      enum:
        - TIME_STYLE_UNSPECIFIED
        - NONE
        - HOUR_MINUTE
        - HOUR_MINUTE_SECOND
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````