Skip to main content

Create a New WebHook Template

The Create New WebHook API returns a blank WebHookInfoItem pre-filled with a fresh hookId and the server's default delivery settings. Use it as the starting point when your system does not already have a hookId to work with.

This call does not create anything on the server. Nothing is stored until you send the completed item back with Create or Update a WebHook.

You can generate the hookId yourself

The hookId is an ordinary GUID/UUID. If your system can generate one, you can skip this call entirely and go straight to a PUT. This endpoint exists as a convenience, and because it shows you the server's current defaults.

API Endpoint

  • HTTP Method: GET
  • Endpoint: /api/v1/settings/web-hooks/new
  • 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.

Code Examples

using eConnect.EventsBridge.Sdk;
using eConnect.EventsBridge.Sdk.Client;

// Assuming sdk is already initialized with authentication

// Ask the server for a blank WebHook template.
// Nothing is stored yet - this only hands back a fresh HookId and safe defaults.
var template = await sdk.WebHooksCreateNewAsync();

Console.WriteLine($"New HookId: {template.HookId}");
Console.WriteLine($"Owner: {template.HookOwnerUserName}");
Console.WriteLine($"Disabled: {template.Disabled}"); // true - the hook will not fire until you clear this

// Persist template.HookId in your own system. You need it for every
// subsequent save, test and delete call.

Raw Sample

Here's an example of how to use the GET method to request a new WebHook template:

Request

GET https://10.0.0.123:5022/api/v1/settings/web-hooks/new
Authorization: Bearer <your_jwt_token>

Response

  • 200 OK: A new template was generated.
  • 401 Unauthorized: Missing or invalid JWT token.
  • 500 Internal Server Error: An issue occurred on the server side.

Example Response

{
"webHookName": "New WebHook",
"disabled": true,
"filterRules": "Expected",
"specificTags": [],
"hookId": "e1bce9b4-5589-4d6e-b765-8f446a8a5c10",
"hookOwnerUserName": "partner-user",
"postbackAddress": "",
"resilient": false,
"authBasicPasswordEncrypted": "",
"authBasicPasswordDecrypted": null,
"serverPermitSelfSignedCerts": true,
"authBasicUserName": "",
"headerKey": null,
"headerValue": null,
"webHookFaceRec": false,
"webHookLpr": false,
"maxRetryAttempts": 0,
"retryIntervalMs": 1000,
"useExponentialBackoff": false
}

Field Descriptions

The template returns the complete WebHookInfoItem schema. Every field is documented on the Create or Update a WebHook page. The values that matter most on a freshly generated template are:

  • hookId: A newly generated GUID. Persist this value. Every later save, test and delete call is addressed by this id.
  • hookOwnerUserName: Set to the account that made the request.
  • disabled: Returned as true. A disabled hook is stored but never delivers events.
  • webHookName: Returned as the placeholder "New WebHook".
  • resilient: Returned as false, and maxRetryAttempts as 0 — fire-and-forget delivery.
  • webHookFaceRec and webHookLpr: Both returned as false.

Additional Notes

The template is not ready to receive events as-is

Three of the defaults will stop a hook from ever firing, so change all three before saving:

  1. disabled is true — set it to false.
  2. webHookFaceRec and webHookLpr are both false — enable at least one.
  3. postbackAddress is empty — set it to your receiver URL.
  • Call this endpoint once per WebHook, not once per update. Calling it on every run and saving the result registers a brand new hook each time, leaving orphaned registrations behind. Store the hookId and reuse it — see Automating WebHook Setup.
  • The hookId must not be an empty GUID (00000000-0000-0000-0000-000000000000).