Skip to main content

Method

func (s *WebhooksSvcImpl) List() (*ListWebhooksResponse, error)
func (s *WebhooksSvcImpl) ListWithContext(ctx context.Context) (*ListWebhooksResponse, error)
func (s *WebhooksSvcImpl) ListWithOptions(ctx context.Context, options *ListOptions) (*ListWebhooksResponse, error)

Parameters

options
*ListOptions
Pagination options (only available in ListWithOptions)
Limit
*int
Maximum number of webhooks to return
After
*string
Cursor for forward pagination
Before
*string
Cursor for backward pagination

Response

Object
string
Always "list"
HasMore
bool
Whether there are more results available
Data
[]WebhookInList
Array of webhook objects
Id
string
The unique identifier of the webhook
CreatedAt
string
ISO 8601 timestamp of when the webhook was created
Status
string
The current status of the webhook
Endpoint
string
The URL endpoint receiving webhook events
Events
[]string
Array of subscribed event types

Example

client := resend.NewClient("re_123456789")

response, err := client.Webhooks.List()
if err != nil {
    panic(err)
}

for _, webhook := range response.Data {
    fmt.Printf("Webhook: %s - %s\n", webhook.Id, webhook.Endpoint)
    fmt.Printf("  Events: %v\n", webhook.Events)
}

fmt.Println("Has More:", response.HasMore)

Build docs developers (and LLMs) love