Documentation Index
Fetch the complete documentation index at: https://mintlify.com/resend/resend-go/llms.txt
Use this file to discover all available pages before exploring further.
Method
func (s *WebhooksSvcImpl) Update(webhookId string, params *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
func (s *WebhooksSvcImpl) UpdateWithContext(ctx context.Context, webhookId string, params *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
Parameters
The unique identifier of the webhook to update
params
*UpdateWebhookRequest
required
The webhook update parametersThe new URL endpoint for the webhook
Updated array of event types to subscribe to
The new status for the webhook
Response
The unique identifier of the updated webhook
Example
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)