ObjectStackObjectStack

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

PropertyTypeRequiredDescription
namestringWebhook unique name (lowercase snake_case)
labelstringoptionalHuman-readable webhook label
objectstringoptionalObject to listen to (optional for manual webhooks)
triggersEnum<'create' | 'update' | 'delete' | 'undelete' | 'api'>[]optionalEvents that trigger execution
urlstringExternal webhook endpoint URL
methodEnum<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'>HTTP method
headersRecord<string, string>optionalCustom HTTP headers
bodyanyoptionalRequest body payload (if not using default record data)
payloadFieldsstring[]optionalFields to include. Empty = All
includeSessionbooleanInclude user session info
authenticationObjectoptionalAuthentication configuration
retryPolicyObjectoptionalRetry policy configuration
timeoutMsintegerRequest timeout in milliseconds
secretstringoptionalSigning secret for HMAC signature verification
isActivebooleanWhether webhook is active
descriptionstringoptionalWebhook description
tagsstring[]optionalTags for organization

WebhookReceiver

Properties

PropertyTypeRequiredDescription
namestringWebhook receiver unique name (lowercase snake_case)
pathstringURL Path (e.g. /webhooks/stripe)
verificationTypeEnum<'none' | 'header_token' | 'hmac' | 'ip_whitelist'>
verificationParamsObjectoptional
actionEnum<'trigger_flow' | 'script' | 'upsert_record'>
targetstringFlow ID or Script name

WebhookTriggerType

Allowed Values

  • create
  • update
  • delete
  • undelete
  • api

On this page