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
POSTto 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
| Webhooks | WebSockets | |
|---|---|---|
| Public endpoint | Required — PBXware must be able to reach your server | Not required — your client connects to PBXware |
| Retries | Failed deliveries are retried with exponential backoff | None — each event is sent once to the open connections |
| Events while you are unreachable | Retried briefly, then dropped | Dropped — there is no replay |
| Subscription lifetime | Persistent | Kept 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": {
...
}
}
| Field | Description |
|---|---|
event | Event type identifier |
event_id | UUID uniquely identifying this delivery — use for idempotency checks to handle retries safely |
spec_version | Payload schema version |
tenant_code | Tenant that generated the event |
event_time_info | When the event fired (timestamp, date, time) |
payload | Event-specific data |
The payload structure varies by event type. For call events, see Call Events. For SMS events, see SMS Events.