Skip to main content
PATCH
/
forms
/
{id}
/
fields
/
{key}
Update a form field
curl --request PATCH \
  --url https://api.heffl.com/api/v2/forms/{id}/fields/{key} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "label": "<string>",
  "description": "<string>",
  "required": true,
  "placeholder": "<string>",
  "values": [
    "<string>"
  ],
  "settings": {}
}
'
{
  "formId": "<string>",
  "formTitle": "<string>",
  "fields": [
    {
      "key": "<string>",
      "label": "<string>",
      "dataType": "<string>",
      "required": true,
      "type": "<string>",
      "options": [
        {
          "label": "<string>",
          "value": "<string>"
        }
      ],
      "multiple": true
    }
  ]
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at app.heffl.com/settings/developers

Path Parameters

id
string
required

Form ID (frm_ prefix)

key
string
required

Field key (e.g. cf_full_name)

Body

application/json
label
string

New question label

description
string | null

New help text under the question

required
boolean

Whether an answer is required

placeholder
string | null

New input placeholder

values
string[]

Replacement list of allowed options. For SINGLE_OPTION / MULTIPLE_OPTION fields this must be non-empty; ignored for non-choice fields.

settings
object

Replacement config for RATING / OPINION_SCALE fields

Response

OK

formId
string
required

Form ID (frm_ prefix)

formTitle
string
required

Form title

fields
object[]
required

Ordered list of fields on the form