Skip to main content
PATCH
/
forms
/
{id}
/
fields
/
{fieldId}
Update Field
curl --request PATCH \
  --url https://geniusforms.ai/api/v1/forms/{id}/fields/{fieldId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "question": "<string>",
  "required": true,
  "options": [
    "<string>"
  ]
}
'
{
  "id": 1,
  "order": 1,
  "type": "text",
  "question": "Your name",
  "required": true,
  "options": [
    "Option A",
    "Option B"
  ],
  "conditionalLogic": {
    "showIf": {
      "questionId": 123,
      "operator": "equals",
      "value": "<string>"
    },
    "advanced": {
      "conditionGroups": [
        {
          "id": "<string>",
          "operator": "AND",
          "conditions": [
            {
              "id": "<string>",
              "questionId": 123,
              "operator": "equals",
              "value": "<string>",
              "valueType": "static"
            }
          ]
        }
      ],
      "actions": [
        {
          "type": "show_question",
          "targetId": 123,
          "value": "<unknown>"
        }
      ],
      "scoreRules": [
        {
          "id": "<string>",
          "questionId": 123,
          "scoreMap": {}
        }
      ]
    }
  }
}

Authorizations

X-API-Key
string
header
required

API key obtained from your GeniusForms dashboard

Path Parameters

id
integer
required

Form ID

fieldId
integer
required

Field ID

Body

application/json
question
string
required
boolean
options
string[]

Response

200 - application/json

Field updated

id
integer
Example:

1

order
integer
Example:

1

type
enum<string>
Available options:
text,
textarea,
email,
number,
phone,
url,
date,
time,
select,
multi_select,
rating,
slider,
yes_no,
file_upload,
currency
Example:

"text"

question
string
Example:

"Your name"

required
boolean
Example:

true

options
string[] | null
Example:
["Option A", "Option B"]
conditionalLogic
object

Conditional logic for showing/hiding questions