Skip to main content

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​

Reporting, Audit & Webhooks / Webhooks / Webhook Events
GET/webhooks/events/:subscriptionId

Returns 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

ParameterTypeDescription
subscriptionIdRequiredstring

Required saved webhook subscription UUID. This is the subscription id, not module_id

Example: {{webhook_subscription_id}}

Query parameters

ParameterTypeDescription
pagestring

Page number for pagination

Example: 1

limitstring

Number of items per page

Example: 10

statusstring

Filter by delivery status (pending, retrying, success, failed)

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200OK
Response body
json
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​

Reporting, Audit & Webhooks / Webhooks / Webhook Events
POST/webhooks/events/:eventId/retry

Synchronously 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

ParameterTypeDescription
eventIdRequiredstring

ID of the webhook event to retry

Example: uuid

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Staging
Request
curl
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

200OK
Response body
json
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}