---
title: "Create a topic; the slug is generated from the name and immutable"
method: POST
path: "/api/admin/topics"
tags: ["admin"]
---

# Create a topic; the slug is generated from the name and immutable

`POST /api/admin/topics`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- CreateTopicRequest: `slug` is generated from the name at creation and immutable after — it appears in shareable URLs (`/articles?topic_slug=…`).
  - `name` string, required

## Response `200`

Topic created

- TopicAdminResponse: Topic row for the admin panel: public fields plus how many articles currently carry the topic (delete is refused while non-zero).
  - `article_count` integer, required
  - `id` string, required
  - `name` string, required
  - `slug` string, required

## Other responses

- `400`: Invalid or duplicate name
- `403`: Insufficient permissions

## Changes

- **2026-07-31** `d445f2d2c6c1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scholia-study/apis/scholia-api/changes/api/admin/topics/post.md)

---

[API](https://skmtc.dev/scholia-study/apis/scholia-api.md) - [All operations](https://skmtc.dev/scholia-study/apis/scholia-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scholia-study/apis/scholia-api/revisions/684b3751bfd3?raw)
