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

# Update ticket field

> Updates a custom ticket field.

<Info>Replace `{your-subdomain}` with your workspace's subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml bundled/fields.yaml PATCH /fields/{field_id}
openapi: 3.0.3
info:
  title: NeetoDesk Ticket Fields APIs
  version: 2.0.0
servers:
  - description: NeetoDesk APIs
    url: https://{your-subdomain}.neetodesk.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Ticket Fields
    description: APIs to manage custom ticket fields in the workspace.
paths:
  /fields/{field_id}:
    patch:
      tags:
        - Ticket Fields
      summary: Update a ticket field
      description: Updates a custom ticket field.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/field_id_param'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                field:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Name of the field. It must be unique in the workspace.
                      example: Browser used
                    state:
                      type: string
                      description: >-
                        State of the field. A field must be made `inactive`
                        before it can be deleted.
                      enum:
                        - active
                        - inactive
                      example: inactive
                    data:
                      type: array
                      description: >-
                        Options to add or rename. Applies only to
                        `single_option` and `multi_option` fields. Pass an
                        object with a `label` to add an option, or an object
                        with an `id` and a `label` to rename an existing option.
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: >-
                              ID of an existing option. Omit it to add a new
                              option. You can get option IDs by listing or
                              retrieving a ticket field using the [List all
                              ticket fields](/api-reference/fields/list) or [Get
                              ticket field](/api-reference/fields/get) API.
                            example: aaaabbbb-cccc-dddd-eeee-ffff00004444
                          label:
                            type: string
                            description: Label of the option. It cannot be blank.
                            example: Chromium
                        required:
                          - label
                    remove_option_ids:
                      type: array
                      description: >-
                        IDs of the options to remove. Applies only to
                        `single_option` and `multi_option` fields. The last
                        option of a field cannot be removed.
                      items:
                        type: string
                      example:
                        - aaaabbbb-cccc-dddd-eeee-ffff00005555
                    is_required:
                      type: boolean
                      description: >-
                        Set to `true` to make the field mandatory for customers
                        while submitting a ticket.
                      example: false
                    is_required_for_agent_when_submitting_form:
                      type: boolean
                      description: >-
                        Set to `true` to make the field mandatory for agents
                        while creating a ticket.
                      example: false
                    is_required_for_agent_when_closing_ticket:
                      type: boolean
                      description: >-
                        Set to `true` to make the field mandatory for agents
                        before they close a ticket.
                      example: false
                    display_order:
                      type: integer
                      description: Position of the field in the list of ticket fields.
                      example: 3
                    placeholder_slug:
                      type: string
                      description: >-
                        Slug used to refer to the field in placeholders and
                        automations. Renaming a field does not change its slug,
                        so existing placeholders keep working. Send this
                        attribute only to change the slug deliberately, and
                        update every automation and placeholder that refers to
                        the old value.
                      example: browser
              required:
                - field
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  field:
                    $ref: '#/components/schemas/field'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    field_id_param:
      in: path
      name: field_id
      description: >-
        ID of the ticket field. You can get this by listing all ticket fields
        using the [List all ticket fields](/api-reference/fields/list) API.
      required: true
      schema:
        type: string
        example: aaaabbbb-cccc-dddd-eeee-ffff00003333
  schemas:
    field:
      type: object
      properties:
        id:
          type: string
          example: aaaabbbb-cccc-dddd-eeee-ffff00003333
        name:
          type: string
          example: Browser
        kind:
          type: string
          description: Type of the field. It cannot be changed after the field is created.
          enum:
            - text
            - textarea
            - integer
            - decimal
            - date
            - checkbox
            - single_option
            - multi_option
          example: single_option
        state:
          type: string
          description: Fields in the `inactive` state are hidden from agents and customers.
          enum:
            - active
            - inactive
          example: active
        resource_type:
          type: string
          description: Resource the field belongs to. Always `ticket`.
          example: ticket
        is_required:
          type: boolean
          description: Whether customers must fill this field while submitting a ticket.
          example: false
        is_required_for_agent_when_submitting_form:
          type: boolean
          description: Whether agents must fill this field while creating a ticket.
          example: false
        is_required_for_agent_when_closing_ticket:
          type: boolean
          description: Whether agents must fill this field before closing a ticket.
          example: false
        display_order:
          type: integer
          description: Position of the field in the list of ticket fields.
          example: 3
        placeholder_slug:
          type: string
          nullable: true
          description: >-
            Slug used to refer to the field in placeholders and automations, as
            `{{ticket.custom_fields.<placeholder_slug>}}`. Generated from the
            name when the field is created, and not regenerated when the field
            is renamed.
          example: browser
        created_at:
          $ref: '#/components/schemas/date_time_field'
        updated_at:
          $ref: '#/components/schemas/date_time_field'
        options:
          type: array
          description: >-
            Available options of the field. Returned only for `single_option`
            and `multi_option` fields.
          items:
            $ref: '#/components/schemas/field_option'
    date_time_field:
      type: string
      format: date-time
    field_option:
      type: object
      properties:
        id:
          type: string
          example: aaaabbbb-cccc-dddd-eeee-ffff00004444
        label:
          type: string
          example: Chrome
        display_order:
          type: integer
          example: 0

````