Publish articles with a webhook

Last updated December 3, 2026

Ultrascale researches and writes SEO articles for your site. With a webhook, your own server publishes them: when an article's day comes, Ultrascale sends it to an address on your server, and your code puts it on your blog. It works with any stack, a custom CMS, a headless CMS or a site built from a database.

There is 1 event, article.published. Each one is signed with a secret only you and Ultrascale know, so your server can tell it came from us.

Set it up

  1. In Ultrascale, open Settings, Website, and pick Webhook.
  2. Enter your endpoint's URL, like https://acme.com/api/ultrascale. It has to be https and reachable from the internet.
  3. Copy the signing secret (whsec_...) and save it on your server, for example as ULTRASCALE_WEBHOOK_SECRET. You can also paste a token of your own.
  4. Pick how your site takes the article's text: HTML (it comes as contentHtml) or Markdown (contentMarkdown). Only the one you pick is sent.
  5. Press Test and connect. Ultrascale sends a test event to your endpoint and connects it only if your server answers with a 2xx. You see the request and your server's answer either way.
Settings, Website, Webhook: the endpoint URL, the signing secret and the article's format

When your server refuses the test event, you see its answer and why, so you know what to fix:

A test event your server refused with 401, and what to check

Once connected, Send test event sends a new test whenever you want to check it:

The connected webhook, and a test event your server took

The request

A POST with a JSON body and these headers:

HeaderWhat it is
Content-Typeapplication/json
User-AgentUltrascale-Webhook/1.0
AuthorizationBearer <your secret>
X-Ultrascale-Eventarticle.published
X-Ultrascale-DeliveryThe delivery's id, like evt_k17f3m9q2x8h4n6p. The same on every retry of it
X-Ultrascale-Signaturet=<unix seconds>,v1=<signature>, see below

The body

json
{
  "event": "article.published",
  "id": "evt_k17f3m9q2x8h4n6p",
  "createdAt": "2026-12-03T09:00:04.000Z",
  "isTest": false,
  "data": {
    "article": {
      "id": "k17f3m9q2x8h4n6p",
      "title": "How to choose a CRM for a 10-person sales team",
      "slug": "choose-crm-small-sales-team",
      "seoTitle": "How to Choose a CRM for a Small Sales Team (2026)",
      "description": "What to compare, what to skip and the 5 questions that pick the right CRM for a team of 10.",
      "contentHtml": "<p>A CRM a team of 10 uses every day...</p>\n<h2>What to compare</h2>\n<p>...</p>",
      "coverUrl": "https://files.ultrascale.io/acme.com/choose-crm-small-sales-team.png",
      "coverAlt": "How to choose a CRM for a 10-person sales team",
      "keywords": ["crm for small sales team"],
      "publishedAt": "2026-12-03T09:00:00.000Z",
      "isUpdate": false
    },
    "project": { "host": "acme.com" }
  }
}
FieldWhat it is
idThe delivery's id, the same as X-Ultrascale-Delivery. Store it to skip a retry you already took
isTesttrue for a test event. Check it and answer, but don't publish it
article.idThe article's id in Ultrascale
article.titleThe title to show on the page, as its <h1>
article.slugThe address the article should have, like /blog/choose-crm-small-sales-team
article.seoTitleThe <title> tag. Falls back to the title
article.descriptionThe meta description, up to 300 characters. Can be null
article.contentHtmlThe article's text as HTML, without the title. Sent when you picked HTML
article.contentMarkdownThe article's text as Markdown, without the title. Sent instead of contentHtml when you picked Markdown
article.coverUrlThe cover image, 1200x630, also good as the og:image. Can be null
article.coverAltThe cover's alt text
article.keywordsThe search query the article targets
article.publishedAtWhen it goes out, ISO 8601 in UTC
article.isUpdatetrue when this is a new version of an article that is already out: update the post with this slug instead of making a new one
project.hostThe site the article is for

The cover is hosted by Ultrascale (or in your own S3 bucket, if you connected one). Copy it to your own storage if your site serves images only from there.

Check that it came from Ultrascale

The simple check: the Authorization header is Bearer followed by your secret.

The safer check is the signature. X-Ultrascale-Signature holds t, the time it was signed in Unix seconds, and v1, the HMAC-SHA256 of <t>.<raw body> with your secret as the key, in hex. To check it:

  1. Read the raw body as it arrived, before parsing the JSON.
  2. Compute the HMAC-SHA256 of t, a dot, and the raw body, with your whole secret (whsec_ included) as the key.
  3. Compare it with v1 in constant time.
  4. Refuse a t more than 5 minutes away from your clock, so an old request can't be sent again.

A receiver that does it, makes the post and answers with its address:

import crypto from "node:crypto";
import express from "express";

const app = express();

function isFromUltrascale(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(",").map((part) => part.split("=")));
  const timestamp = Number(parts.t);
  if (!timestamp || Math.abs(Date.now() / 1000 - timestamp) > 300) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest();
  const given = Buffer.from(parts.v1 ?? "", "hex");
  return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}

app.post("/api/ultrascale", express.raw({ type: "application/json" }), async (req, res) => {
  const rawBody = req.body.toString("utf8");
  const signature = req.get("X-Ultrascale-Signature") ?? "";
  if (!isFromUltrascale(rawBody, signature, process.env.ULTRASCALE_WEBHOOK_SECRET)) {
    return res.status(401).json({ error: "Bad signature" });
  }
  const { event, isTest, data } = JSON.parse(rawBody);
  if (event !== "article.published") return res.sendStatus(204);
  if (isTest) return res.json({ ok: true });
  // Make the post, or update the one with this slug
  const post = await savePost(data.article);
  res.json({ url: `https://acme.com/blog/${post.slug}` });
});

Answer

  • Any 2xx within 20 seconds means the article is in. Do the slow work after you answer, or in a queue.
  • Answer {"url": "https://..."} with the post's address, and Ultrascale links the article to it: in the app, in reports, and for indexing.
  • A 5xx, a 408, a 429 or no answer is tried again, up to 3 tries in all, with the same X-Ultrascale-Delivery. Skip one you already took.
  • Any other 4xx is not tried again. The article waits in Ultrascale with your server's answer, until you fix it and press Try again.
  • A redirect is not followed. Use the address it redirects to.

Updates

When an article that is already out is refreshed (a new title, description or text, to climb in Google), Ultrascale sends article.published again with the same slug and "isUpdate": true. Update the post at that slug and keep its address. Keep its date and cover too, unless you want them to change.

Questions

Can I use the same endpoint for several sites? Yes. project.host says which site the article is for. Each project in Ultrascale has its own secret.

Can I change the URL, the secret or the format later? Yes: Change on the connected webhook. Leave the secret empty to keep the one you have.

What if my endpoint isn't live yet? Press Save without the test after the first test fails. Send a test event once it is up.

When is an article sent? When you press Publish on it in Ultrascale, or on its day, once you approved it, if your project publishes on its own.