Topics

Create a topic

A topic is a kind of email a contact can subscribe to and leave independently of the audience they sit on, so an unsubscribe becomes a preference change rather than losing the contact. The default subscription is fixed at creation.

post/topics

Request

  • Base URL: https://api.eusend.dev
  • URL: https://api.eusend.dev/topics
  • Auth: HTTP bearer

Request body

namestring required

What the recipient reads on the unsubscribe page. Unique within the organization.

default_subscription'opt_in' | 'opt_out' required

opt_in reaches everyone until they unsubscribe; opt_out reaches nobody until they explicitly subscribe. Cannot be changed after creation — flipping it would start mailing every contact who never asked, and nothing stored says which of them would have agreed.

descriptionstring nullable
visibility'public' | 'private'

Whether the topic is listed on the hosted unsubscribe page to a contact who is not already opted in. A contact who explicitly opted in always sees it.

Response

Created.

idstring uuid required
namestring required
descriptionstring nullable required
defaultSubscription'opt_in' | 'opt_out' required

What a contact who has never expressed a preference receives. Fixed at creation.

visibility'public' | 'private' required
subscriberCountinteger

Contacts who explicitly opted in. Returned by create and list, not by get. For an opt_out topic this is the reachable audience; for an opt_in topic it is not, since everyone who never chose is subscribed too.

createdAtstring date-time required
updatedAtstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.