Skip to main content

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:

webHookFaceRecwebHookLprPayload sent
trueanyA full WebHookFaceRecPayload
falsetrueA full WebHookLprPayload
falsefalseA 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

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.");
}

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 success in the body — a 200 here means Events Bridge completed the attempt, not that your receiver accepted it.
  • 400 Bad Request: The WebHook has no postbackAddress configured. The body is still a TestWebHookResult.
  • 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): true only 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. 0 means no HTTP response was received at all — DNS failure, refused connection, TLS rejection, or timeout. Check message for which.
  • responseTime (Number): Round-trip time in milliseconds.

Additional Notes

  • A 200 OK on this call is not a passing test. The HTTP status describes the call to Events Bridge; the outcome of the postback is in the success field. Network errors and timeouts are also reported as 200 OK with success: false.
  • The test ignores disabled and filterRules. The payload is posted straight to postbackAddress, 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 resilient and maxRetryAttempts settings. Those apply to real detection traffic only.
  • If the test fails with statusCode: 0 against a private or self-signed endpoint, check serverPermitSelfSignedCerts on the saved configuration.
The .NET SDK only returns a result for 200

TestWebHookAsync 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 hookId as an error rather than returning a clean not-found result.