room.response and reviews.approvals.created lets your app post factory replies into your help desk the instant they arrive and alert a support lead the moment a refund needs sign-off.
Event topics
A Subscription delivers every topic you subscribe to across all Rooms of the factory. In topic names,reviews.* refers to Reviews waiting on human input (questions, tool approvals, or app connections).
Events submitted with
delivery: "context" never trigger webhooks, and a steer Event arriving while a Room is already working does not emit a duplicate room.status transition. See Which webhooks an Event causes.
Create a Subscription
Create and manage Subscriptions either through the Factory API or in the Worklayer web app—both manage the same underlying resource.- API
- Web app
secret returned in the 201 Created response immediately—Worklayer displays it only once. See the Subscriptions API reference for list, update, delete, and rotation routes.Endpoint URL requirements
Your destination URL must be a publicly reachablehttps:// URL up to 2,048 characters long:
- No embedded username, password, or
#fragment. - Cannot target
localhost,*.localhost, or private/reserved IP ranges (including hostnames that resolve to private or reserved IPs).
webhook.test events, and inspecting delivery attempt logs are available in the Worklayer web app.
Webhook payload
Every delivery uses a consistent envelope:id— unique event identifier.environmentId— the ID of your factory.data— topic-specific payload (linked from each topic in the table above).
Signing
Worklayer signs every webhook using the Standard Webhooks specification and includes three headers:
Always verify the signature against the raw request body before parsing or acting on the payload:
Node.js
- Strip the
whsec_prefix from your secret and base64-decode the remainder to get the raw HMAC key. - Construct the signed string:
{webhook-id}.{webhook-timestamp}.{rawBody}. - Compute the base64-encoded HMAC-SHA256 digest.
- Compare in constant time against every
v1,entry inwebhook-signature. Accept the request if any signature matches.
Rotate the secret
Rotate a Subscription’s signing secret via Rotate the signing secret or the web app. The new secret is returned only once in that response. For 24 hours after rotation, Worklayer dual-signs every delivery with both the new secret and the immediately preceding secret (webhook-signature contains both space-separated signatures). Your handler should accept a webhook if any signature matches. Only one previous secret stays active—rotating a second time within 24 hours invalidates the oldest secret immediately.
Retries
Respond with any2xx status within 10 seconds to acknowledge delivery. Offload heavy processing to a background queue after responding.
Worklayer retries automatically on timeouts (> 10s), network errors, and 408, 425, 429, or 5xx responses using exponential backoff:
If attempt 7 fails, delivery stops permanently. Other non-
2xx responses (such as 400 or 3xx redirects) fail immediately without retrying. Updating a Subscription’s URL, disabling it, or deleting it cancels any pending retries. Worklayer retains webhook event logs for 30 days.
Deduplication and ordering
- At-least-once delivery: retries can occasionally deliver the same event twice. Deduplicate using
webhook-id. - Out-of-order arrivals:
room.statusandworker.statuspayloads includeactorRevisionandrevision. To ensure stale updates never overwrite newer state, compareactorRevisionfirst (higher is newer), thenrevisionwhenactorRevisionvalues match.
Subscription API reference
Create, update, rotate, and delete Subscriptions via HTTP.
Review
Handle approval, question, and connect-app webhooks end to end.