Skip to main content
Version: Next

Event Publisher

Event Publisher delivers real-time event notifications when events occur on your PBXware system. Instead of polling for changes, you receive each event the moment it happens, in one of two ways:

  • Webhooks — PBXware sends an HTTP POST to an endpoint you host.
  • WebSockets — your client opens a connection to PBXware and receives events over it, so you do not need to host a public endpoint.

Choosing a Delivery Method​

WebhooksWebSockets
Public endpointRequired — PBXware must be able to reach your serverNot required — your client connects to PBXware
RetriesFailed deliveries are retried with exponential backoffNone — each event is sent once to the open connections
Events while you are unreachableRetried briefly, then droppedDropped — there is no replay
Subscription lifetimePersistentKept in memory — removed when the service restarts or after about 10 minutes with no open connection

Use webhooks when you need failed deliveries retried. Use WebSockets when you cannot expose a public endpoint and can tolerate missing events while your client is disconnected.


Key Concepts​

Scope — Webhooks and WebSocket subscriptions can be created at the org level (scoped to one organization) or at the system level (Multi-Tenant only, can span multiple tenants at once).

Event filtering — Each webhook or WebSocket subscription subscribes to a specific list of event types, or you can opt in to all available events. The full event catalog with schemas and examples is available via the API.


Event Envelope​

Every event — regardless of type or delivery method — arrives as a JSON object with this structure. A webhook receives it as the body of the POST; a WebSocket client receives it as one text message.

{
"event": "event_type",
"event_id": "a298608c-16a2-4fdb-b2f5-29415e07feee",
"spec_version": "1.0",
"tenant_code": "200",
"event_time_info": {
"timestamp": 1778836418,
"date": "2026-05-15",
"time": "11:13:38"
},
"payload": {
...
}
}
FieldDescription
eventEvent type identifier
event_idUUID uniquely identifying this delivery — use for idempotency checks to handle retries safely
spec_versionPayload schema version
tenant_codeTenant that generated the event
event_time_infoWhen the event fired (timestamp, date, time)
payloadEvent-specific data

The payload structure varies by event type. For call events, see Call Events. For SMS events, see SMS Events.