Webhook
Webhook protocol schemas
Webhook Trigger Event
When should this webhook fire?
Source: packages/spec/src/automation/webhook.zod.ts
TypeScript Usage
import { Webhook, WebhookReceiver, WebhookTriggerType } from '@objectstack/spec/automation';
import type { Webhook, WebhookReceiver, WebhookTriggerType } from '@objectstack/spec/automation';
// Validate data
const result = Webhook.parse(data);Webhook
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Webhook unique name (lowercase snake_case) |
| label | string | optional | Human-readable webhook label |
| object | string | optional | Object to listen to (optional for manual webhooks) |
| triggers | Enum<'create' | 'update' | 'delete' | 'undelete' | 'api'>[] | 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 |
| body | any | optional | Request body payload (if not using default record data) |
| payloadFields | string[] | optional | Fields to include. Empty = All |
| includeSession | boolean | ✅ | Include user session info |
| authentication | Object | optional | Authentication configuration |
| retryPolicy | Object | optional | Retry policy configuration |
| 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 |
| tags | string[] | optional | Tags for organization |
WebhookReceiver
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Webhook receiver unique name (lowercase snake_case) |
| path | string | ✅ | URL Path (e.g. /webhooks/stripe) |
| verificationType | Enum<'none' | 'header_token' | 'hmac' | 'ip_whitelist'> | ✅ | |
| verificationParams | Object | optional | |
| action | Enum<'trigger_flow' | 'script' | 'upsert_record'> | ✅ | |
| target | string | ✅ | Flow ID or Script name |
WebhookTriggerType
Allowed Values
createupdatedeleteundeleteapi