Async & Automation

Webhooks & HMAC Verification

Receive real-time event notifications when asynchronous jobs complete or fail. Every delivery includes an HMAC-SHA256 signature to prevent spoofing and replay attacks.

Supported Events

job.completed
Fired when all items in an asynchronous batch job have finished.
job.failed
Fired when all attempts of a job have permanently failed.

Verifying Signatures

RenderNest signs all webhook HTTP requests using your endpoint signing secret (whsec_...). The signature is passed in the X-RenderNest-Signature header in the format t=timestamp,v1=signature.

Signature Verification Example (Node.js)javascript
import crypto from 'crypto';

export function verifyRenderNestSignature(rawBody, signatureHeader, secret) {
  const parts = Object.fromEntries(
    signatureHeader.split(',').map((p) => p.split('='))
  );

  const timestamp = parts.t;
  const signature = parts.v1;

  // Prevent replay attacks (tolerance: 5 minutes)
  const age = Math.floor(Date.now() / 1000) - parseInt(timestamp, 10);
  if (age > 300) {
    throw new Error('Webhook timestamp too old');
  }

  const payload = `${timestamp}.${rawBody}`;
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');

  return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}

Payload Structure

Webhook Event Payloadjson
{
  "event": "job.completed",
  "job_id": "clz19x0abc001",
  "request_id": "req_clz19x0abc001",
  "timestamp": "2026-09-04T04:10:04.000Z",
  "data": {
    "operation": "extract/markdown",
    "total": 3,
    "completed": 3,
    "failed": 0,
    "results": [...]
  }
}