Skip to main content

Method

func (s *TopicsSvcImpl) Get(topicId string) (*Topic, error)
func (s *TopicsSvcImpl) GetWithContext(ctx context.Context, topicId string) (*Topic, error)

Parameters

topicId
string
required
The unique identifier of the topic to retrieve

Response

Id
string
The unique identifier of the topic
Name
string
The name of the topic
Description
string
The description of the topic
DefaultSubscription
DefaultSubscription
Default subscription preference. Either "opt_in" or "opt_out"
CreatedAt
string
ISO 8601 timestamp of when the topic was created

Example

client := resend.NewClient("re_123456789")

topic, err := client.Topics.Get("topic_abc123")
if err != nil {
    panic(err)
}

fmt.Println("Topic Name:", topic.Name)
fmt.Println("Created At:", topic.CreatedAt)

Build docs developers (and LLMs) love