Register a Webhook

Register a new webhook to receive notifications for monitoring alerts

Allows you to register a new webhook to receive notifications for monitoring alerts. This can include Breach, Identity, and BIN Monitoring alerts.

POSThttps://api.enzoic.com/v1/webhooks
Authorization
Body
url*string

The URL of the webhook to send alerts to when a match is found.

Example: "https://mywebhook.com"
defaultboolean

If true, this webhook will be used as the default for all new monitoring requests which do not specify a webhook. This will automatically override any existing default webhook. The first webhook created on an account automatically becomes the default.

Example: false
Response

The call was successful and the webhook is now available for use on your account.

Body
webhookIDstring

The ID of the webhook.

Example: "5a3ae05132ffb96e664d4626"
urlstring

The URL of the webhook.

Example: "https://mywebhook.com"
keystring

The key for the webhook. This is passed to the webhook as the username using basic authentication, so that you may verify Enzoic is the caller.

Example: "51000000000000000000000000000000"
secretstring

The secret for the webhook. This is passed to the webhook as the password using basic authentication, so that you may verify Enzoic is the caller.

Example: "51000000000000000000000000000000"
defaultboolean

If true, this webhook is the default webhook for the account.

Example: false
Request
const response = await fetch('https://api.enzoic.com/v1/webhooks', {
    method: 'POST',
    headers: {
      "Authorization": "basic <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "url": "https://mywebhook.com"
    }),
});
const data = await response.json();
Response
{
  "webhookID": "5a3ae05132ffb96e664d4626",
  "url": "https://mywebhook.com",
  "key": "51000000000000000000000000000000",
  "secret": "51000000000000000000000000000000",
  "default": false
}

Last updated