Webhooks

Get Notified
When It Matters

Register webhook endpoints to receive real-time notifications when batch jobs complete. HMAC-SHA256 signed payloads, automatic retries with exponential backoff, and a built-in test endpoint.

HMAC-SHA256 Signatures

Every payload is signed with your webhook secret. Verify authenticity before processing to prevent spoofed requests.

Automatic Retries

Failed deliveries retry with exponential backoff: 1 min, 5 min, 30 min, 2 hours, 24 hours. Five attempts total over 24 hours.

Test Endpoint

Send a test event to verify your setup before going live. Confirm your server handles the payload and signature correctly.

Batch Completion Events

Know the moment your batch screenshot job finishes. No polling loops, no wasted compute.

Quick Start

Register a Webhook

POST /v1/webhooks
curl -X POST "https://app.snap-render.com/v1/webhooks" \
  -H "X-API-Key: sk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://your-server.com/webhook", "events": ["batch.completed"]}'

# Response includes your webhook secret:
# { "id": "wh_abc123", "secret": "whsec_...", "events": ["batch.completed"] }

Verify the Signature (Node.js)

Signature Verification
import crypto from 'node:crypto';

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

// In your webhook handler:
const isValid = verifyWebhook(rawBody, req.headers['x-webhook-signature'], webhookSecret);
if (!isValid) return res.status(401).send('Invalid signature');

Related Features

Frequently Asked Questions

What events trigger webhooks?
Currently: batch.completed fires when a batch screenshot job finishes. More event types are planned.
How do I verify the webhook signature?
Compare the X-Webhook-Signature header against an HMAC-SHA256 hash of the raw request body using your webhook secret (the whsec_ value returned when you registered the webhook).
What happens if my server is down?
SnapRender retries with exponential backoff: 1 minute, 5 minutes, 30 minutes, 2 hours, then 24 hours. Five attempts total.
Can I have multiple webhooks?
Yes. Register as many endpoints as you need for different events or services.

Never Miss an Event

Sign up, register a webhook, and start receiving real-time notifications.

Create free account