Webhooks
Subscribe to Webhook
Request
POST /webhooks
Body Parameters
| Name | Type | Description | 
|---|
topic | string | Required -- Name of the topic to subscribe | 
url | string | Required -- URL where the webhook subscription should send the POST request when the event occurs | 
Request Payload Example
{
  "topic": "monitors/status_change",
  "url": "https://report.example.com/status_change"
}
Request Curl Example
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer d3d6763224e8f54ee5aeb08202b7eb101d97081876819cb48833d9f892185917" \
-d \
  '{
    "topic":"monitors/status_change",
    "url":"https://report.example.com/status_change"
  }' \
"https://api.statsignal.dev/v1/webhooks"
Response Example
Status: 201 Created
{
  "webhook": {
    "uuid": "b7335e08-b376-42a4-a04f-5c871a1c75ac",
    "topic": "monitors/status_change",
    "url": "https://report.example.com/status_change",
    "createdAt": "2021-05-09T04:38:42.09448Z"
  }
}