POST
/topicsCreate a topic
Creates a topic for organizing contact subscriptions. Supply name and default_subscription, and optionally set a description and visibility; visibility defaults to private when omitted.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Topic details. name and default_subscription are required.
namestringrequired
The name of the topic. Max 50 characters.
default_subscriptionstringrequired
The default subscription status for the topic. Cannot be changed after creation.
descriptionstringoptional
A description of the topic. Max 200 characters.
visibilitystringoptional
The visibility of the topic. Public topics are visible to all contacts on the unsubscribe page. Private topics are only visible to opted-in contacts.
201Returns the created topic's ID and object type.
idstringoptional
The ID of the topic.
objectstringoptional
The object type of the response.
Error handling
name and default_subscription are required. name must not exceed 50 characters, description must not exceed 200 characters, default_subscription must be opt_in or opt_out, and visibility must be public or private.