update_question
Update a Qualtrics survey question with safe partial updates. Modify question text, choices, answers, validation, or JavaScript without overwriting existing fields.
Instructions
Update an existing question. Performs a safe partial update: fetches the current definition and carries all fields forward, so only the fields you pass change. For Matrix questions, choices = rows and answers = columns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| answers | No | Updated answer definitions (columns/scale points for Matrix) | |
| choices | No | Updated choice definitions (rows/statements for Matrix). Extra per-choice Qualtrics fields pass through unchanged, e.g. TextEntry: "true" and TextEntrySize for an inline text box on a row | |
| surveyId | Yes | The Qualtrics survey ID | |
| questionId | Yes | The question ID to update | |
| questionJS | No | JavaScript to attach to this question (QuestionJS). IMPORTANT: Avoid literal `${` in JS strings — Qualtrics interprets it as piped text and corrupts the code. Use `\x24{` or `String.fromCharCode(36)+'{'` instead. Pass empty string "" to clear existing JS. | |
| validation | No | Updated validation settings | |
| answerOrder | No | Updated display order of answer keys (derived from answers if those change and this is omitted) | |
| choiceOrder | No | Updated display order of choice keys (derived from choices if those change and this is omitted) | |
| questionText | No | New question text | |
| recodeValues | No | Updated numeric recode mapping | |
| configuration | No | Updated Configuration object | |
| dataExportTag | No | New export tag | |
| additionalFields | No | Any other question-definition fields, merged into the payload last |