Update a topic

Update a topic

PATCH/api/v1/email/topics/{id}

PATCH /email/topics/{id}
curl -X PATCH 'https://www.unitpost.com/api/v1/email/topics/top_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 200
{
  "object": "topic",
  "id": "id_123",
  "name": "Example",
  "description": "string",
  "channel": "email",
  "default_opt_in": false,
  "subscriber_count": 1,
  "unsubscribed_count": 1,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Update a topic's name or default_opt_in behavior, or pass { "archived": true | false } to archive or restore it. Only explicit choices are stored, so changing default_opt_in subscribes (true) or unsubscribes (false) every contact with no explicit choice on the topic at once; Unitpost-Warning names how many. Archiving a topic hides it and stops it from being targeted, but is blocked with 409 while an active campaign still targets it. To manage a single contact's preference, use Set a contact's topic preference. Requires the topics:write capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body3 fields
FieldTypeDescription
namestring—
descriptionstring | null—
default_opt_inboolean—
Response · 200 fields10 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
namerequiredstring—
descriptionrequiredstring | null—
channelrequiredenumemail | smsWhich channel the topic belongs to. Email topics are managed under `/email/topics`, SMS topics under `/sms/topics`.
default_opt_inrequiredboolean—
subscriber_countintegerContacts subscribed to this topic, among those the channel can reach (an email address, or an SMS number): for an opt-out topic everyone but those who opted out of it, for an opt-in topic those who opted in. A send also skips contacts unsubscribed from everything and suppressed addresses. The dashboard's count.
unsubscribed_countintegerReachable contacts who opted out of this topic.
created_atrequiredstring—
updated_atrequiredstring—
200401404409422

Search docs and guides

Search the docs and product guides.