Skip to main content

Use case: Create an alert with an outgoing webhook

This guide demonstrates how to create an alert that sends notifications through an outgoing webhook (e.g., Slack) using the REST API. The flow involves:
  1. Creating a webhook integration
  2. Testing the webhook
  3. Listing webhooks to retrieve integrationId
  4. Creating the alert definition

Steps

  1. Create a webhook integration
POST /v1/outgoing-webhooks Create a new webhook integration to send notifications to Slack. The current webhook configuration enables notifications about error and critical logs, spike anomalies, and data usage. The alert message is also configured to include a snapshot of metric data.

Supported webhook types

Request body

  1. Test outgoing webhook
POST /v1/outgoing-webhooks/test To validate the webhook configuration, send a test request.

Request body

Same as the create payload above.

Successful response

  1. Retrieve webhook integration ID
GET /v1/outgoing-webhooks/all Use the List Outgoing Webhooks API to retrieve the list of available integrations. From the response, extract the externalId of the webhook you just created—this will be used as integrationId in the alert definition. Sample response
  1. Create an alert with the webhook
POST /v3/alert-defs Now that you have the integrationId, you can define an alert and specify the webhook as a notification destination.

Summary