ATStatus
ATStatus WikiLoading documentation...

Webhooks

Send notifications to external services via webhooks.

Setup

  1. Go to Admin → Settings → Webhooks
  2. Click Add Webhook
  3. Enter the webhook URL
  4. Select events to trigger
  5. Save

Webhook Events

  • incident.created
  • incident.updated
  • incident.resolved
  • maintenance.scheduled
  • maintenance.started
  • maintenance.completed
  • component.status_changed

Payload Format

{
  "event": "incident.created",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "id": 123,
    "title": "API Performance Issues",
    "status": "investigating",
    "impact": "degraded",
    "message": "We are investigating...",
    "components": [
      { "id": 1, "name": "API" }
    ],
    "url": "https://status.example.com/incidents/123"
  }
}

Integration Examples

Slack

Use Slack's Incoming Webhooks:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXX

Discord

Use Discord webhook URL:

https://discord.com/api/webhooks/000000000/XXXXXX

Microsoft Teams

Use Teams Incoming Webhook connector.

PagerDuty

Use Events API v2 endpoint.

Security

Webhooks include a signature header for verification:

X-Webhook-Signature: sha256=abc123...

Verify the signature using your webhook secret:

const crypto = require('crypto')
const signature = crypto
  .createHmac('sha256', webhookSecret)
  .update(JSON.stringify(payload))
  .digest('hex')

if (signature === receivedSignature) {
  // Valid webhook
}

Retry Logic

Failed webhooks are retried:

  • 3 retry attempts
  • Exponential backoff (1min, 5min, 15min)
  • Webhook disabled after repeated failures

Testing

  1. Go to webhook settings
  2. Click Test Webhook
  3. Check your endpoint received the payload