> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Topic

> Create a subscription topic or category for user communication preferences.

Create an email topic (such as "Newsletter", "Product Updates", or "Security Alerts") to allow contacts to granularly manage what emails they receive via the Mailofly API.

### Body Parameters

**name** `string` *required*

The name of the topic.

**description** `string`

A public or internal description of what emails are sent under this topic.

**defaultStatus** `string` (default: opt\_in)

Default subscription state for contacts: `opt_in` or `opt_out`.

### Response

**data** `object`

**id** `string`

Unique identifier for the topic.

**name** `string`

Topic name.

**description** `string`

Topic description.

**defaultStatus** `string`

Default subscription status.

**createdAt** `string`

ISO 8601 timestamp.

```bash cURL theme={null}
curl -X POST https://api.mailofly.com/topics \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Updates",
    "description": "Weekly digests on new features and product improvements",
    "defaultStatus": "opt_in"
  }'
```

```json 201 Created theme={null}
{
  "data": {
    "id": "top_123",
    "name": "Product Updates",
    "description": "Weekly digests on new features and product improvements",
    "defaultStatus": "opt_in",
    "createdAt": "2026-09-11T13:40:00Z"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.