---
title: "Create Topic"
method: POST
path: "/api/v1/topics"
tags: ["Basics"]
---

# Create Topic

`POST /api/v1/topics`

Creates a topic on a website. Topics group prompts for aggregate reporting; pass the returned `id` as `prompts[].topic_id` when creating prompts. Get-or-create by name: if an active topic with the same name already exists, the existing topic is returned with `created: false` instead of failing, so retries and re-imports are idempotent.

## Request body

- object
  - `website_id` string, uuid, required
  - `name` string, required — Topic name. Trimmed; blank rejected.
  - `description` string, nullable — Optional topic description.

## Response `201`

Topic created (or existing topic returned when the name was already taken)

- object
  - `id` string, uuid, required
  - `name` string, required
  - `description` string, nullable, required
  - `created` boolean, required — False when an existing active topic with the same name was returned instead of creating a new one.

## Other responses

- `400` — Bad request - Validation error
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - You don't have access to this website
- `500` — Internal server error

---

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