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

# Update a form field

> Updates a question on a form, identified by its field `key`. Only provided properties are changed. For choice fields, `values` replaces the full list of allowed options. A field's data type cannot be changed — delete the field and add a new one to change its type.



## OpenAPI

````yaml /openapi.v2.json patch /forms/{id}/fields/{key}
openapi: 3.1.1
info:
  title: Heffl API v2 (Beta)
  version: 2.0.0
  description: >-
    Heffl REST API v2 (beta) — resource-oriented endpoints with consistent
    response envelopes. Endpoints, schemas, and behavior may change until GA.
    See Agent workflows and ID prefixes guides for automation.
  contact:
    name: Heffl Support
    url: https://heffl.com/support
    email: support@heffl.com
servers:
  - url: https://api.heffl.com/api/v2
    description: Production API Server
security:
  - ApiKeyAuth: []
paths:
  /forms/{id}/fields/{key}:
    patch:
      tags:
        - Objects
      summary: Update a form field
      description: >-
        Updates a question on a form, identified by its field `key`. Only
        provided properties are changed. For choice fields, `values` replaces
        the full list of allowed options. A field's data type cannot be changed
        — delete the field and add a new one to change its type.
      operationId: objects.forms.updateField
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Form ID (frm_ prefix)
        - name: key
          in: path
          required: true
          schema:
            type: string
          description: Field key (e.g. cf_full_name)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FormFieldUpdateInput'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormFields'
        '400':
          description: Validation error or bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '403':
          description: Insufficient permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ApiError'
components:
  schemas:
    FormFieldUpdateInput:
      type: object
      properties:
        label:
          type: string
          description: New question label
        description:
          type:
            - string
            - 'null'
          description: New help text under the question
        required:
          type: boolean
          description: Whether an answer is required
        placeholder:
          type:
            - string
            - 'null'
          description: New input placeholder
        values:
          type: array
          items:
            type: string
          description: >-
            Replacement list of allowed options. For SINGLE_OPTION /
            MULTIPLE_OPTION fields this must be non-empty; ignored for
            non-choice fields.
        settings:
          type: object
          additionalProperties: true
          description: Replacement config for RATING / OPINION_SCALE fields
    FormFields:
      type: object
      properties:
        formId:
          type: string
          description: Form ID (frm_ prefix)
        formTitle:
          type: string
          description: Form title
        fields:
          type: array
          items:
            $ref: '#/components/schemas/FormField'
          description: Ordered list of fields on the form
      required:
        - formId
        - formTitle
        - fields
    V2ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
    FormField:
      type: object
      properties:
        key:
          type: string
          description: >-
            Stable field identifier. Use this as the key inside a submission
            `data` object when answering, and as the `key` when updating or
            deleting the field (e.g. cf_full_name).
        label:
          type: string
          description: Question label shown to respondents
        dataType:
          type: string
          description: >-
            Field data type, e.g. TEXT, LONG_TEXT, EMAIL, MOBILE, NUMBER, DATE,
            SINGLE_OPTION, MULTIPLE_OPTION, FILE_PICKER, SIGNATURE, CURRENCY,
            LINK, RATING, OPINION_SCALE.
        required:
          type: boolean
          description: Whether an answer is required for this field
        type:
          type: string
          description: >-
            Item kind: 'custom' for answerable questions, 'system' for built-in
            fields.
        options:
          type: array
          items:
            $ref: '#/components/schemas/FormFieldOption'
          description: >-
            Allowed options. Populated for SINGLE_OPTION / MULTIPLE_OPTION
            fields; empty otherwise.
        multiple:
          type: boolean
          description: Whether multiple options can be selected (true for MULTIPLE_OPTION).
      required:
        - key
        - label
        - dataType
        - required
        - type
        - options
        - multiple
    FormFieldOption:
      type: object
      properties:
        label:
          type: string
          description: Display label for the option
        value:
          type: string
          description: Value submitted when chosen
      required:
        - label
        - value
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        app.heffl.com/settings/developers

````