Topics
Topics are named content categories within an audience (e.g. "Weekly Newsletter", "Product Updates"). Contacts can be subscribed or unsubscribed per-topic. Each contact gets a unique unsubscribe URL for self-service preference management.
List topics
Returns all topics for an audience, including subscriber counts.
Response
dataTopic[]Array of topic objects.
totalnumberTotal number of topics.
data[].idstringTopic ID.
data[].namestringTopic name.
data[].descriptionstringOptional description.
data[].default_subscribed"auto" | "opt-in"Whether new contacts are auto-subscribed.
data[].subscriber_countnumberNumber of subscribed contacts.
data[].created_atstringISO timestamp.
Request (curl)
curl "https://sendexapi.com/api/v1/audiences/66f1a2b3c4d5e6f7a8b9c0e1/topics" \ -H "Authorization: Bearer sk_live_XXXX"
Response
{
"data": [
{
"id": "66f1a2b3c4d5e6f7a8b9c0a1",
"name": "Weekly Newsletter",
"description": "Our weekly digest",
"default_subscribed": "auto",
"subscriber_count": 142,
"created_at": "2025-01-10T00:00:00.000Z"
}
],
"total": 1
}Get contact topic subscriptions
Returns all topics for an audience with the contact's subscription status for each.
Response
dataContactTopic[]Array of topic subscription objects.
data[].topic_idstringTopic ID.
data[].namestringTopic name.
data[].subscribedbooleanWhether the contact is subscribed to this topic.
Request (curl)
curl "https://sendexapi.com/api/v1/audiences/66f1a2b3c4d5e6f7a8b9c0e1/contacts/66f1a2b3c4d5e6f7a8b9c0f1/topics" \ -H "Authorization: Bearer sk_live_XXXX"
Response
{
"data": [
{
"topic_id": "66f1a2b3c4d5e6f7a8b9c0a1",
"name": "Weekly Newsletter",
"subscribed": true
},
{
"topic_id": "66f1a2b3c4d5e6f7a8b9c0a2",
"name": "Product Updates",
"subscribed": false
}
]
}Update contact topic subscription
Subscribe or unsubscribe a contact from a specific topic.
Request Body
topic_idstringrequiredID of the topic to update.
subscribedbooleanrequiredtrue to subscribe, false to unsubscribe.
Response
topic_idstringTopic ID.
subscribedbooleanUpdated subscription status.
Request (curl)
curl -X PATCH "https://sendexapi.com/api/v1/audiences/66f1a2b3c4d5e6f7a8b9c0e1/contacts/66f1a2b3c4d5e6f7a8b9c0f1/topics" \
-H "Authorization: Bearer sk_live_XXXX" \
-H "Content-Type: application/json" \
-d '{"topic_id":"66f1a2b3c4d5e6f7a8b9c0a1","subscribed":false}'Response
{
"topic_id": "66f1a2b3c4d5e6f7a8b9c0a1",
"subscribed": false
}