Update Question
update_questionEdits an EXISTING question in place: title, answer requirement (none|soft|strict), custom ID, and the option list. Options are matched by their export CODE (the numbers get_survey reports): a matching option is relabeled IN PLACE — its identity, collected answers and logic references stay intact; a new code is added as a new option; a code MISSING from the submitted list is REMOVED. Always pass the FULL desired option list — a partial list removes the options you left out. Removing options from a survey that already has responses is HIGH-CONSEQUENCE: it retroactively re-interprets collected data and cannot be undone (re-adding creates a new identity) — the call fails with a warning unless confirm:true; get the user's EXPLICIT consent first. Changing the question TYPE is not supported — delete_question and add_question instead. The reply reports the applied changes, response count and any logic rules referencing the question, verified by re-reading the stored survey. Requires the edit-survey right.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Survey publication code — the 8-character code from the survey's public link (e.g. 1a2b3c4d). Returned by list_surveys. | |
| title | No | New question text. Omit to leave unchanged. | |
| confirm | No | Required true to remove options from a survey that already has responses — only after the user explicitly agreed. | |
| options | No | The FULL desired option list, each with its code (existing codes from get_survey; a new unique code adds an option). Omit to leave options unchanged. Options left out of the list are REMOVED. | |
| customID | No | New author-defined custom ID; empty string clears it. Omit to leave unchanged. | |
| question | Yes | Variable code of the question to edit (Q1, Q2, … from get_survey, or its custom ID). | |
| requireType | No | New answer requirement. Omit to leave unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | What the call did, verified, refused or previewed — the complete human-readable outcome. | |
| preview | No | true when the call was a preview (confirm not passed): nothing was changed. |