Webhooks

Real-time event notifications for your application

Overview

Webhooks allow you to receive real-time notifications when events occur in your DarkAura account. Configure webhook endpoints to receive HTTP POST requests with event data.

Setting Up Webhooks

  1. 1Go to your Dashboard → Settings → Webhooks
  2. 2Click "Add Endpoint" and enter your webhook URL
  3. 3Select the events you want to subscribe to
  4. 4Copy your webhook secret for signature verification

Available Events

server.createdA new server was created
server.updatedServer settings were modified
server.deletedA server was deleted
plugin.installedA plugin was installed
bot.startedA bot started running
payment.completedPayment was successful

Webhook Payload Example

{
  "id": "evt_123456789",
  "type": "server.created",
  "created": 1704067200,
  "data": {
    "server_id": "srv_abc123",
    "name": "Production Server",
    "region": "us-east-1"
  }
}

Verifying Signatures

import crypto from 'crypto'

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex')
  
  return signature === expected
}