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

# Create Topic

`POST /v1/topics`

Create a new topic. Requires API key with audience:write.

## Request body

- CreateTopicRequest
  - `name` string, required
  - `description` string
  - `defaultSubscription` 'opt_in' | 'opt_out' — Cannot be changed after creation. opt_out means all contacts are subscribed by default.
  - `visibility` 'public' | 'private'
  - `displayOrder` integer
  - `projectId` string, required

## Response `200`

Topic created

- ApiResponseTopic
  - `success` boolean, required
  - `data` object, nullable
    - `id` string
    - `name` string
    - `description` string
    - `defaultSubscription` 'opt_in' | 'opt_out'
    - `visibility` 'public' | 'private'
    - `displayOrder` integer
    - `isActive` boolean
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
  - `error` string, nullable

## Other responses

- `400` — Bad request
- `401` — Unauthorized

---

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