Ga naar hoofdinhoud

Webhooks

Your integration architect needs ProBeya to push real-time event notifications to your enterprise service bus, trigger a ServiceNow workflow when actions escalate during TIER meetings, and feed KPI breach alerts into your plant's SCADA alert system. Webhooks provide event-driven, push-based integration with cryptographic payload verification using HMAC-SHA256 signatures.

Webhook management requires the manage_settings permission, restricted to org_owner, tenant_admin, and site_admin roles.

Webhooks vs. API Keys vs. Integrations: Choosing the Right Pattern​

CriterionWebhooks (Push)API Keys (Pull)Integrations (Slack/Teams)
DirectionProBeya pushes to your endpointYour system pulls from ProBeya APIProBeya pushes formatted messages
PayloadRaw JSON with event envelopeFull API response per endpointRich formatted messages (Block Kit / Adaptive Cards)
AuthenticationHMAC-SHA256 signature verificationBearer token in Authorization headerPlatform webhook URL
Use caseEvent-driven automation, ESB integrationData retrieval, dashboards, batch syncTeam notifications, meeting alerts
LatencyNear real-time (seconds)On-demand (polling interval)Near real-time (seconds)
GxP auditDelivery logs with HTTP status codesRequest logs with API key IDFire-and-forget (no delivery log)

Supported Events​

ProBeya emits webhooks for 15 event types across the operational domain:

EventDescriptionPharma Use Case
item.createdNew item added to a boardTrigger downstream work order in SAP PM
item.updatedItem fields modifiedSync status changes to MES
item.deletedItem removedArchive corresponding record in external system
item.status_changedItem status column updatedTrigger escalation workflow in ServiceNow
kpi.value_enteredNew KPI data point recordedFeed OEE data to Historian
kpi.threshold_breachedKPI crosses warning/alert thresholdTrigger SCADA alert or Andon signal
action.createdNew action item createdCreate CAPA in TrackWise
action.updatedAction item modifiedSync update to quality management system
action.escalatedAction escalated to higher tierPage the on-call manager via PagerDuty
action.completedAction marked as completeClose corresponding ticket in ServiceNow
comment.createdNew comment on an itemPost update to project Slack channel
member.addedNew member joined the organizationTrigger onboarding workflow in HR system
member.removedMember removed from the organizationTrigger offboarding and access revocation
checklist.completedChecklist fully completedLog completion in batch record system
audit.completedAudit checklist completedTrigger deviation report if findings exist

Getting Started​

  1. Navigate to Settings > Webhooks.
  2. Click Create Webhook.
  3. Enter the endpoint URL (HTTPS required in production).
  4. Select one or more event types to subscribe to.
  5. Click Create. Copy the generated signing secret immediately -- it is shown once.

Payload Format​

Every webhook delivery uses a standard envelope:

{
"event": "item.created",
"timestamp": "2026-03-30T12:00:00.000Z",
"organizationId": "org_abc123",
"data": {
"id": "item_xyz789",
"boardId": "board_def456",
"title": "Deviation - Line 3 OOS Event",
"status": "Not Started",
"createdBy": "user_ghi012"
}
}
FieldTypeDescription
eventStringThe event type that triggered this delivery
timestampISO 8601When the event occurred (UTC)
organizationIdStringThe organization that owns this event (tenant isolation)
dataObjectEvent-specific payload with entity details

Signature Verification​

Each delivery includes two custom headers:

HeaderContentPurpose
X-ProBeya-Signaturesha256={hex digest}HMAC-SHA256 of the request body using the webhook secret
X-ProBeya-EventEvent type stringThe event type (e.g., item.created)

Verification Algorithm​

expected = HMAC-SHA256(webhookSecret, rawRequestBody)
actual = parseHeader("X-ProBeya-Signature").removePrefix("sha256=")
isValid = timingSafeEqual(expected, actual)
Security

Always use a timing-safe comparison function when verifying HMAC signatures. Simple string equality (===) is vulnerable to timing attacks that can leak the expected signature byte-by-byte. Use crypto.timingSafeEqual() in Node.js or equivalent in your language.

Signing Secret Architecture​

PropertyValue
Entropy256 bits (32 random bytes, 64 hex characters)
Generationcrypto.randomBytes(32) backed by OS CSPRNG
StorageStored in the database (not hashed -- needed for HMAC computation)
VisibilityShown to the admin in the settings UI

Delivery Lifecycle & Retry Logic​

