Topics are currently in private beta and only available to a limited
number of users. APIs might change before GA.To use the methods on this page, you must upgrade your Resend SDK:Get in touch if you’re interested in testing
this feature.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.topics.get(
'b6d24b8e-af0b-4c3c-be0c-359bbd97381e',
);
{
"id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
"name": "Weekly Newsletter",
"description": "Weekly newsletter for our subscribers",
"default_subscription": "opt_in",
"created_at": "2023-04-08T00:11:13.110779+00:00"
}
Retrieve a topic by its ID.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.topics.get(
'b6d24b8e-af0b-4c3c-be0c-359bbd97381e',
);
{
"id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
"name": "Weekly Newsletter",
"description": "Weekly newsletter for our subscribers",
"default_subscription": "opt_in",
"created_at": "2023-04-08T00:11:13.110779+00:00"
}
npm install resend@6.3.0-canary.0
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.topics.get(
'b6d24b8e-af0b-4c3c-be0c-359bbd97381e',
);
{
"id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
"name": "Weekly Newsletter",
"description": "Weekly newsletter for our subscribers",
"default_subscription": "opt_in",
"created_at": "2023-04-08T00:11:13.110779+00:00"
}
Was this page helpful?