OpenSend docs
Create Topic
Create a subscription topic for audience preference management.
POST /topics
POST /api/topics
Compatibility behavior
/topics is the compatibility alias. In this mode the request body is validated strictly:
nameis required and trimmed.default_subscriptionis required and must be eitheropt_inoropt_out.visibilityis required and must be eitherpublicorprivate.descriptionis optional and still capped at 200 characters.
/api/topics retains OpenSend extension behavior:
- Missing
default_subscriptiondefaults toopt_out. - Missing
visibilitydefaults topublic. - Invalid values for those fields are still normalized to legacy defaults.
Authentication
Use an OpenSend API key in the Authorization header.
Authorization: Bearer os_YOUR_API_KEYDashboard session cookies are not API credentials.
Parameters
Body includes topic display fields accepted by this API.
name(required)description(optional)default_subscription(optional; strict root mode requires it)visibility(optional; strict root mode requires it)
Response
Returns an OpenSend JSON response for the authenticated tenant. Error responses use OpenSend error envelopes and standard HTTP status codes.
Self-hosting notes
Self-hosted deployments can use the same path on their own OPENSEND_BASE_URL. Ensure middleware is enabled so API-like requests are routed to /api/topics while dashboard page requests continue to render normally.