StateDescriptionTrigger
ActiveWebhook receives event deliveriesDefault state after creation
Disabled (auto)10 consecutive delivery failuresNon-2xx response or timeout 10 times in a row
Disabled (manual)Admin toggled offManual action in settings UI
Re-enabledAdmin re-enables after fixing endpointFailure counter resets to zero
DeletedWebhook and all delivery logs permanently removedAdmin clicks Delete

Failure Handling​

  • A delivery is considered failed if your endpoint returns a non-2xx HTTP status code or does not respond within 5 seconds.
  • After 10 consecutive failures, the webhook is automatically disabled to prevent wasted resources.
  • Re-enabling a webhook resets the failure counter to zero.
  • Successful deliveries (2xx response) also reset the failure counter.

Delivery Log​

Each webhook maintains a delivery log accessible from the settings UI:

FieldDescription
EventThe event type that triggered the delivery
Status CodeHTTP response code from your endpoint
Response BodyFirst 1,000 characters of the response (for debugging)
AttemptDelivery attempt number
Delivered AtTimestamp of the delivery attempt

Enterprise Integration Patterns​

Pattern 1: Enterprise Service Bus (ESB)​

ProBeya → Webhook → ESB (MuleSoft / IBM MQ) → SAP / MES / LIMS

Subscribe to all events. The ESB routes events to downstream systems based on the event field.

Pattern 2: Quality Event Pipeline​

ProBeya → kpi.threshold_breached → AWS Lambda → TrackWise CAPA creation
ProBeya → action.escalated → AWS Lambda → PagerDuty page
ProBeya → audit.completed → AWS Lambda → Deviation report in Ennov

Pattern 3: Audit Trail Replication​

ProBeya → all events → Webhook → Splunk / ELK / Datadog

Subscribe to all events and forward to your SIEM for centralized audit trail compliance (21 CFR Part 11.10(e)).

Configuration Reference​

SettingDescriptionConstraints
URLThe HTTPS endpoint receiving POST notificationsMust be a valid URL; HTTPS required in production
EventsArray of event types to subscribe toAt least one event required
EnabledToggle to pause deliveries without deletingDoes not affect delivery log retention
SecretAuto-generated 256-bit HMAC signing secretGenerated at creation; cannot be changed

Permissions & Security​

  • Webhook management requires manage_settings permission (admin roles only).
  • All webhook records are scoped to the current organization for multi-tenant isolation.
  • Webhook payloads never contain cross-tenant data.
  • All CRUD operations are logged to the audit trail.
  • The signing secret is visible to admins in the settings UI.
waarschuwing

The webhook signing secret grants the ability to forge valid payloads if leaked. Treat it as a sensitive credential. Store it in your integration system's secret manager, not in source control or plaintext configuration files.

Testing​

Use the Test button to send a synthetic webhook.test event to your endpoint. This verifies:

  • The endpoint URL is reachable from ProBeya's servers.
  • Your server correctly verifies the HMAC-SHA256 signature.
  • Your endpoint responds with a 2xx status code within 5 seconds.

Recovery Procedures​

ScenarioResolution
Webhook auto-disabled after 10 failuresFix the endpoint, then re-enable the webhook in settings. The failure counter resets.
Missed events during endpoint downtimeQuery the delivery log to identify missed events. Use the API to pull the current state of affected entities.
Signing secret compromisedDelete the webhook and create a new one (new secret is generated). Update the secret in your integration system.
Endpoint receiving duplicate eventsImplement idempotency on your server using the timestamp + event + data.id as a deduplication key.
All webhooks suddenly failingCheck if your IP allowlist or firewall is blocking ProBeya's outbound IPs. Verify your SSL certificate has not expired.

Best Practices​

  • Always validate the X-ProBeya-Signature header to prevent spoofed requests.
  • Respond with a 2xx status code within 5 seconds to avoid timeout failures.
  • Use a queuing service (SQS, RabbitMQ, Kafka) behind your endpoint to handle bursts gracefully.
  • Subscribe only to the events you need to minimize unnecessary network traffic.
  • Monitor the delivery log for recurring failures -- set up alerts for auto-disabled webhooks.
  • For GxP compliance, retain webhook delivery logs as part of your audit trail evidence.
  • API Keys -- Pull-based programmatic access for external integrations.
  • Connectors -- Pre-built bidirectional sync with pharma enterprise systems.
  • Integrations -- Formatted Slack and Teams notifications.
  • Audit Log -- Webhook creation, deletion, and delivery events are logged.