---
title: "Create a topic"
method: POST
path: "/email/topics"
tags: ["Topics"]
---

# Create a topic

`POST /email/topics`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/email/topics`
- Auth: HTTP bearer

Create a subscription topic — a category recipients can opt out of on their own (e.g. Promotions) while staying on your list. `default_opt_in` decides whether contacts with no explicit preference are treated as subscribed. Scope a campaign to a topic so opted-out contacts are skipped automatically via [Create a campaign](#post-email-campaigns), and set an individual contact's preference with [Set a contact's topic preference](#post-contacts-id-topics). Topics differ from segments: a [segment](#post-segments) decides who a campaign targets, a topic lets recipients opt out. Requires the `topics:write` capability.

## Request body

- TopicCreate
  - `name` string, required
  - `description` string
  - `default_opt_in` boolean

## Response `201`

Created.

- Topic
  - `object` 'topic', required
  - `id` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `channel` 'email' | 'sms', required: Which channel the topic belongs to. Email topics are managed under `/email/topics`, SMS topics under `/sms/topics`.
  - `default_opt_in` boolean, required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `401`: Missing or invalid API key.
- `409`: A topic with that name already exists.
- `422`: Validation error.

---

[API](https://skmtc.dev/unitpost/apis/unitpost-api.md) · [All operations](https://skmtc.dev/unitpost/apis/unitpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unitpost/apis/unitpost-api/revisions/86ff7c890967?raw)
