ObjectStackObjectStack

Webhook

Webhook protocol schemas

Source: packages/spec/src/automation/webhook.zod.ts

TypeScript Usage

import { WebhookSchema, WebhookTriggerType } from '@objectstack/spec/automation';
import type { Webhook, WebhookTriggerType } from '@objectstack/spec/automation';

// Validate data
const result = WebhookSchema.parse(data);

Webhook

Properties

PropertyTypeRequiredDescription
namestringWebhook name, unique per organization (lowercase snake_case)
labelstringoptionalHuman-readable webhook label
objectstringoptionalObject whose record events (create/update/delete, bulk_update/bulk_delete) trigger this webhook
triggersEnum<'create' | 'update' | 'delete' | 'bulk_update' | 'bulk_delete'>[]optionalEvents that trigger execution
urlstringExternal webhook endpoint URL
methodEnum<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'>optional (default: "POST")HTTP method
headersRecord<string, string>optionalCustom HTTP headers
timeoutMsintegeroptional (default: 30000)Request timeout in milliseconds
secretstringoptionalSigning secret for HMAC signature verification
isActivebooleanoptional (default: true)Whether webhook is active
descriptionstringoptionalWebhook description
protection{ lock: Enum<'none' | 'no-overlay' | 'no-delete' | 'full'>; reason: string; docsUrl?: string }optionalPackage author protection block — lock policy for this webhook.
_lockEnum<'none' | 'no-overlay' | 'no-delete' | 'full'>optionalItem-level lock — controls overlay & delete (ADR-0010).
_lockReasonstringoptionalHuman-readable reason shown when a write is refused by _lock.
_lockSourceEnum<'artifact' | 'package' | 'env-forced'>optionalLayer that set _lock (artifact | package | env-forced).
_provenanceEnum<'package' | 'org' | 'env-forced'>optionalOrigin of the item (package | org | env-forced).
_packageIdstringoptionalOwning package machine id.
_packageVersionstringoptionalOwning package version.
_lockDocsUrlstringoptionalOptional documentation link surfaced next to _lockReason.

Nested Shape: Webhook.protection

PropertyTypeRequiredDescription
lockEnum<'none' | 'no-overlay' | 'no-delete' | 'full'>Lock policy — none | no-overlay | no-delete | full.
reasonstringUser-visible reason shown when the lock blocks an action.
docsUrlstringoptionalOptional URL the Studio banner links to for more context.

WebhookTriggerType

Allowed Values

  • create
  • update
  • delete
  • bulk_update
  • bulk_delete

On this page