Subscription Topics
Let contacts manage their email preferences with subscription topics. Instead of a binary subscribe/unsubscribe, contacts can opt into specific categories like “Product Updates” or “Marketing”.
/subscription-topicsCreate a new subscription topic.
{
"name": "Product Updates",
"description": "New features, improvements, and release notes"
}/subscription-topicsList all subscription topics.
{
"topics": [
{
"id": 1,
"name": "Product Updates",
"description": "New features, improvements, and release notes",
"created_at": "2026-03-23T10:00:00.000Z"
},
{
"id": 2,
"name": "Marketing",
"description": "Promotions, offers, and company news",
"created_at": "2026-03-20T10:00:00.000Z"
}
]
}/subscription-topics/:idDelete a subscription topic. Contacts subscribed to this topic are not deleted.
{
"success": true
}Managing Contact Subscriptions
Manage which topics a specific contact is subscribed to. Endpoints are organized under the contact's ID:
/subscription-topics/contacts/:contactId/subscriptionsList all topic subscriptions for a specific contact.
{
"subscriptions": [
{
"topic_id": "top_xyz789ghi012",
"contact_id": "con_abc123def456",
"subscribed_at": "2026-03-23T10:00:00.000Z"
},
{
"topic_id": "top_jkl345mno678",
"contact_id": "con_abc123def456",
"subscribed_at": "2026-03-24T08:00:00.000Z"
}
]
}/subscription-topics/contacts/:contactId/subscriptionsSubscribe a contact to a topic. Both contactId in the path and topic_id in the body are publicId strings (con_*, top_*), not integers.
{
"topic_id": "top_xyz789ghi012"
}/subscription-topics/contacts/:contactId/subscriptions/:topicIdUnsubscribe a contact from a topic.
{
"success": true
}Using Topics with Broadcasts
When creating a broadcast, set the topic_id to only send to contacts subscribed to that topic. This ensures contacts only receive emails they have opted into.
// Only contacts subscribed to "Product Updates" will receive this
const { broadcast } = await poststack.broadcasts.create({
name: 'New Feature: Workflows',
from: 'updates@yourdomain.com',
subject: 'Introducing Workflows',
html: '<p>Automate your email sequences...</p>',
segment_id: 'seg_all_users',
topic_id: 1,
});