Overview

Aevum News Webhooks allow you to subscribe to real-time news events. When a story is published, edited, or a breaking news alert is triggered, we send an HTTP POST request to your configured endpoint with the event payload.

โ„น๏ธ Base URL

All webhook events are delivered to https://webhooks.aevum.news/v2/ with your unique webhook ID appended.

How It Works

You create a webhook subscription by specifying a callback URL and one or more event types to subscribe to. Aevum News will then POST JSON payloads to your URL whenever the corresponding events occur.

๐Ÿ“ฐ

story.published

Fired when a new story goes live across any category or region.

โšก

breaking.alert

Fired when a breaking news alert is issued by our editorial team.

โœ๏ธ

story.updated

Fired when a previously published story is edited or updated.

๐Ÿท๏ธ

topic.trending

Fired when a topic or keyword enters trending status.

Quick Start

Get up and running in under 3 minutes. Create your first webhook subscription and receive test events immediately.

Step 1: Generate Your API Key

Navigate to your Aevum News Developer Dashboard and generate an API key under Settings โ†’ API Keys.

Your Webhook Secret whsk_live_a8f3k29d...x7m2p

Step 2: Create a Webhook Endpoint

Set up a POST endpoint on your server that can receive and process JSON payloads. Here's a minimal Node.js example:

Node.js
const express = require('express');
const crypto = require('crypto');

const app = express();
const WEBHOOK_SECRET = process.env.AEVUM_WEBHOOK_SECRET;

app.post('/webhook/aevum', async (req, res) => {
  // Verify signature
  const sig = req.headers['x-aevum-signature'];
  if (!verifySignature(req.body, sig)) {
    return res.status(401).send('Invalid signature');
  }

  const event = req.body;
  console.log(`Received: ${event.type}`);

  switch (event.type) {
    case 'story.published':
      await handleStoryPublished(event.data);
      break;
    case 'breaking.alert':
      await handleBreakingAlert(event.data);
      break;
    default:
      console.warn(`Unhandled event type: ${event.type}`);
  }

  res.status(200).json({ received: true });
});

// Verify webhook signature
function verifySignature(payload, signature) {
  const hmac = crypto.createHmac('sha256', WEBHOOK_SECRET);
  const digest = hmac.update(payload).digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(`sha256=${digest}`)
  );
}

app.listen(3000, () => {
  console.log('Webhook server running on port 3000');
});

Step 3: Register Your Webhook

Use the API to register your endpoint with Aevum News:

cURL
curl -X POST https://webhooks.aevum.news/v2/webhooks \
  -H