Custom Webhook Integration

Connect WinSearch to any platform by configuring a custom webhook endpoint. Perfect for proprietary systems or unsupported CMS platforms.

How It Works

When you publish content from WinSearch, we send a POST request to your webhook URL with the article data. You handle the request on your end to store or publish the content.

1Set Up Your Endpoint

Create an endpoint on your server that accepts POST requests. Your endpoint should:

2Configure in WinSearch

  1. Open WinSearch and go to Settings → Integrations
  2. Click Add Custom Webhook
  3. Enter your webhook URL
  4. Add optional headers (for authentication)
  5. Click Test Connection
  6. Click Save

Webhook Payload

WinSearch sends a JSON payload with the following structure:

{
  "event": "article.publish",
  "timestamp": "2025-12-09T10:30:00Z",
  "article": {
    "id": "abc123",
    "title": "Article Title",
    "slug": "article-title",
    "content": "<p>HTML content...</p>",
    "content_plain": "Plain text content...",
    "meta_description": "SEO meta description",
    "featured_image": "https://...",
    "author": "Author Name",
    "status": "published",
    "created_at": "2025-12-09T10:00:00Z",
    "updated_at": "2025-12-09T10:30:00Z"
  }
}

Authentication

You can secure your webhook in several ways:

Header Authentication

Add a custom header with a secret token:

X-WinSearch-Secret: your-secret-token

Signature Verification

We include an HMAC signature in the X-WinSearch-Signature header. Verify it using your webhook secret:

// Node.js example
const crypto = require('crypto');

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

Tip: Always verify the signature in production to ensure requests are genuinely from WinSearch.

Retry Policy

If your endpoint returns an error, we retry:

Testing

Use the Test Connection button to send a test payload to your endpoint. Check your server logs to verify receipt.