Using Webhooks

Webhooks can be used to connect APImetrics to external systems

Key Concepts

A webhook is a mechanism for connecting systems together simply. Webhooks can be used to link APImetrics to management and other systems so that data and alerts can easily be pushed to the external systems from APImetrics.

For most webhooks, you will need to enter a key or some other information that is provided to you by the service associated with the webhook. When a condition you set is met within APImetrics, a message will be generated that is pushed to the service by the webhook.

Supported Webhooks

APImetrics supports the following services:

  • Generic
  • Email
  • Email (plain text)
  • BigPanda
  • DataDog Metric
  • DataDog Event
  • Flowdock
  • HipChat
  • New Relic
  • OpsGenie
  • PagerDuty
  • Slack
  • StatusPage
  • VictorOps

If you don't see the service you need in that list, please contact us. It is usually quick and easy for us to add a new webhook.

Example: Slack

You can use webhooks to create alerts for all your APIs or for particular APIs. The Alerts & Webhooks item under the ALERTING section of menu on the left-hand side of the page will take you to the page that allows you to create and edit alerts for all your APIs.


For a particular API, clicking on the Alerts & Webhooks tab will take you to the page that allows you to create and edit alerts for that particular API.


If you have already created alerts, these will be shown on this page and you can edit the alerts.

Click on the +Add New Alert button. From the dropdown, choose the type of webhook you want to create.


Enter a name for the alert. It is important to click on the Enabled button to enable the alert. From the Trigger alerts dropdown, choose the conditions on which you want to trigger the alert. The conditions are Pass, Slow, Warning, Fail. By default, all four are enabled, so you will normally want to turn off (by clicking on the button) at least the Pass trigger otherwise every call by the API will generate an alert.

Note, in negative testing, in which an API is expected to fail, alerting on Pass is appropriate.

For a Slack alert, you will need an API URI and a Channel. These are obtained from your Slack installation.

Save your alert. If you have enabled it, it will now be active and alerts will start appearing through the relevant webhook when the trigger conditions are met.


Email alerts

There are two types of Email alerts. The Email option produces email alerts in HTML. This type of email is more readable in a browser or email program. Email (plain text) option produces email alerts in plain text. This type of email can be easier for some kinds of external systems to ingest.


To prevent a potentially excessive number of email alerts being generated, you can choose the number of failured calls to an API endpoint after which an alert is sent.