Webhooks API is 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.webhooks.get(
'4dd369bc-aa82-4ff3-97de-514ae3000ee0',
);
{
"object": "webhook",
"id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
"created_at": "2023-08-22T15:28:00.000Z",
"status": "enabled",
"endpoint": "https://webhook.example.com/handler",
"events": ["email.sent", "email.received"],
"signing_secret": "whsec_xxxxxxxxxx"
}
Retrieve a single webhook for the authenticated user.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.webhooks.get(
'4dd369bc-aa82-4ff3-97de-514ae3000ee0',
);
{
"object": "webhook",
"id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
"created_at": "2023-08-22T15:28:00.000Z",
"status": "enabled",
"endpoint": "https://webhook.example.com/handler",
"events": ["email.sent", "email.received"],
"signing_secret": "whsec_xxxxxxxxxx"
}
npm install resend@6.3.0-canary.4
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.webhooks.get(
'4dd369bc-aa82-4ff3-97de-514ae3000ee0',
);
{
"object": "webhook",
"id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
"created_at": "2023-08-22T15:28:00.000Z",
"status": "enabled",
"endpoint": "https://webhook.example.com/handler",
"events": ["email.sent", "email.received"],
"signing_secret": "whsec_xxxxxxxxxx"
}
Was this page helpful?