Skip to main content

actions/validateWebhookEvent

Type Aliases

ValidateWebhookEventFn()

ValidateWebhookEventFn: (params) => WebhookEventPayload

Validate a webhook event and return the event type

Parameters

params

params.body: string | object

The body of the webhook request

params.headers: Record\<string, string>

The headers of the webhook request. Only svix-* header is of interest

Returns

WebhookEventPayload

The parsed webhook event

Throws

If the webhook event is invalid