| title | Webhook |
|---|---|
| description | Webhook protocol schemas |
{/*
Webhook Trigger Event
When should this webhook fire?
These mirror the record events the engine actually emits
(data.record.created / updated / deleted), which the webhook
auto-enqueuer maps to create / update / delete. Only events with a real
producer are declared here — an author can't subscribe to something that
never fires.
Deliberately NOT triggers (#3196):
undelete— there is no soft-delete / restore capability in the engine
(delete is a hard delete; no deleted_at convention, no restore
operation, no data.record.undeleted emit), so it had no event source.
Reintroduce it only alongside a real restore subsystem that emits an
undelete event.
api(manual/programmatic fire) — no manual fire path exists (the only
webhook HTTP surface re-queues already-failed deliveries). Reintroduce it
with a real "fire this webhook now" endpoint/service, not as a bare enum
value that silently never fires.
**Source:** `packages/spec/src/automation/webhook.zod.ts`import { Webhook, WebhookTriggerType } from '@objectstack/spec/automation';
import type { Webhook, WebhookTriggerType } from '@objectstack/spec/automation';
// Validate data
const result = Webhook.parse(data);| Property | Type | Required | Description |
|---|---|---|---|
| name | string |
✅ | Webhook unique name (lowercase snake_case) |
| label | string |
optional | Human-readable webhook label |
| object | string |
optional | Object whose record events (create/update/delete) trigger this webhook |
| triggers | Enum<'create' | 'update' | 'delete'>[] |
optional | Events that trigger execution |
| url | string |
✅ | External webhook endpoint URL |
| method | Enum<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'> |
✅ | HTTP method |
| headers | Record<string, string> |
optional | Custom HTTP headers |
| timeoutMs | integer |
✅ | Request timeout in milliseconds |
| secret | string |
optional | Signing secret for HMAC signature verification |
| isActive | boolean |
✅ | Whether webhook is active |
| description | string |
optional | Webhook description |
createupdatedelete