Skip to main content

Event Publisher

Event Publisher delivers real-time webhook notifications when events occur on your PBXware system. Instead of polling for changes, your server receives an HTTP POST the moment something happens.


How It Works

  1. Configure a webhook — provide your endpoint URL, the events to subscribe to, and optional authentication
  2. An event fires — when a subscribed event occurs, PBXware sends a POST request with a JSON payload to your URL
  3. Acknowledge receipt — return any 2xx HTTP response; no body is required

Retries: If your server returns a non-2xx response or does not respond, PBXware retries delivery using exponential backoff. Retry behavior is configurable. Use the event_id field in the envelope for idempotency — retried deliveries carry the same event_id as the original.

Because webhooks are standard HTTP POST requests, Event Publisher integrates naturally with workflow automation platforms such as Zapier, Make (Integromat), Microsoft Power Automate, and n8n — no custom server required for many use cases. If a target system expects a different payload structure, you will need to implement your own middleware to handle the transformation.


Key Concepts

Webhook scope — Webhooks 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 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.

Outbound authentication — PBXware can authenticate requests to your endpoint using a static bearer token, HTTP Basic Auth, or OAuth2 (Client Credentials or Resource Owner Password Credentials).

Endpoint testing — Before creating a webhook, you can test whether your endpoint is reachable and correctly authenticated.

See the Event Publisher API Reference for all webhook management endpoints.


Event Envelope

Every event delivered to your webhook — regardless of type — arrives as a JSON object with this structure:

{
"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.