Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Create a new topic

POST/topicsCreate a new topic

Request body

application/json
objectCreateTopicOptions
default_subscriptionstringrequired

The default subscription status for the topic. Cannot be changed after creation.

one of "opt_in", "opt_out"

descriptionstring

A description of the topic. Max 200 characters.

maxLength 200

namestringrequired

The name of the topic. Max 50 characters.

maxLength 50

visibilitystring

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.

one of "public", "private" · default "private"

Example request
{
  "default_subscription": "opt_in",
  "description": "string",
  "name": "string",
  "visibility": "private"
}

Responses

201OKapplication/json
objectCreateTopicResponseSuccess
idstring

The ID of the topic.

objectstring

The object type of the response.

Example response
{
  "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "object": "topic"
}
Documentation menu