Webhooks
The signed body Pluraprint sends to a webhook, how to verify its signature, retries and redelivery, and moving a converted endpoint off the old unsigned body.
A webhook connection sends one HTTPS POST per event to your endpoint. Set one up on
Connections.
The body
{
"id": "6f1c…",
"type": "print_job.finished",
"version": 1,
"timestamp": "2026-11-07T14:02:11.000Z",
"data": { "job": { "id": 412, "name": "Bracket" }, "outcome": "success" }
}
id is the event’s identity: the same on every retry and redelivery, and the same for every
endpoint. A connection set to Summary sends only what the event is about (subjectType,
subjectId, siteId) in data.
Which model ran
With interchangeable models, data.job.printerModel stays
the prepared model. Optional data.job.alsoRunsOn lists other allowed models at the event’s time.
Full signed events print_job.started, print_job.finished and print_job.failed can include
data.execution, as can print_job.cancelled after a start. These facts are frozen with the event.
Field in data.execution | Meaning |
|---|---|
printerModel | Model of the printer that ran the job. |
sliceRole | primary for the prepared file, alternate for another model’s file, or null if the file isn’t confirmed. |
durationSeconds, materialGrams | That file’s estimates, each nullable. |
fileIdentity | verified when the file is confirmed, or unknown when only the start is known. |
Converted unsigned endpoints using full data keep public contract 2 and receive these optional fields:
Field in data.printJob | Meaning |
|---|---|
printerModel | Prepared model. |
alsoRunsOn | Other allowed model identifiers at the event’s time. |
ranOn | Model that ran, from execution.printerModel, as a string. |
slice | {model, estimatedSeconds, materialGrams} for the file that ran, or null when its identity is unknown. |
Signed print_job.finished has data.outcome set to success or failure. V2 keeps
print_job.completed and print_job.failed.
These fields can appear for single-model jobs too. Receivers must accept them. Before-queue automations use the prepared model. For the model that ran, use execution fields in start and finish conditions or templates.
Verifying a request
Requests follow Standard Webhooks. Each carries
webhook-id, webhook-timestamp (Unix seconds) and webhook-signature headers. The signature is
v1, followed by the base64 HMAC-SHA256 of id.timestamp.body, keyed with your signing secret
without its whsec_ prefix (base64-decoded):
import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(secret: string, headers: Headers, body: string) {
const id = headers.get("webhook-id") ?? "";
const timestamp = headers.get("webhook-timestamp") ?? "";
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
const expected = createHmac("sha256", key)
.update(`${id}.${timestamp}.${body}`)
.digest();
return (headers.get("webhook-signature") ?? "")
.split(" ")
.some((part) => {
const [version, value] = part.split(",");
const given = Buffer.from(value ?? "", "base64");
return version === "v1" && given.length === expected.length &&
timingSafeEqual(given, expected);
});
}
Use the raw request body, before any JSON parsing. After you rotate the secret, requests are signed with both the old and the new secret for a while, so either one verifies.
Retries
A request that fails (a network error, a timeout, a 408, 429 or 5xx response) is retried with growing
waits for up to a day, honoring Retry-After. Any other 4xx is not retried. Answer with a
2xx as soon as you have stored the event, and treat id as the key that makes a retry harmless.
Endpoints converted from webhook integrations
The upgrade turned each webhook integration into a connection that still sends the old
unsigned body (public contract 2, with contractVersion), so nothing broke. The review page
lists each one as Unsigned webhook. To move one to signed events, update your endpoint to
accept the body above and verify signatures, then add an event subscription to the connection
(new subscriptions are signed) and delete the old unsigned one. Until then it keeps sending
exactly what the integration did.