Skip to content
emailkit
Esc
navigateopen⌘Jpreview
On this page

webhook.onAll

Every webhook lifecycle event in one stream.

Fires for every webhook lifecycle event. action says what happened — created, updated, deleted, action_required, or sync_required — so one handler can cover the whole lifecycle instead of four separate hooks.

hooks: {
  webhook: {
    onAll: async (event) => {
      await prisma.webhookEvent.create({
        data: {
          action: event.action,
          emailDriver: event.emailDriver,
          reason: event.reason,
          payload: event,
        },
      });
    },
  },
},

Payload

PropType
id?string
Typestring
emailDriverstring
Typestring
actionWebhookLifecycleAction
TypeWebhookLifecycleAction
sourceWebhookLifecycleSource
TypeWebhookLifecycleSource
reasonWebhookLifecycleReason
TypeWebhookLifecycleReason
recommendedActions?WebhookRecommendedAction[]
TypeWebhookRecommendedAction[]
scopeWebhookScope
TypeWebhookScope
webhook?Webhook
TypeWebhook
previousWebhook?Webhook
TypeWebhook
webhookId?string
Typestring
providerId?string
Typestring
subscriptionId?string
Typestring
target?WebhookLifecycleTarget
TypeWebhookLifecycleTarget
status?WebhookStatus
TypeWebhookStatus
previousStatus?WebhookStatus
TypeWebhookStatus
expiresAt?Date
TypeDate
renewAfter?Date
TypeDate
receivedAt?Date
TypeDate
severity?"info" | "warning" | "critical"
Type"info" | "warning" | "critical"
context?unknown
Typeunknown
raw?unknown
Typeunknown

Last updated on July 24, 2026

Was this page helpful?