---
title: "Save a questionnaire template as the Retraced admin"
method: PUT
path: "/api/admin/questionnaires/templates/{id}"
tags: ["Administration/Questionnaire Templates"]
---

# Save a questionnaire template as the Retraced admin

`PUT /api/admin/questionnaires/templates/{id}`

The save behind the Retraced-admin template builder. The admin twin of `PUT /api/questionnaires/:id/builder` — same write, same service — but gated on `admin:questionnaire:write`, which only `RETRACED_ADMIN` holds. `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` and `description` are always written; `status` is not settable here and keeps its stored value. A template stores no deadline of its own, so `dueDate` is always written as null — send it as null or omit 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, which this guard already guarantees. `templates` names the surface, not a filter: no `is_template` predicate is applied, so any questionnaire the caller company owns can be saved here. 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. Answers the saved questionnaire in the same shape as the template 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

---

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