Skip to main content
Webhooks let you receive automatic POST notifications when screenshot events occur, instead of polling the API.

How it works

  1. Configure a webhook endpoint in your dashboard
  2. Screenshotly sends a POST request to your URL when events occur
  3. Your server processes the event and responds with a 2xx status code

Event types

Webhook payload

When an event occurs, Screenshotly sends a POST request with a JSON body:
For screenshot.failed events, an error field is included:

Webhook headers

Each webhook delivery includes these headers:

Signature verification

Every webhook delivery is signed using your webhook’s secret key with HMAC-SHA256. Verify the signature to ensure the request is from Screenshotly:

Handling webhooks

Here’s a complete Express.js handler with signature verification:

Retry behavior

If your webhook endpoint returns a non-2xx status code or times out (10 second limit), Screenshotly retries delivery with exponential backoff. You can configure retry policies in the dashboard:
  • Max retries: 0–10 attempts (default: 3)
  • Retry delay: 100–60,000ms (default: 1,000ms)
  • Backoff multiplier: 1–5x (default: 2x)
Delivery logs are retained for 90 days.

Best practices

  • Verify signatures — always validate the X-Webhook-Signature header to ensure requests are from Screenshotly
  • Respond quickly — return a 200 response immediately, then process the payload asynchronously
  • Handle duplicates — use the event_id field for deduplication, as the same event may be delivered more than once
  • Use HTTPS — always use an HTTPS endpoint for your webhook URL
  • Monitor delivery logs — check your webhook’s delivery history in the dashboard to debug failures