Method
Parameters
The unique identifier of the webhook to update
Response
Always
"webhook"The unique identifier of the updated webhook
Learn more about Mintlify
Enter your email to receive updates about new features and product releases.
Update a webhook’s endpoint, events, or status.
func (s *WebhooksSvcImpl) Update(webhookId string, params *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
func (s *WebhooksSvcImpl) UpdateWithContext(ctx context.Context, webhookId string, params *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
"webhook"client := resend.NewClient("re_123456789")
newEndpoint := "https://example.com/webhooks/new-endpoint"
params := &resend.UpdateWebhookRequest{
Endpoint: &newEndpoint,
Events: []string{
resend.EventEmailSent,
resend.EventEmailDelivered,
},
}
response, err := client.Webhooks.Update("wh_abc123", params)
if err != nil {
panic(err)
}
fmt.Println("Updated webhook:", response.Id)