Skip to main content

Webhook Testing

2 API calls in this section.

Test Webhook URL

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions / Webhook Testing
POST/webhooks/test?language=en

Tests if a webhook URL is valid and reachable. The endpoint must return a 2xx status code to be considered valid. You can provide optional secret_header_key and secret_header_value to test authentication.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/webhooks/test?language=en" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "webhook_url": "https://example.com/webhook",6  "secret_header_key": "X-Webhook-Secret",7  "secret_header_value": "your-secret-value-here"8}'
Request body
json
1{2  "webhook_url": "https://example.com/webhook",3  "secret_header_key": "X-Webhook-Secret",4  "secret_header_value": "your-secret-value-here"5}

Query parameters

languageOptional
query string

en

Response language

Request body fields

webhook_urlExample
string

Example field from the request body.

secret_header_keyExample
string

Example field from the request body.

secret_header_valueExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Receive Test Webhook

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions / Webhook Testing
POST/webhooks/receive-test

This is a test webhook receiver endpoint for development. It logs the received webhook payload and headers, then returns a success response. Use this URL ({{base_url}}/webhooks/receive-test) as the webhook_url when testing webhook subscriptions.

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request POST "$ONDI_BASE_URL/webhooks/receive-test" \2  --header "X-Test-Header: test-value" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "event": "test.event",7  "timestamp": "{{$isoTimestamp}}",8  "data": {9    "id": "123456",10    "status": "completed",11    "test": true12  }13}'
Request body
json
1{2  "event": "test.event",3  "timestamp": "{{$isoTimestamp}}",4  "data": {5    "id": "123456",6    "status": "completed",7    "test": true8  }9}

Request body fields

eventExample
string

Example field from the request body.

timestampExample
string

Example field from the request body.

dataExample
object

Example field from the request body.

data.idExample
string

Example field from the request body.

data.statusExample
string

Example field from the request body.

data.testExample
boolean

Example field from the request body.

Headers

X-Test-HeaderOptional
header string

test-value

Content-TypeOptional
header string

application/json

Responses

Success Response200OK