Send a Test Event
The Test WebHook API posts one synthetic detection to a WebHook's configured postbackAddress and reports what your receiver answered. It is the fastest way to prove that a registration is correct — URL reachable, TLS accepted, credentials valid, payload parsed — without waiting for a real face or plate to be detected.
The generated data is clearly marked as test data. Identifiers are prefixed with TEST-, names are placeholders such as Jane Test Doe, and images are a small built-in sample rather than a real capture.
Which payload is sent
The event family flags on the WebHook decide the shape of the test payload:
webHookFaceRec | webHookLpr | Payload sent |
|---|---|---|
true | any | A full WebHookFaceRecPayload |
false | true | A full WebHookLprPayload |
false | false | A small generic object (see below) |
A hook with both flags enabled is tested with the face payload only. To exercise the LPR path on such a hook, register a second hook with only webHookLpr set.
The generic object sent when neither flag is set looks like this:
{
"test": true,
"message": "EventsBridge webhook test",
"timestamp": "2026-08-10T17:04:22.918Z",
"webhookId": "e1bce9b4-5589-4d6e-b765-8f446a8a5c10",
"webhookName": "PartnerServer1"
}
Receiving this instead of a detection payload is a strong signal that you forgot to set webHookFaceRec or webHookLpr.
API Endpoint
- HTTP Method:
POST - Endpoint:
/api/v1/settings/web-hooks/{hookId}/test - Private Server Base URL:
https://10.0.0.123:5022 - Cloud Server Base URL:
https://customername.econnectcloud.com/eventsbridge
Authentication
This API call requires authentication with a JWT token, which must be passed in the header of the request.
Path Parameter
- hookId: The unique ID of the WebHook to test, in GUID/UUID format.
Request Body
None. Send the POST with an empty body.
Code Examples
- C#
- Curl
- PowerShell
using eConnect.EventsBridge.Sdk;
using eConnect.EventsBridge.Sdk.Client;
// Assuming sdk is already initialized with authentication
var hookId = Guid.Parse("e1bce9b4-5589-4d6e-b765-8f446a8a5c10");
// Sends one synthetic detection to the configured postback address and
// reports what your endpoint answered.
var result = await sdk.TestWebHookAsync(hookId);
Console.WriteLine($"Success: {result.Success}");
Console.WriteLine($"Status code: {result.StatusCode}");
Console.WriteLine($"Response time: {result.ResponseTime} ms");
Console.WriteLine($"Message: {result.Message}");
if (!result.Success)
{
// StatusCode is 0 when the request never got an HTTP answer,
// for example a DNS failure, a refused connection or the 10 second timeout.
Console.WriteLine("The receiver did not accept the test payload.");
}
# Define variables
API_URL="https://your-domain.com/eventsbridge"
TOKEN="your_token"
HOOK_ID="e1bce9b4-5589-4d6e-b765-8f446a8a5c10"
# Fire a single synthetic detection at the configured postback address
curl -X POST "$API_URL/api/v1/settings/web-hooks/$HOOK_ID/test" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Length: 0"
# Example output:
# {"success":true,"message":"WebHook test successful. Status: 200 OK","statusCode":200,"responseTime":142.7}
# Define variables
$API_URL = "https://your-domain.com/eventsbridge"
$TOKEN = "your_token"
$HOOK_ID = "e1bce9b4-5589-4d6e-b765-8f446a8a5c10"
# Fire a single synthetic detection at the configured postback address
$result = Invoke-RestMethod -Uri "$API_URL/api/v1/settings/web-hooks/$HOOK_ID/test" -Method Post -Headers @{ "Authorization" = "Bearer $TOKEN" }
Write-Output "Success: $($result.success)"
Write-Output "Status code: $($result.statusCode)"
Write-Output "Response time: $($result.responseTime) ms"
Write-Output "Message: $($result.message)"
if (-not $result.success) {
# statusCode is 0 when the request never got an HTTP answer,
# for example a DNS failure, a refused connection or the 10 second timeout.
Write-Output "The receiver did not accept the test payload."
}
Raw Sample
Here's an example of how to use the POST method to test a WebHook:
Request
POST https://10.0.0.123:5022/api/v1/settings/web-hooks/e1bce9b4-5589-4d6e-b765-8f446a8a5c10/test
Authorization: Bearer <your_jwt_token>
Content-Length: 0
Response
- 200 OK: The test ran. Check
successin the body — a200here means Events Bridge completed the attempt, not that your receiver accepted it. - 400 Bad Request: The WebHook has no
postbackAddressconfigured. The body is still aTestWebHookResult. - 403 Forbidden: The WebHook belongs to another account and you are not an administrator.
- 401 Unauthorized: Missing or invalid JWT token.
- 500 Internal Server Error: An issue occurred on the server side.
Example Response — receiver accepted the payload
{
"success": true,
"message": "WebHook test successful. Status: 200 OK",
"statusCode": 200,
"responseTime": 142.7
}
Example Response — receiver rejected the payload
{
"success": false,
"message": "WebHook test failed. Status: 401 Unauthorized",
"statusCode": 401,
"responseTime": 88.2
}
Example Response — receiver was unreachable
{
"success": false,
"message": "Network error: No such host is known. (myserver.com:443)",
"statusCode": 0,
"responseTime": 0
}
Field Descriptions
- success (Boolean):
trueonly when the receiver answered with a 2xx status code. - message (String): A human-readable summary. On failure this carries the reason — an HTTP status line, a network error, or
"WebHook test timed out after 10 seconds". - statusCode (Integer): The HTTP status code your receiver returned.
0means no HTTP response was received at all — DNS failure, refused connection, TLS rejection, or timeout. Checkmessagefor which. - responseTime (Number): Round-trip time in milliseconds.
Additional Notes
- A
200 OKon this call is not a passing test. The HTTP status describes the call to Events Bridge; the outcome of the postback is in thesuccessfield. Network errors and timeouts are also reported as200 OKwithsuccess: false. - The test ignores
disabledandfilterRules. The payload is posted straight topostbackAddress, so you can validate a hook before enabling it, and a passing test does not prove your filter will select any real events. - The timeout is 10 seconds. A receiver that does slow work inline will fail the test even though it would eventually have succeeded. Acknowledge quickly and process asynchronously.
- A failed test is not retried, regardless of the
resilientandmaxRetryAttemptssettings. Those apply to real detection traffic only. - If the test fails with
statusCode: 0against a private or self-signed endpoint, checkserverPermitSelfSignedCertson the saved configuration.
200TestWebHookAsync returns a TestWebHookResult on 200 and throws EventsBridgeSdkException for every other status. That includes the 400 returned when the WebHook has no postbackAddress — so the result body describing that case is reachable over raw HTTP, but surfaces as an exception through the SDK. Read ex.StatusCode and ex.Response to recover it.
- Confirm the hook exists with Get a WebHook by ID before testing. This endpoint treats an unknown
hookIdas an error rather than returning a clean not-found result.