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 referenceReference to the workspace”workspace-uuid-456”
urlstring✅ Yesvalid URL formatWebhook endpoint URLhttps://api.example.com/webhooks/well
secretstring⚪ NonullableWebhook 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 timestampLast successful delivery timestamp”2024-01-15T10:30:00Z”
last_failure_atstring (ISO 8601) 🔒 system⚪ Nonullable timestampLast failure timestamp”2024-01-15T11:00:00Z”
failure_countnumber 🔒 system⚪ Nodefault: 00+Consecutive failure count0
created_atstring (ISO 8601) 🔒 systemauto timestampCreation timestamp”2023-01-01T12:00:00Z”
updated_atstring (ISO 8601) 🔒 systemauto timestampLast updated timestamp”2024-01-01T12:00:00Z”
deleted_atstring | null 🔒 system⚪ Nonullable ISO 8601Deletion 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'
}