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.
Every payload is signed with your webhook secret. Verify authenticity before processing to prevent spoofed requests.
Failed deliveries retry with exponential backoff: 1 min, 5 min, 30 min, 2 hours, 24 hours. Five attempts total over 24 hours.
Send a test event to verify your setup before going live. Confirm your server handles the payload and signature correctly.
Know the moment your batch screenshot job finishes. No polling loops, no wasted compute.
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"] }
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');
batch.completed fires when a batch screenshot job finishes. More event types are planned.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).Sign up, register a webhook, and start receiving real-time notifications.
Create free account