Start Now

Alerts


Add Alert

Request

POST /alerts

Parameters

NameTypeDescription
namestringRequired -- Name of Alert
upboolAlert when status changes to Up
degradedboolAlert when status changes to Degraded
disruptedboolAlert when status changes to Disrrupted
downboolAlert when status changes to Down
maintenanceboolAlert when status changes to Maintenance
recipientsAlertRecipient[]Array of AlertRecipient (See AlertRecipient parameters)

AlertRecipient Parameters

NameTypeDescription
typestringA string between email | sms | call | slack | discord | webhook
targetstringDestination where the alert will be sent

Request Payload Example

{
  "name": "Alert Name",
  "up": true,
  "degraded": true,
  "disrupted": true,
  "down": true,
  "maintenance": true,
  "recipients":[
    {
      "type":"email",
      "target":"[email protected]"
    }
  ]
}

Request Curl Example

curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer d3d6763224e8f54ee5aeb08202b7eb101d97081876819cb48833d9f892185917" \
-d \
  '{
    "name":"Alert Name",
    "up":true,
    "degraded":true,
    "disrupted":true,
    "down":true,
    "maintenance":true,
    "recipients":[
      {
        "type":"email",
        "target":"[email protected]"
      }
    ]
  }' \
  "https://api.statsignal.dev/v1/alerts"

Response Example

Status: 201 Created

{
  "alert": {
    "uuid": "134309rf82n454198142w20s27814s3h70",
    "name": "Example Alert",
    "up": true,
    "degraded": true,
    "disrupted": true,
    "down": true,
    "maintenance": true,
    "recipients": [
      {
        "uuid": "290354ae8c364025824a96e5659d4c11",
        "type": "email",
        "target": "[email protected]",
        "createdAt": "2023-03-05T16:59:21.146847938-05:00",
        "updatedAt": "2023-03-05T16:59:21.146847938-05:00"
      }
    ],
    "createdAt": "2023-03-05T16:59:21.146847938-05:00"
  }
}
Statsignal - Uptime monitoring and status page | Product Hunt
Statsignal is designed and built by 19 Signals LLC. Copyright ©2021 19 Signals LLC. All rights reserved.