# Create topic

`POST /v1/topics`

Makes a kind of mail readers can say yes or no to, such as product news. A broadcast sent on a topic only reaches the contacts who get that topic.

Needs the scope: `audiences:write`

## Body parameters

- `name` (string, required): A name for the topic, such as `Product news`. Up to 120 characters.
- `description` (string): A line about what the topic is, shown to readers. Up to 300 characters.
- `defaultSubscription` (string): `opt_in` when contacts get the topic unless they say no, `opt_out` when they only get it after they say yes. Without it, `opt_in`. It cannot be changed later. One of: `opt_in`, `opt_out`.
- `visibility` (string): `public` or `private`. Without it, `public`. One of: `public`, `private`.

## Returns

- `object` ("topic"): Always `topic`.
- `id` (string): The id of the topic.
- `name` (string): The name of the topic, as readers see it.
- `description` (string): What the topic is about, as readers see it. Empty when not set.
- `defaultSubscription` (string): What holds for a contact who never chose: `opt_in`, they get it, or `opt_out`, they do not. One of: `opt_in`, `opt_out`.
- `visibility` (string): `public` when every reader sees the topic on the page where they manage their mail, `private` when only those who chose it do. One of: `public`, `private`.
- `subscription` (string | null): What the contact you listed the topics for gets: `opt_in` or `opt_out`. `null` when you named no contact. One of: `opt_in`, `opt_out`.
- `createdAt` (string): When the topic was made.

## Example

cURL:

```bash
curl -X POST "$OPENSEND_API_URL/v1/topics" \
  -H "Authorization: Bearer $OPENSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Product news",
  "description": "What we shipped, once a month."
}'
```

TypeScript:

```ts
await opensend.topics.create({
  name: 'Product news',
  description: 'What we shipped, once a month.',
})
```

CLI:

```bash
opensend topics create \
  --name 'Product news' \
  --description 'What we shipped, once a month.'
```

MCP:

```json
{
  "name": "topics_create",
  "arguments": {
    "name": "Product news",
    "description": "What we shipped, once a month."
  }
}
```

Answer:

```json
{
  "object": "topic",
  "id": "top_02",
  "name": "Product news",
  "description": "What we shipped, once a month.",
  "defaultSubscription": "opt_in",
  "visibility": "public",
  "subscription": null,
  "createdAt": "2026-11-27T09:30:00.000Z"
}
```
