---
title: "Save a questionnaire or template with its sections and questions"
method: PUT
path: "/api/questionnaires/{id}/builder"
tags: ["Questionnaire"]
---

# Save a questionnaire or template with its sections and questions

`PUT /api/questionnaires/{id}/builder`

The builder's save, for a questionnaire or a template. `sections` and `questions` are the complete desired content, not a patch: rows present are created or updated, rows absent are deleted along with their answers and comments. `name`, `description` and `dueDate` are always written; `status` is not settable here and keeps its stored value. `dueDate` may be omitted or null — a template has no deadline of its own and always stores null, and on a questionnaire an omitted date clears it. The questionnaire must belong to the calling company — another company's is indistinguishable from a missing one and answers 404 — and a Retraced-owned questionnaire may only be saved by a Retraced admin. Once answer requests exist, an existing question's title, type, mandatory flag and options are frozen; adding a new question instead reopens every request so it can be answered. Moving the due date re-dates the still-open requests and notifies their answering companies. Answers the saved questionnaire in the same shape as the builder read.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string, required
  - `description` string
  - `dueDate` string, date-time
  - `sections` object[], required
    - `id` string, required
    - `name` string, required
    - `description` string
    - `sortOrder` number, required
  - `questions` object[], required
    - `id` string, required
    - `sectionId` string, required
    - `title` string, required
    - `description` string
    - `questionTypeId` string, required
    - `retracedDatapointId` string
    - `isCustom` boolean, required
    - `meta` object
    - `sortOrder` number

## Response `200`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required — True when the request succeeded.
  - `data` object, required
    - `id` string, required
    - `companyId` string
    - `name` string
    - `description` string
    - `status` string
    - `isRetraced` string
    - `isTemplate` boolean
    - `isArchived` number
    - `isActive` number
    - `templateId` string
    - `statistics` object
      - `totalApprovedResponses` number
      - `totalInReviewResponses` number
      - `totalDeniedResponses` number
      - `totalMissingResponses` number
      - `totalQuestions` number
      - `approvedResponsesPercentage` number
      - `inReviewResponsesPercentage` number
      - `deniedResponsesPercentage` number
      - `missingResponsesPercentage` number
      - `totalOpenRequests` number
      - `totalInReviewRequests` number
      - `totalCompletedRequests` number
      - `totalCompaniesInvited` number
      - `totalRequestChanges` number
    - `sections` object[], required
      - `id` string, required
      - `name` string
      - `description` string
      - `isRetraced` string
      - `sortOrder` number
    - `questions` object[], required
      - `id` string, required
      - `title` string
      - `description` string
      - `companyId` string
      - `sortOrder` number
      - `questionTypeId` string
      - `questionnaireSectionId` string
      - `retracedDatapointId` string
      - `type` string
      - `sectionId` string
      - `isCustom` boolean, required
      - `meta` object, required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response

## Changes

- **2026-08-18** `9c038d4646dc` — 3 info
  - the request property `dueDate` became optional
  - request property `dueDate` list-of-types was widened by adding types `null` to media type `application/json`
  - removed the pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$` from the request property `dueDate`
- **2026-08-15** `0a6ddb3264e6` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/retraced/apis/api-reference/changes/api/questionnaires/:id/builder/put.md)

---

[API](https://skmtc.dev/retraced/apis/api-reference.md) · [All operations](https://skmtc.dev/retraced/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/retraced/api-reference/revisions/2f11192a4402/schema)
