Core ConceptsIntegrations
Core Concepts

Integrations and Webhooks

Connect Bifroster with third-party services to enhance your setup. This section covers popular integrations and webhook configurations for advanced functionality.

curl -X POST https://api.example.com/v1/signals \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Signal",
    "threshold": 0.95
  }'
{
  "signals": [
    {
      "id": "sig_123",
      "name": "Production Signal",
      "threshold": 0.95,
      "status": "active"
    }
  ]
}

Overview

Integrate Bifroster with your favorite tools to automate workflows and extend functionality. You can connect to no-code platforms like Zapier, communication apps like Slack, or build custom solutions using webhooks and the Bifroster API at https://api.example.com.

Review your integration's security requirements before connecting. Always use HTTPS endpoints and validate payloads.

Bifroster supports seamless connections with popular services. Choose from pre-built integrations or use webhooks for custom setups.

Setting Up Webhooks

Create webhooks to receive event notifications from Bifroster. Follow these steps to configure one.

Navigate to Integrations

Log in to your Bifroster dashboard at https://dashboard.example.com. Go to Settings > Integrations > Webhooks.

Create Webhook

Click New Webhook. Enter your endpoint URL, such as https://your-webhook-url.com/bifroster.

Select Events

Choose events like signal.created or signal.updated. Enable payload signing for security.

Test and Save

Send a test payload and verify receipt. Save the webhook.

Handling Webhook Payloads

Process incoming webhooks securely. Verify signatures and parse the JSON payload.

const crypto = require('crypto');
const express = require('express');
const app = express();

app.use(express.raw({ type: 'application/json' }));

app.post('/bifroster', (req, res) => {
  const signature = req.headers['x-bifroster-signature'];
  const secret = 'YOUR_WEBHOOK_SECRET';
  const hash = crypto.createHmac('sha256', secret).update(req.body).digest('hex');
  const expected = `sha256=${hash}`;

  if (signature === expected) {
    const payload = JSON.parse(req.body);
    console.log('Event:', payload.event);
    res.status(200).send('OK');
  } else {
    res.status(401).send('Unauthorized');
  }
});

Custom API Connections

Build deeper integrations using the Bifroster REST API. Use Tabs below for common scenarios.

Send a POST request to create a new signal.

Best Practices

  • Use webhook signatures to prevent spoofing. Compare X-Bifroster-Signature with HMAC-SHA256 of the payload using your secret.
  • Rotate secrets regularly via the dashboard.
  • Limit webhook permissions to specific events.

Monitor integration logs in your Bifroster dashboard for troubleshooting. Test webhooks thoroughly in staging before production.