Integration Guide

Webhook Integration

Connect your website or custom CMS with SEO Ladders using our webhook integration. Receive articles directly to your server as soon as they're generated.

Setting Up Your Webhook

Webhook URL

The HTTPS endpoint where you want to receive article data. Must be publicly accessible.

HTTP Method

POST (default) or PUT. Choose based on your API design and how you handle incoming articles.

Secret Token

Auto-generated token to verify requests are from SEO Ladders. Sent as the X-Webhook-Secret header.

Include HTML

Option to receive HTML-formatted content alongside Markdown. Enable if your CMS uses HTML.

Implementing Webhook Secret Verification

Always verify the X-Webhook-Secret header to ensure requests are genuinely from SEO Ladders. Here are examples in popular languages:

server.js
const express = require('express');
const app = express();

// Store your secret token securely (e.g., environment variable)
const WEBHOOK_SECRET = process.env.WEBHOOK_SECRET;

function validateWebhookSecret(req) {
  const receivedSecret = req.headers['x-webhook-secret'];
  return receivedSecret === WEBHOOK_SECRET;
}

app.post('/webhook/seo-ladders', express.json(), (req, res) => {
  // Verify the request is from SEO Ladders
  if (!validateWebhookSecret(req)) {
    return res.status(401).json({ error: 'Invalid webhook secret' });
  }

  // Process the webhook payload
  const { title, content_markdown, slug, meta_description } = req.body;
  console.log('Received article:', title);

  // Your logic here: save to database, trigger build, etc.

  res.status(200).json({ message: 'Webhook processed successfully' });
});

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

Publish Articles Event

When an article is published, we send a POST request to your webhook endpoint with the following payload:

FieldTypeDescription
idstringUnique identifier for the article
titlestringThe article title
slugstringURL-friendly version of the title
meta_descriptionstringSEO meta description
content_markdownstringArticle content in Markdown format
content_htmlstringArticle content in HTML format (if enabled)
keywordstringTarget SEO keyword
article_typestringType of article (e.g., "Explainer", "Guide: How-to", "Listicle")
word_countnumberTotal word count
reading_timenumberEstimated reading time in minutes
featured_imageobjectFeatured image data (url, alt)
json_ldobjectStructured data for SEO
created_atstringCreation timestamp (ISO 8601)
generated_atstringGeneration timestamp (ISO 8601)

Example Payload

payload.json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "How to Implement Webhooks",
  "slug": "how-to-implement-webhooks",
  "meta_description": "Learn how to implement webhooks in your application with this comprehensive guide.",
  "content_markdown": "# How to Implement Webhooks\n\nWebhooks are powerful...",
  "content_html": "<h1>How to Implement Webhooks</h1><p>Webhooks are powerful...</p>",
  "keyword": "implement webhooks",
  "article_type": "Guide: How-to",
  "word_count": 1847,
  "reading_time": 9,
  "featured_image": {
    "url": "https://storage.example.com/images/webhook-guide.jpg",
    "alt": "How to Implement Webhooks"
  },
  "json_ld": {
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "How to Implement Webhooks"
  },
  "created_at": "2026-01-31T12:00:00.000Z",
  "generated_at": "2026-01-31T14:30:00.000Z"
}

Testing Your Webhook

  1. 1Navigate to Settings > CMS Integration in your dashboard
  2. 2Select "Custom Webhook" as your CMS type
  3. 3Enter your webhook endpoint URL
  4. 4Copy the auto-generated Secret Token
  5. 5Click Test Connection to verify connectivity
  6. 6Publish an article to test the full flow
  7. 7Check your server logs to verify the webhook was received

Best Practices

  • Always verify the X-Webhook-Secret header to ensure requests are genuine
  • Implement proper error handling and logging in your webhook receiver
  • Set up monitoring for your webhook endpoint to ensure it's always available
  • Consider implementing a retry mechanism for failed webhook deliveries
  • Use HTTPS for your webhook endpoint (required in production)
  • Respond quickly (within 30 seconds) to avoid timeout errors
  • Store received articles idempotently using the id field to prevent duplicates

SEO Implementation Guide

The webhook payload includes SEO-optimized fields. Here's how to use them to maximize your search engine visibility:

FieldHow to UseSEO Benefit
featured_imagePlace at the top of your article contentIncreases engagement, improves social sharing, and helps with image search rankings
json_ldInject as <script type="application/ld+json"> in <head> or end of <body>Enables rich snippets in Google (star ratings, FAQ dropdowns, article info). Can increase CTR by 20-30%
meta_descriptionSet as <meta name="description"> in your <head>Controls the snippet shown in search results. Well-written descriptions improve click-through rates
slugUse as the URL path for the articleClean, keyword-rich URLs are easier to read and can improve rankings

Example Implementation

seo-helpers.js
function buildArticleHtml(payload) {
  let html = '';

  // 1. Featured Image at the top (improves engagement & SEO)
  if (payload.featured_image?.url) {
    html += '<figure class="featured-image">' +
      '<img src="' + payload.featured_image.url + '" ' +
      'alt="' + (payload.featured_image.alt || payload.title) + '" />' +
      '</figure>\n\n';
  }

  // 2. Article content
  html += payload.content_html || convertMarkdownToHtml(payload.content_markdown);

  // 3. JSON-LD structured data at the end
  if (payload.json_ld) {
    html += '\n\n<script type="application/ld+json">\n' +
      JSON.stringify(payload.json_ld, null, 2) +
      '\n</script>';
  }

  return html;
}

// For your HTML <head> section:
function buildMetaTags(payload) {
  return '<meta name="description" content="' + payload.meta_description + '" />' +
    '<meta property="og:title" content="' + payload.title + '" />' +
    '<meta property="og:description" content="' + payload.meta_description + '" />' +
    '<meta property="og:image" content="' + (payload.featured_image?.url || '') + '" />';
}

Why This Matters

  • JSON-LD structured data enables rich snippets in Google (FAQ dropdowns, article info, star ratings) which can increase click-through rates by 20-30%.
  • Featured images at the top of content improve user engagement and are used for social media previews and Google Discover.
  • Meta descriptions control how your article appears in search results, directly impacting whether users click.

Troubleshooting

Ready to Get Started?

Set up your webhook integration in minutes and start receiving AI-generated articles directly to your platform.