Skip to main content
The Webhook entity represents webhook configurations in the Well system. It allows external systems to receive real-time notifications about events occurring within workspaces.

Table structure

Table name: webhooks

Main fields

NameTypeRequiredConstraintsAllowed ValuesDescriptionExample
idstring, UUID, πŸ”’ systemβœ… YesUnique identifier (read-only)–Unique identifier of the webhook”webhook-uuid-123”
workspaceWorkspace (UUID)βœ… YesForeign key reference–Reference to the workspace”workspace-uuid-456”
urlstringβœ… Yesvalid URL format–Webhook endpoint URL”https://api.example.com/webhooks/well”
secretstringβšͺ Nonullable–Webhook secret for signature verification”your-webhook-secret”
eventsstring[]βœ… Yesarray of event typesdocument., company., person., workspace., collection.*Array of subscribed event types[β€œdocument.created”, β€œdocument.updated”]
is_activebooleanβšͺ Nodefault: truetrue, falseWebhook active statustrue
retry_countnumberβšͺ Nodefault: 3, max: 100-10Number of delivery retries3
timeout_msnumberβšͺ Nodefault: 5000, max: 300001000-30000Request timeout in milliseconds5000
last_delivery_atstring (ISO 8601) πŸ”’ systemβšͺ Nonullable timestamp–Last successful delivery timestamp”2024-01-15T10:30:00Z”
last_failure_atstring (ISO 8601) πŸ”’ systemβšͺ Nonullable timestamp–Last failure timestamp”2024-01-15T11:00:00Z”
failure_countnumber πŸ”’ systemβšͺ Nodefault: 00+Consecutive failure count0
created_atstring (ISO 8601) πŸ”’ system–auto timestamp–Creation timestamp”2023-01-01T12:00:00Z”
updated_atstring (ISO 8601) πŸ”’ system–auto timestamp–Last updated timestamp”2024-01-01T12:00:00Z”
deleted_atstring | null πŸ”’ systemβšͺ Nonullable ISO 8601–Deletion timestamp (soft delete)β€œ2024-01-01T12:00:00Z”

Relations

Many-to-One relations

  • Workspace: The workspace that owns the webhook

Relationship schema

Webhook (N) ←→ (1) Workspace

# A workspace can have multiple webhooks
Workspace (1) ←→ (N) Webhook

Event types

Supported events

enum WebhookEventType {
  // Document events
  DOCUMENT_UPLOADED = 'document.uploaded',
  DOCUMENT_PROCESSED = 'document.processed',
  DOCUMENT_DELETED = 'document.deleted',
  
  // Company events
  COMPANY_CREATED = 'company.created',
  COMPANY_UPDATED = 'company.updated',
  COMPANY_DELETED = 'company.deleted',
  
  // Person events
  PERSON_CREATED = 'person.created',
  PERSON_UPDATED = 'person.updated',
  PERSON_DELETED = 'person.deleted',
  
  // Workspace events
  WORKSPACE_UPDATED = 'workspace.updated',
  
  // Collection events
  COLLECTION_FINALIZED = 'collection.finalized',
  COLLECTION_SENT = 'collection.sent'
}
⌘I