Path Parameters
Body Parameters
The URL where webhook events will be sent.
Array of event types to subscribe to.See event types for available options.
The webhook status. Can be either 
enabled or disabled.import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.webhooks.update(
  '430eed87-632a-4ea6-90db-0aace67ec228',
  {
    endpoint: 'https://new-webhook.example.com/handler',
    events: ['email.sent', 'email.delivered'],
    status: 'enabled',
  },
);
{
  "object": "webhook",
  "id": "430eed87-632a-4ea6-90db-0aace67ec228"
}
Update an existing webhook configuration.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.webhooks.update(
  '430eed87-632a-4ea6-90db-0aace67ec228',
  {
    endpoint: 'https://new-webhook.example.com/handler',
    events: ['email.sent', 'email.delivered'],
    status: 'enabled',
  },
);
{
  "object": "webhook",
  "id": "430eed87-632a-4ea6-90db-0aace67ec228"
}
enabled or disabled.import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.webhooks.update(
  '430eed87-632a-4ea6-90db-0aace67ec228',
  {
    endpoint: 'https://new-webhook.example.com/handler',
    events: ['email.sent', 'email.delivered'],
    status: 'enabled',
  },
);
{
  "object": "webhook",
  "id": "430eed87-632a-4ea6-90db-0aace67ec228"
}
Was this page helpful?