---
title: "Create a question-template category"
method: POST
path: "/api/admin/questionnaires/question-template-categories"
tags: ["Administration/Questionnaire Templates"]
---

# Create a question-template category

`POST /api/admin/questionnaires/question-template-categories`

## Request

- Base URL: `https://api.retraced.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.retraced.com/api/admin/questionnaires/question-template-categories`
- Auth: none declared

Creates a category of the admin question-template library from `name` and `idx` (both required) and an optional `fontIcon` and `parentId` (`""` or `null` stores none). The parent must exist: 400 `invalid_question_template_category_parent` otherwise. Responds 201 with the category in the `{ data, metadata }` envelope. Legacy created through its upsert `PUT`, which stored the row and then answered 404. Gated by the same `admin-question-templates-categories:update` permission legacy used: there is no create permission.

## Request body

- object
  - `name` string, required
  - `idx` number, required
  - `fontIcon` string, nullable
  - `parentId` string, nullable

## Response `201`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required: True when the request succeeded.
  - `data` object, required
    - `id` string, required
    - `name` string, required
    - `fontIcon` string, nullable, required
    - `parentId` string, nullable, required
    - `idx` number, nullable, required

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response

## Changes

> 108 revisions in range; 2 not diffed.

- **2026-10-16** `ad676ffaf055`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/retraced/apis/api-reference/changes/api/admin/questionnaires/question-template-categories/post.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.dev/retraced/apis/api-reference/revisions/83309c4abd20?raw)
