Update survey question

Update Survey Question

Updates a specified survey question. One or more fields or properties may be changed in a single call.

Endpoint

POST v5/survey/{survey_id}/surveyquestion/{question_id}

Requires authentication

Path Parameters

Identifies the survey and the specific question to update.

survey_id
string
required
The ID of the survey the question belongs to.
question_id
string
required
The ID of the survey question to update.

Query Parameters

title
string
The updated question text. Returns as a language-keyed object (e.g. {"English": "Your question"}).
description
string
The updated description or sub-text for the question.
shortname
string
Updated shortname or alias for the question.
varname
string
Updated SPSS variable name. For question types with multiple fields (e.g. Textbox List), specify as an array keyed by option ID — for example, varname[10001]=Comedy&varname[10002]=Drama.
properties
object
Configuration properties to update on the question. All properties keys are passed as individual query parameters using bracket notation — for example, properties[required]=true.

Response

Returns the updated question object.

result_ok
boolean
Whether the request succeeded.
data
object
The updated survey question object.

Examples

Request (cURL)
curl -X POST "https://api.alchemer.com/v5/survey/123456/surveyquestion/3?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET&title=Updated+Question+Title&properties[required]=true"
Response
{
  "result_ok": true,
  "data": {
    "id": 3,
    "base_type": "Question",
    "type": "TEXTBOX",
    "title": {
      "English": "Updated Question Title"
    },
    "shortname": "",
    "varname": [],
    "description": [],
    "has_showhide_deps": false,
    "comment": false,
    "properties": {
      "required": true,
      "hidden": false,
      "option_sort": "NONE",
      "orientation": "VERT",
      "labels_right": false,
      "question_description_above": false,
      "soft-required": false,
      "disabled": false,
      "save_logic_data": false,
      "hide_after_response": false,
      "admin_question": false,
      "custom_css": "",
      "messages": {
        "inputmask": [],
        "th_content": []
      },
      "show_rules": {
        "atom": {
          "type": "3",
          "value": "2",
          "case_sensitive": true
        },
        "operator": "20",
        "atom2": {
          "type": "2",
          "value": "",
          "case_sensitive": false
        },
        "id": "69dd6916e1960",
        "same_page_skus": []
      }
    },
    "options": [],
    "show_rules_ids": "69dd6916e1960"
  }
}