Update question

Change a question's label, type, options or whether it is required.

PATCH https://cotlet.dev/api/v1/fillout/forms/{form_id}/questions/{question_id}

write

Changes one question of a form and returns it as it is now. Only the fields you pass are changed. The change reaches respondents only after publish_form. Changing the type of a question that already has answers can hide them in Results, so check get_form and list_submissions first. This call is undone by the editor's edit history, so it runs without asking first.

Parameters

Parameters: update_question
NameTypeDescription
form_id string required string Form ID from list_forms.
question_id string required string Question ID from get_form.
label string string New question text.
type enum enum New field type: Address, AudioRecording, Calcom, Calendly, Captcha, Checkbox, Checkboxes, ColorPicker, CurrencyInput, DatePicker, DateRange, DateTimePicker, Dropdown, EmailInput, FileUpload, ImagePicker, LocationCoordinates, LongAnswer, Matrix, MultiSelect, MultipleChoice, NumberInput, OpinionScale, Password, Payment, PhoneNumber, Ranking, RecordPicker, ShortAnswer, Signature, Slider, StarRating, Subform, SubmissionPicker, Switch, Table, TimePicker or URLInput.
options array array Replaces the answer options.
required boolean boolean Make the question required or optional.

Request

cURL
curl -X PATCH https://cotlet.dev/api/v1/fillout/forms/form_8c41d2/questions/question_8c41d2 \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("fillout", "update_question", {"form_id":"form_8c41d2","question_id":"question_8c41d2"})
Node.js
const result = await cotlet.call('fillout', 'update_question', {"form_id":"form_8c41d2","question_id":"question_8c41d2"});
CLI
cotlet call fillout update_question --data '{"form_id":"form_8c41d2","question_id":"question_8c41d2"}'

Example response

JSON

{
  "form_id": "fpj3Kd9xQw2L",
  "question": {
    "id": "q_company_size",
    "name": "Company size",
    "type": "Dropdown",
    "required": true
  }
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.