Webhooks
Receive, verify, and process Ozibus event notifications for messaging and other merchant activity.
Ozibus webhooks notify your server when a subscribed event occurs. Each endpoint belongs to one merchant and one verified registered domain. Delivery is asynchronous: accepting a send request does not mean a recipient received the message. Use the later status event to update your records.
Set up an endpoint
Where to configure it: sign in to the Ozibus merchant app → Campaign Operations Center. Find the Developer & Automation section, then open the Webhook Event Delivery card. You can use the page search for “webhook” if the section is collapsed. This is the merchant-facing outbound webhook setup; the older /integration/webhook screen configures a separate legacy messaging callback.
- Create an HTTPS endpoint in your application that accepts
POSTrequests with a JSON body. Keep it reachable from the public internet. - Register and verify each sending domain first. In Webhook Event Delivery, choose the verified domain for this endpoint, then enter its name, HTTPS URL, and comma-separated event types such as
sms.*, email.*. Leave the event field empty to subscribe to all events. Keep Active checked and select Save webhook endpoint. Create separate endpoints for other domains. - Enter your own signing secret or leave that field blank to generate one. Copy the secret shown after saving and store it in server-side configuration as
OZIBUS_WEBHOOK_SECRET. Treat it as a credential; it is not included in the endpoint list later. - Return any
2xxHTTP status promptly after validating and safely recording the event. Process slow work in your own queue. - Use the same card to review recent delivery attempts, select Process due deliveries when needed, or disable an endpoint you no longer use.
Subscriptions accept exact event names, a category wildcard such as sms.*, or * for all events. Select only the events you need. Email events route to endpoints assigned to the verified sender domain. Events without domain context route only when the merchant has exactly one verified domain; Ozibus does not fan them out to every registered domain. Legacy endpoints without a domain assignment must be saved again with a verified domain before they can receive deliveries.
Sample SMS payload
This is an illustrative sms.delivered event. IDs, recipient, timestamp, and status vary by delivery.
{
"id": "2f5f02ac-3767-42cc-8d0e-3e7ed2346a8f",
"type": "sms.delivered",
"created_at": "2026-11-02T09:15:30+11:00",
"merchant_id": "YOUR_MERCHANT_ID",
"data": {
"category": "sms",
"channel": "sms",
"status": "delivered",
"queue_id": "8e2422c8-8f2e-4d82-9adb-d4975aac637f",
"campaign_id": "67e8d89f-544d-49e6-b289-e222e711e884",
"recipient": "+61400000000",
"provider_id": "PROVIDER_MESSAGE_ID"
}
}Sample email payload
{
"id": "8caa5cbb-cc38-478e-85fc-3067ba468dd4",
"type": "email.bounced",
"created_at": "2026-11-02T09:16:08+11:00",
"merchant_id": "YOUR_MERCHANT_ID",
"data": {
"category": "email",
"channel": "email",
"status": "bounced",
"queue_id": "de65da36-6269-4d3d-9c6e-18f964ce6fd6",
"campaign_id": "a697a87a-7418-4e60-a78c-abbdab2bd105",
"recipient": "person@example.com",
"provider_id": "PROVIDER_MESSAGE_ID"
}
}queue_id and campaign_id are the public UUID references for the queue item and campaign. Older records without a saved UUID may return null; neither field exposes an internal numeric database ID. provider_id may also be null. The data fields depend on the event type; do not assume every event has messaging fields. Preserve unknown fields so your handler remains compatible with new events.
HTTP request and signature
Ozibus sends the stored JSON body in an HTTP POST with these headers:
Content-Type: application/json
User-Agent: Ozibus-Webhooks/1.0
X-Ozibus-Event: sms.delivered
X-Ozibus-Delivery: 2f5f02ac-3767-42cc-8d0e-3e7ed2346a8f
X-Ozibus-Signature: sha256=<hexadecimal-hmac>The signature is lowercase hexadecimal HMAC-SHA256 over the raw request body bytes, using that endpoint's signing secret. Verify it before trusting or processing the event. Do not decode and re-encode JSON before calculating the HMAC. Compare signatures with a constant-time comparison. Also confirm the payload's merchant_id belongs to the expected merchant and that the header event ID and type agree with the body.
<?php
$secret = getenv('OZIBUS_WEBHOOK_SECRET');
$rawBody = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_OZIBUS_SIGNATURE'] ?? '';
$expected = 'sha256=' . hash_hmac('sha256', $rawBody, $secret);
if (!$secret || !hash_equals($expected, $signature)) {
http_response_code(401);
exit;
}
$event = json_decode($rawBody, true);
if (!is_array($event)
|| ($event['merchant_id'] ?? '') !== getenv('OZIBUS_MERCHANT_ID')
|| ($event['id'] ?? '') !== ($_SERVER['HTTP_X_OZIBUS_DELIVERY'] ?? '')
|| ($event['type'] ?? '') !== ($_SERVER['HTTP_X_OZIBUS_EVENT'] ?? '')) {
http_response_code(400);
exit;
}
// Persist event['id'] with a unique constraint, then queue your own processing.
// Return success for an ID you have already accepted.
http_response_code(204);Delivery, retries, and duplicates
A 2xx response is successful. Ozibus waits up to 5 seconds to connect and 8 seconds for a response. Network errors and non-2xx responses are retried, up to 5 attempts total. The retry delay grows exponentially (2, 4, 8, then 16 minutes). After the final unsuccessful attempt, delivery remains failed for review. An endpoint must be active for dispatch.
Retries reuse the same id and X-Ozibus-Delivery value. Treat the event ID as an idempotency key: record it once and return 2xx for duplicates. Events may arrive after the action that triggered them; do not depend on instant delivery or strict ordering. Avoid using a failed webhook response to retry a billable send request.
Event subscriptions
For message delivery, subscribe to sms.* and email.*, or exact status events such as sms.delivered and email.bounced. The event type is the channel plus the status recorded by Ozibus; statuses may include queued, sent, delivered, failed, rejected, and bounced where applicable. A status event reflects the information available at that point, and provider confirmation can arrive later.
The delivery center also exposes merchant activity subscriptions including campaign.*, approval.*, budget.*, compliance.*, preference.*, experiment.*, inbound.*, warmup.*, ai.*, and security.*. Available exact event names are shown in the app. Event-specific data fields differ from the messaging examples above.
Troubleshooting
- No events: confirm the endpoint is active, the merchant matches, the subscription includes the event type, and the event has actually been recorded.
- Signature mismatch: use the raw body, correct endpoint secret, full
sha256=prefix, and exact bytes received. - Repeated events: check your
2xxresponse and process the event ID only once. - Failed delivery: inspect response status and error in delivery history; make your endpoint respond within 8 seconds.
Keep signing secrets out of browser code and logs. Rotate a compromised secret in the endpoint settings and update your receiver at the same time. This guide describes Ozibus outbound merchant webhooks; provider callbacks sent into Ozibus use separate endpoints and credentials.