Create a topic
POST/api/v1/email/topics
POST /email/topics
curl -X POST 'https://www.unitpost.com/api/v1/email/topics' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"name": "Product updates",
"default_opt_in": true
}'Response · 201
{
"object": "topic",
"id": "id_123",
"name": "Example",
"description": "string",
"default_opt_in": false,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}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, and set an individual contact's preference with Set a contact's topic preference. Topics differ from segments: a segment decides who a campaign targets, a topic lets recipients opt out. Requires the topics:write capability.
Request body3 fields
| Field | Type | Description |
|---|---|---|
namerequired | string | — |
description | string | — |
default_opt_in | boolean | — |
Response · 201 fields7 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
namerequired | string | — |
descriptionrequired | object | — |
default_opt_inrequired | boolean | — |
created_atrequired | string | — |
updated_atrequired | string | — |
201401409422