Webhook Events
2 API calls in this section.
Endpoints for viewing and managing webhook event delivery logs. These APIs allow you to monitor the delivery status of webhook events and retry failed deliveries.
List Webhook Events
/webhooks/events/:subscriptionIdReturns webhook delivery history for one subscription belonging to the authenticated tenant, newest first. Requires view:tenant or manage:tenant permission (system admins are also allowed), a tenant context, and subscriptionId as a valid UUID path parameter. subscriptionId is the saved webhook subscription id returned in GET /webhooks/subscriptions; it is not module_id. Module entries without an id do not have a saved subscription, so history must not be requested for them. The tenant_id and subscription_id database filters are always applied before exact counting, optional status filtering, sorting, and pagination. page defaults to 1; limit defaults to 25 and cannot exceed 100. payload is the inner event data placed under data in the outbound webhook envelope, not a captured full HTTP request. error_message contains the latest failure detail, retry_count currently counts failed delivery attempts, and created_at is when the event was queued. next_retry_time is an internal database field and is not returned by this API. Important errors: 400 when subscriptionId is invalid, pagination/status is invalid, or tenant context is missing; 403 for insufficient permission; and 500 for retrieval failure. Frontend contract: call this API only after selecting a saved subscription and put that subscription's id in the URL path; show event_type, status, created_at as Queued at, http_status_code, retry_count as Failure count, and a short error_message in the table. Open a details view for formatted payload and the full error_message. Use each event id as eventId for retry, use total with page and limit for pagination, and show a No webhook events yet state when events is empty.
Path parameters
| Parameter | Type | Description |
|---|---|---|
subscriptionIdRequired | string | Required saved webhook subscription UUID. This is the subscription id, not Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | string | Page number for pagination Example: |
limit | string | Number of items per page Example: |
status | string | Filter by delivery status (pending, retrying, success, failed) |
language | string | Preferred language for response messages Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/webhooks/events/${SUBSCRIPTIONID}?page=1&limit=10&status=&language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "message": "Webhook delivery history retrieved successfully",4 "events": [5 {6 "id": "443f197a-06b8-463c-a559-faa7b5e8e134",7 "subscription_id": "04938225-1beb-480e-b320-ded5fd75d648",8 "tenant_id": "a1b2c3d4-e5f6-4321-8901-123456789abc",9 "event_type": "order_update",10 "payload": {11 "delivery_code": "3339A",12 "status": "delivered",13 "update_types": [14 "StatusUpdate"15 ]16 },17 "status": "failed",18 "http_status_code": 403,19 "error_message": "Webhook responded with status 403",20 "retry_count": 1,21 "created_at": "2026-09-06T15:14:14.517Z"22 }23 ],24 "page": 1,25 "limit": 10,26 "total": 127}Retry Failed Webhook
/webhooks/events/:eventId/retrySynchronously retries one failed webhook delivery for the authenticated tenant. Requires manage:tenant permission (system admins are also allowed) and a tenant context. The API atomically changes failed to retrying before invoking the existing webhook sender, so concurrent retry requests do not send duplicates. It preserves the original event id and X-Webhook-ID. HTTP 200 means the retry attempt finished; inspect status to see whether the subscriber accepted it. Important errors: 400 for an invalid event UUID or missing tenant context, 403 for insufficient permission, 404 when the event is outside the tenant or does not exist, 409 when it is not failed or another retry claimed it, and 502 when the sender could not be invoked. Frontend contract: POST with no request body, disable retry unless status is failed, keep the action disabled while pending, and refresh history after any 200 response.
Path parameters
| Parameter | Type | Description |
|---|---|---|
eventIdRequired | string | ID of the webhook event to retry Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
language | string | Preferred language for response messages Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/webhooks/events/${EVENTID}/retry?language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json"Response examples
1{2 "success": true,3 "message": "Webhook delivered successfully on retry",4 "event_id": "443f197a-06b8-463c-a559-faa7b5e8e134",5 "status": "success",6 "retry_count": 17}