Bedrud Documentation

Webhooks allow Bedrud to send real-time HTTP callbacks when events occur in your rooms. You can register multiple webhook endpoints, each with its own event subscription and HMAC signing secret.

Access

Webhook management requires superadmin access. Navigate to Settings → Webhooks in the admin dashboard.

Creating a Webhook

  1. Go to Settings → Webhooks in the admin dashboard.
  2. Click Add Webhook.
  3. Enter a Name and the Endpoint URL that will receive the event payloads.
  4. Select the Events to subscribe to.
  5. Optionally provide a custom HMAC Secret (a random secret is generated if omitted).
  6. Click Save.

Event Types

EventTriggered WhenStatus
room.createdA room is createdActive
room.endedA room is closed or becomes idle (all participants left)Active
participant.joinedA participant enters a room (authenticated or guest)Active
recording.completedA recording finishes processing and is storedPlanned (reserved)
pingSent by the admin Test buttonActive

Event names are defined in server/internal/models/webhook.go and validated by the admin API.

Delivery Format

Each delivery is an HTTP POST with JSON body:

{
  "event": "room.ended",
  "timestamp": "2026-04-01T12:34:56Z",
  "data": { }
}
HeaderDescription
Content-Typeapplication/json
X-Bedrud-Signaturesha256=<hmac-hex> of the raw request body
X-Bedrud-EventEvent name (same as event in the body)
X-Bedrud-TimestampISO-8601 UTC timestamp (same as timestamp in the body)

Delivery is single-attempt (no retries). Failures (network, timeout, non-2xx) are logged and soft-failed so room lifecycle operations never block on webhooks. Your endpoint should respond within 10 seconds.

Verifying Webhook Signatures

Verify the signature by computing HMAC-SHA256 of the raw request body using your webhook’s secret:

// Node.js example
const crypto = require('crypto')
 
function verifyWebhook(body, signature, secret) {
  const hmac = crypto.createHmac('sha256', secret)
  hmac.update(body)
  const expected = 'sha256=' + hmac.digest('hex')
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  )
}

Use the X-Bedrud-Signature header value when comparing.

Rotating Secrets

Webhook secrets can be rotated at any time. Rotation immediately invalidates the old secret — update your receiver before rotating to avoid failed verifications.

  1. Navigate to Settings → Webhooks.
  2. Click the Rotate button next to the webhook.
  3. The new secret is displayed once. Copy it and update your receiver.

Testing Webhooks

Use the Test button in the admin dashboard to send a test event. This sends a ping event to verify connectivity. The response includes the HTTP status code your endpoint returned.

Troubleshooting

SymptomLikely CauseFix
Webhook never firesIncorrect event selectionVerify the webhook subscribes to the event type (e.g. room.created)
Signature verification failsWrong header or secretUse X-Bedrud-Signature and the current secret; verify against the raw body
Timeout errorsEndpoint too slowRespond within 10 seconds
Missed events after rotationOld secret still cachedUpdate your receiver before rotating
Events not retried after outageBy designWebhooks are advisory single-attempt deliveries