Skip to main content

Webhooks

Helix sends a request to your endpoint when one of your articles changes status or stage, so you don't have to poll. Each request is a small notice: which article, and its new status. You then read the article for everything else.

You get events for the articles your service account created. Articles people create in Helix Studio send none.

Studio API webhooks are separate from Event Delivery, the webhook system of Helix's feeds APIs. You don't manage them through Event Delivery's /events endpoints, and an Event Delivery destination receives no Studio events. The two share a signing scheme, so the same verification code works for both.

Getting set up​

Webhooks aren't self-service yet: Helix registers your endpoint for you. Send the endpoint's URL to the Helix team at [email protected], saying which service account it is for and whether it's production or development. They send back the endpoint's signing secret, which starts whsec_. Store it as a secret. You use it to check that each request really came from Helix; see Verifying a webhook.

  • One endpoint per service account. Each service account has one active endpoint, which receives the events for every article that account creates. Development and production are separate environments, so register a development endpoint separately.
  • No backfill. An event goes only to an endpoint that is active when the change happens. Changes made before your endpoint was registered, or while it was switched off, are never sent, and Helix can't replay them. Register the endpoint before you create the articles you want to follow.

The endpoint's URL must:

  • use https on port 443;
  • name a host by DNS name, not by IP address, and every address that name resolves to must be public;
  • carry no user name or password (https://user:pass@…);
  • answer directly: redirects are not followed.

Helix checks the URL when it registers the endpoint and again before every send, because DNS records can change. A send refused by that check counts as a failed attempt (see Answering and retries).

Events​

TypeSent when
writer.article.status.changedThe status or stage changed, short of an ending. Sent again if a person continues an ended article
writer.article.completedThe article finished. Read it for its HTML and review facts
writer.article.failedThe article ended with an error
writer.article.canceledThe article was stopped, by you or by a person in Helix, or deleted before it ended

Helix may add event types. See Answering and retries for how to answer one you don't know.

Some changes behave in ways worth knowing:

  • Deleted articles. An article deleted before it ended sends writer.article.canceled, and then reads 404. An article deleted after it ended sends nothing.
  • Moved articles. An article a person moves to a space your account can't see keeps sending events, but reading it answers 404.
  • Edits. A person's edits to a completed article send no event. If you need them, read the article again and compare its updatedAt.
  • Disabled service accounts. Nothing more is sent. See Disabling a service account.

The request​

Each event is a POST with a CloudEvents JSON body:

POST /your/endpoint HTTP/1.1
content-type: application/cloudevents+json
user-agent: Helix-Webhooks/1.0
webhook-id: 019ab6b0-1111-7222-8333-444455556666
webhook-timestamp: 1795515270
webhook-signature: v1,…
{
"specversion": "1.0",
"type": "writer.article.completed",
"source": "/writer/articles",
"subject": "019ab6a2-5e6f-7a8b-9c0d-2e3f4a5b6c7d",
"id": "019ab6b0-1111-7222-8333-444455556666",
"time": "2026-11-24T10:14:30.000Z",
"datacontenttype": "application/json",
"data": {
"articleId": "019ab6a2-5e6f-7a8b-9c0d-2e3f4a5b6c7d",
"externalId": "4821-edit-1",
"kind": "edited",
"status": "completed",
"stage": null
}
}
FieldMeaning
typeThe event type, from the table above
subjectThe article's ID
idThe event's ID, the same as the webhook-id header. A repeat of an event has the same one
timeWhen the change happened
dataThe article's articleId, your externalId, its kind, and its status and stage at that moment

The example body above is spread over several lines for reading. Real bodies are compact JSON on one line.

Requests don't come from fixed IP addresses, so you can't allow-list them. Check the signature instead: it is the way to know a request came from Helix.

Answering and retries​

Answer every request quickly with any 2xx status, including event types you don't handle or don't recognize. Queue the work and answer; don't make Helix wait while you do it. Helix waits 30 seconds for an answer and reads only its status: the body of your answer is ignored.

Some answers are final, and Helix never sends that event again: 400, 401, 403, 404, 410 and 422. Answer one of these only when you mean it, such as 401 for a request whose signature doesn't verify.

Any other answer (a redirect included), a timeout, no connection, or a URL refused by the check above is retried. Helix makes 9 attempts over about 38 hours: the first within about a minute of the change, the second about a minute later, then 5 minutes, 30 minutes, 2 hours and 5 hours after the attempt before, then three more at 10-hour gaps. Each gap varies by up to 10% either way, and an attempt can run late when Helix is busy. After the ninth, Helix stops trying that event. Read the article to catch up on anything you missed.

Order and repeats​

Events can arrive out of order, and the same event can arrive more than once.

  • Repeats. webhook-id is the same on every delivery of one event. Skip one you've already handled.
  • Order. When two events about one article disagree, keep the one with the later time.
  • When in doubt, read the article with GET /writer/articles/{ref}. The article is always the source of truth.

Catching up after downtime​

If your endpoint was down for longer than the retries last, or Helix stopped trying an event, you have missed events and Helix can't send them again. The list of articles can't help either: it has no filter for recent changes. So keep your own record:

  1. Keep a list of your articles that haven't ended (pending or running).
  2. Also keep the ones that ended recently, say in the last few days. A person in Helix can continue an ended article, and it then runs again.
  3. After an outage, read each article on those lists with GET /writer/articles/{ref}, and update your records from what you read.

Mind the read limit while you do this (see Polling).

Testing your endpoint​

There is no call that sends a test event. To exercise your endpoint, register a development endpoint and create an article in development: it sends writer.article.status.changed once it starts, and an ending event when it ends.

Verifying a webhook​

Check the signature of every request before you trust it. Helix signs with the Standard Webhooks scheme, the same scheme Event Delivery uses, so any Standard Webhooks library can do the check for you. Event Delivery's Signature Verification page lists libraries for Node, Python, Go and Ruby.

Read the body raw. The signature covers the body's exact bytes. The body arrives as application/cloudevents+json, so a JSON body parser set up for application/json won't run on it, and one that does run gives you re-encoded JSON whose bytes differ. Read the raw body, verify it, then parse it.

To do the check yourself:

  1. Read the raw request body exactly as received, before parsing it.
  2. Join webhook-id, webhook-timestamp and the raw body with dots: {webhook-id}.{webhook-timestamp}.{body}.
  3. Take the signing secret without its whsec_ prefix and base64-decode it. That is the key.
  4. Compute HMAC-SHA256 of the joined string with the key, base64-encode it, and put v1, in front.
  5. Compare it, in constant time, with each space-separated value in webhook-signature. One match means the request is genuine.
  6. Reject a request whose webhook-timestamp (in seconds) is more than 5 minutes from your clock, so an old request can't be replayed.

Secret rotation​

To change your endpoint's signing secret, ask the Helix team at [email protected]. Do so at once if the secret may have leaked. Helix adds a new secret and sends it to you. For the next 24 hours it signs with both the old and the new secret: webhook-signature carries two values, and either one verifies. That's why step 5 checks each value. Deploy the new secret within those 24 hours; after them, Helix removes the old one. An endpoint has at most two secrets at a time.

In Node​

This uses the standardwebhooks package with Express. express.raw keeps the body as raw bytes for the check.

const express = require('express');
const { Webhook } = require('standardwebhooks');

const wh = new Webhook(process.env.HELIX_WEBHOOK_SECRET); // the whsec_… secret

const app = express();

app.post('/helix/webhooks', express.raw({ type: 'application/cloudevents+json' }), (req, res) => {
let event;
try {
// Checks the signature and the timestamp; throws if either fails.
event = wh.verify(req.body, req.headers);
} catch {
return res.status(401).end();
}
// Skip a repeat: req.headers['webhook-id'] has been seen before.
// Queue the work, then answer at once. Answer 2xx to any type you don't handle.
res.status(204).end();
});

In PHP​

This function does all six steps. It returns false, and never throws, for anything that doesn't verify.

<?php

declare(strict_types=1);

/**
* Verifies a Helix webhook (Standard Webhooks signing). Pass the raw request body exactly as received, before any JSON
* decoding, and the three webhook-* headers. Returns false, never throws, for anything that doesn't verify.
*
* $secret is the endpoint's signing secret, "whsec_" followed by base64. During a rotation Helix signs with both secrets,
* so the header carries two signatures and either one verifies.
*/
function verifyHelixWebhook(
string $rawBody,
string $webhookId,
string $webhookTimestamp,
string $webhookSignature,
string $secret,
int $toleranceSeconds = 300,
?int $now = null
): bool {
if (!ctype_digit($webhookTimestamp)) {
return false;
}
$now ??= time();
if (abs($now - (int) $webhookTimestamp) > $toleranceSeconds) {
return false;
}

$key = base64_decode(str_starts_with($secret, 'whsec_') ? substr($secret, 6) : $secret, true);
if ($key === false || $key === '') {
return false;
}

$signed = $webhookId . '.' . $webhookTimestamp . '.' . $rawBody;
$expected = 'v1,' . base64_encode(hash_hmac('sha256', $signed, $key, true));

foreach (explode(' ', $webhookSignature) as $candidate) {
if ($candidate !== '' && hash_equals($expected, $candidate)) {
return true;
}
}
return false;
}

In a Laravel controller​

public function __invoke(Request $request)
{
$ok = verifyHelixWebhook(
$request->getContent(),
(string) $request->header('webhook-id'),
(string) $request->header('webhook-timestamp'),
(string) $request->header('webhook-signature'),
config('services.helix.webhook_secret'),
);
if (!$ok) {
abort(401);
}
$event = $request->json()->all();
// Skip a repeat: $request->header('webhook-id') has been seen before.
// Queue the work, then answer at once. Answer 2xx to any type you don't handle.
return response()->noContent();
}

$request->getContent() is the raw body, which is what the signature covers.