Update Questionnaire
Update a questionnaire. Versioning depends on the status field you send and the current state of the version: (1) no status on a published version → the published version is updated in place (same questionnaire_id, same version); (2) no status on a draft → the draft is updated and immediately published; (3) status: "published" on a published version → a NEW published version is created under the same questionnaire_group_id (new questionnaire_id, version + 1) and returned, and any existing draft in the group is deleted; (4) status: "draft" keeps a draft as a draft (autosave) but is rejected with 400 on a published version ("Cannot revert a published version to draft.").
PATCH for partial updates. To rename a questionnaire, send only title or description.
form_elements array. This replaces the previous question list. Keep any existing questions you still want to show.
graph, branches, next, and conditional rules.
The response includes questionnaire_id. When you update a published questionnaire, the API may create a new version. Capture the returned questionnaire_id and use it in workflows instead of assuming the id in the URL is still the latest version.Authorizations
Path Parameters
Per-version UUID of the questionnaire to update.
Body
Update questionnaire metadata or replace the full linear form_elements list.
Response
Questionnaire updated. The body is the latest state of the resulting version — the in-place updated version, or the newly created published version when you sent status: "published" on a published row (in that case questionnaire_id and version differ from the ones you patched). questionnaire_id in the response is the per-version UUID; use questionnaire_group_id if you need the stable group identifier.
Full questionnaire detail returned from GET, POST (create) and PATCH (update) endpoints.
Unique identifier of the questionnaire. Use this id when referencing the questionnaire from a workflow or in subsequent update/delete requests.
Graph structure with start_node and nodes map.
Questionnaire content grouped into sections (derived from the graph).
Stable identifier that groups all versions of the same questionnaire.
draft, published True when the questionnaire can still be edited in place (draft versions).